derby

Using two different databases with identical hibernate mapping files

Basically the idea is to use the same hibernate mapping files for two different underlying databases. In production the underlying database is MySQL5 and for testing purposes I'd like to use Apache Derby - in order to avoid setting up and maintaining various MySQL databases for testing purposes. I hoped that just switching the DataSour...

derby.log (etc) control in a webapp

Derby has a series of configuration options that are controlled by system properties. It's quite painful to arrange system property settings in a webapp. Has anyone come up with a solution? In addition, I have been unable to make them work in a webapp. Here is the code of a servlet context listener. derby.log is still created in the cw...

Derby gets stuck closing?

I've got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:30:31 PM org.hibernate.impl.SessionFactoryImpl close INFO: closing Nov 16, 2009 8:30:31 PM org.hibernate.tool.hbm2ddl.SchemaExport execute...

Geronimo vs Glassfish

For a production environment, is Apache Geronimo better for applications that uses ActiveMQ, Derby, Solr? ...

Migrate Grail's HSQLDB embedded database

how to migrate Grail's HSQLDB embedded database(That contains my App's Data that I don't want to lose) into external one, such as MySQL or ApacheDerby? ...

How to configure Grails to work with Apache Derby?

How to configure Grails to work with Apache Derby instead of HSQLDB ...

How to use JPA to connect to Derby

A related query I asked: http://stackoverflow.com/questions/1892089/how-to-configure-package-a-simple-java-app-to-uss-jpa I have a simple Derby database which I can connect to via EJBs hosted in WebLogic. Now I would like to connect to it from a command line Java app using JPA. So far this Java code + persistence.xml file is throwing...

Can Derby / JavaDB _really_ encrypt with Triple DES rather than (plain) DES?

It seems to be confusing Triple-DES (>128bit) with plain DES (64bit). I'm trying to encrypt a Derby database with Triple DES (or DESede) using Java 1.5 I found this discussion forum message about a problem with JDK 1.5 by chance and so checked to make sure that it really was using DESede and not plain DES. When I created the database wi...

mysql's current_timestamp for java derby

Hi all, In MySQL I can easily set the default value of a timestamp field to be the current time fieldname timestamp not null default current_timestamp Does anyone know how to do the same thing in java derby? ...

Can a java application manage triggers and UDFs in Derby database ?

Can we manage UDFs, and triggers in Derby database from our own Java Application ? By managing I mean : checking if it exists; adding; removing. ...

JPA cascade update problem. Am i doing this the wrong way?

Hi everyone, i'm using JPA on a SWING application in JAVA that connects to an Apache DERBY embedded database. I use Netbeans as my IDE and use many of the "suposedly" helpfull templates. My problem it's simple, but it's dificult for me to explain so i will paste the relevant code here and try to explain at the bottom. @Entity public c...

JavaDB administration tools

My current employer wants to use JavaDB for his new project. Allright with it, as my favoured SQLite isn't working very well with java and I, er..., don't really feel like arguing about it. Anyway I can't find a decent free tool to manipulate JavaDB or Derby databases. All I have is Netbeans. I've tried others but all the free ones are r...

Derby vs PostgreSql Performance Comparison

We are doing research right now on whether to switch our postgresql db to an embedded Derby db. Both would be using glassfish 3 for our data layer. Anybody have any opinions or knowledge that could help us decide? Thanks! edit: we are writing some performance tests ourselves right now. Looking for answers more based on experience / fir...

Spring's JDBCTemplate IllegalArgumentException: datasource required

Well, I am having a problem with configuring Spring's JDBCTemplate to work properly. I am trying to inject the datasource but it seems that it's always null. Here is a sample code: applicationContext.xml: <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="...

Multi database schema export

Hello, I'm writing a project that will make use of mySQL or Derby (it must work in both situations). To solve this I'm using Hibernate and it works nicely, but for a situation: I've a couple of tables that contain cities and towns, with data related so that if i know the town I can join and get the county, state and zip code. These table...

constraint problems using apache derby and hbm2ddl

We are using Apache Derby 10.5.3.0_1 and hbm2ddl with Hibernate 3.3.x I get the following constraints error while pre-loading the SQL on an embedded derby database. If I remove the primary key(id) from the create table sql, it's able to create the table. Not sure what the problem is over here. create table user_flow (id integer not nul...

How to shutdown Derby In Memory Database Properly

I'm using derby as an embedded database. Furthermore, I'm using it's in memory database option for my unit tests. What I can't figure out is how to properly shut down (A quick look at the code) the derby database. I beleive I have it working for a standard database but I'm getting different exceptions when attempt similar code on a in-...

Does derby support replace into of mysql?

Does derby support REPLACE INTO of mysql? ...

java derby database batch load from CSV

Does derby have any capabilities from performing a batch insert of data from a CSV? The best I could come up with was to read in the file line by line and create a batch sql update statement and run that. For 1 million rows that took between 30-40 minutes, as compared with using mySQL's LOAD statement to load from a csv file which took 2...

Making a connection between multiple databases

I'm using JAVA DB (derby) I want to import a public view of my data to another database (also in java db). I want to pass this data and save in to the other database. I'm having trouble since the general rule is one connection to one database. Help would be much appreciated. ...