db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From josepma <josep...@gmail.com>
Subject Re: ant+jpa+junit+derby: Cannot connect to the database (already booted!!!)
Date Sat, 30 Mar 2013 10:14:25 GMT
I have found a solution to my problem:

I create the database in persistence.xml (notice the ";create=true" in the
value of "toplink.jdbc.url") instead of in build.xml:

<persistence-unit name="alexandria" transaction-type="RESOURCE_LOCAL">
      <property name="toplink.jdbc.url" 
      <property name="toplink.ddl-generation" value="create-tables"/>
      <property name="toplink.jdbc.user" value="josepma"/>  
      <property name="toplink.jdbc.driver" 
      <property name="toplink.jdbc.password" value="josepma"/>

If done this way, it is not necessary to include a "create-db" target in

However, I do not fully understand the behaviour of the derby embedded
driver. Therefore, if someone can provide some light on this subject, I
would be grateful.

Thanks again.,


View this message in context: http://apache-database.10148.n7.nabble.com/ant-jpa-junit-derby-Cannot-connect-to-the-database-already-booted-tp128487p128506.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

View raw message