Community
Participate
Working Groups
Build Identifier: 20100617-1415 I've a database connection (in DataSource explorer) to Apache derby and the database is encrypted, therefore I need a bootPassword property (on connection chain) and I put it on Properties -> Optional -> Add. The problem: When I use '(right click on project) -> JPA tools -> Generate Tables from Entities' the property (added on optional connection properties) isn't used (Not bootPassword for encrypted database => runtime error). I think the wizard doesn't take a complete address URL. I avoid this problem adding properties directly to database location. Reproducible: Always Steps to Reproduce: // IT NEEDS SOME MANDATORY PROPERTY (example: a password on an encrypted database) 1.Right click on your project 2.Go to JPA Tools -> Generate Tables from Entities... 3.Accept/Yes Generating DDL 4. "Error o Exception..."
Investigate for 2.3.1.
OK, No problem. On persistence.xml editor (Connection tab) "Bind parameters" was unchecked. Maybe I didn't save at the first time, I think. Excuse me. Thx for all.
However, I think that somebody should see the persistence.xml changing "the bind parameter" value. It doesn't work fine.
We may have had a communication error here. We need to investigate this bug to determine if it is something that we can fix, or something that needs to be reassigned. I don't believe it to be invalid at this time.
I could not reproduce this problem. The key thing I could see here, is to include the bootPassword in the Connection URL of the DTP New Driver Definition wizard. Feel free to reopen this bug if necessary, and please include the stack trace that you are getting.
Details project: - JPA Project, JDK 1.6, Apache Derby 10.5.3.0 (802917) JDBC 3.0 driver - JPA Implementation: EclipseLink, 2.1.0.v20100614-r7608 - An encrypted database Derby I checked again and I took another exception using "JPA Tools -> Generate Tables from Entities..." wizard. I thought the problem was in persistence.xml editor (on bind parameter but I think It's nonesense). 1. Config a database connection with some property. 2. Go to persistence.xml editor, select "Connection" tab. 3. Here we go: With "Local resource" as transaction type You want to populate from that connection. Then click the link "Populate from connection ..." and some fields are filled out. I think the generated URL should have the properties and there are nothing (concerning properties) on the URL. Moreover, in my persistence.xml happens the same. I'm busy but I'm seeing the problem in a few weeks. I can attach a sample project if you want. I attach the trace exception: [EL Info]: EclipseLink, version: Eclipse Persistence Services - 2.1.0.v20100614-r7608 Exception in thread "main" javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Failed to start database 'C:\Documents and Settings\ignaciolozano.asist\Mis documentos\Descargas\structureDB', see the next exception for details. Error Code: 40000 at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:408) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:157)[EL Severe]: Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Failed to start database 'C:\Documents and Settings\ignaciolozano.asist\Mis documentos\Descargas\structureDB', see the next exception for details. Error Code: 40000 at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324) at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:579) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:380) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:157) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:214) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202) at org.eclipse.jpt.eclipselink.core.ddlgen.Main.perform(Main.java:86) at org.eclipse.jpt.eclipselink.core.ddlgen.Main.execute(Main.java:77) at org.eclipse.jpt.eclipselink.core.ddlgen.Main.main(Main.java:64) Caused by: java.sql.SQLException: Failed to start database 'C:\Documents and Settings\ignaciolozano.asist\Mis documentos\Descargas\structureDB', see the next exception for details. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98) ... 10 more Caused by: java.sql.SQLException: Failed to start database 'C:\Documents and Settings\ignaciolozano.asist\Mis documentos\Descargas\structureDB', see the next exception for details. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 23 more Caused by: java.sql.SQLException: Startup failed. An encrypted database cannot be accessed without the correct boot password. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) ... 20 more Caused by: ERROR XBM06: Startup failed. An encrypted database cannot be accessed without the correct boot password. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.services.jce.JCECipherFactory.handleBootPassword(Unknown Source) at org.apache.derby.impl.services.jce.JCECipherFactory.init(Unknown Source) at org.apache.derby.impl.services.jce.JCECipherFactory.<init>(Unknown Source) at org.apache.derby.impl.services.jce.JCECipherFactoryBuilder.createCipherFactory(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.setupEncryptionEngines(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source) at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source) at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source) at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source) ... 20 more at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:214) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202) at org.eclipse.jpt.eclipselink.core.ddlgen.Main.perform(Main.java:86) at org.eclipse.jpt.eclipselink.core.ddlgen.Main.execute(Main.java:77) at org.eclipse.jpt.eclipselink.core.ddlgen.Main.main(Main.java:64) Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Failed to start database 'C:\Documents and Settings\ignaciolozano.asist\Mis documentos\Descargas\structureDB', see the next exception for details. Error Code: 40000 at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324) at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:579) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:380) ... 6 more Caused by: java.sql.SQLException: Failed to start database 'C:\Documents and Settings\ignaciolozano.asist\Mis documentos\Descargas\structureDB', see the next exception for details. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:154) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98) ... 10 more Caused by: java.sql.SQLException: Failed to start database 'C:\Documents and Settings\ignaciolozano.asist\Mis documentos\Descargas\structureDB', see the next exception for details. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 23 more Caused by: java.sql.SQLException: Startup failed. An encrypted database cannot be accessed without the correct boot password. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) ... 20 more Caused by: ERROR XBM06: Startup failed. An encrypted database cannot be accessed without the correct boot password. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.services.jce.JCECipherFactory.handleBootPassword(Unknown Source) at org.apache.derby.impl.services.jce.JCECipherFactory.init(Unknown Source) at org.apache.derby.impl.services.jce.JCECipherFactory.<init>(Unknown Source) at org.apache.derby.impl.services.jce.JCECipherFactoryBuilder.createCipherFactory(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.setupEncryptionEngines(Unknown Source) at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source) at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source) at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source) at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source) ... 20 more
Okay...I think I get the problem you are having now. The simple workaround is to simply edit the url in the persistence.xml via the editor or the source and add the properties that are needed to the url field. The "Populate from connection" link is just a small usability feature to save you some typing. You can always further edit these fields. That said, if it makes sense on all DB's, we could add the copying of the properties to the URL as well. I'll leave this bug open to address this issue.
Moving JPA specific bugs to new JPA component in bugzilla.