Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Using H2 Database(Using a H2 Database rather than the H2 Embedded Database)
Using H2 Database [message #754893] Fri, 04 November 2011 19:44 Go to next message
Diane Mising name is currently offline Diane Mising nameFriend
Messages: 22
Registered: June 2011
Junior Member
I am trying to set up the backend database rather than using the embedded database. Is it possible to use a H2 database? I have followed the instructions for setting up an additional database as well as installed the Jubula Database Drivers. However, I continue to receive the following error.

2011-11-04 13:23:34.450 [Worker-6] ERROR o.e.j.c.core.persistence.Persistor - no or wrong username or password
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20110908-r10021): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: No suitable driver found for "myDatabaseName";MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
Error Code: 0
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:503) ~[org.eclipse.persistence.jpa_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188) ~[org.eclipse.persistence.jpa_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277) ~[org.eclipse.persistence.jpa_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294) ~[org.eclipse.persistence.jpa_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272) ~[org.eclipse.persistence.jpa_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.jubula.client.core.persistence.Persistor.buildSessionFactoryWithLoginData(Persistor.java:281) [org.eclipse.jubula.client.core_1.1.0.201109140653.jar:na]
at org.eclipse.jubula.client.core.persistence.Persistor.<init>(Persistor.java:156) [org.eclipse.jubula.client.core_1.1.0.201109140653.jar:na]
at org.eclipse.jubula.client.core.persistence.Persistor.instance(Persistor.java:596) [org.eclipse.jubula.client.core_1.1.0.201109140653.jar:na]
at org.eclipse.jubula.client.core.persistence.Persistor.access$4(Persistor.java:591) [org.eclipse.jubula.client.core_1.1.0.201109140653.jar:na]
at org.eclipse.jubula.client.core.persistence.Persistor$2.run(Persistor.java:192) [org.eclipse.jubula.client.core_1.1.0.201109140653.jar:na]
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) [org.eclipse.core.jobs_3.5.100.v20110404.jar:na]
Caused by: org.eclipse.persistence.exceptions.DatabaseException:
Internal Exception: java.sql.SQLException: No suitable driver found for "myDatabaseName";MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
Error Code: 0
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324) ~[org.eclipse.persistence.core_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319) ~[org.eclipse.persistence.core_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138) ~[org.eclipse.persistence.core_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) ~[org.eclipse.persistence.core_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:603) ~[org.eclipse.persistence.core_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206) ~[org.eclipse.persistence.jpa_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:474) ~[org.eclipse.persistence.jpa_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
... 10 common frames omitted
Caused by: java.sql.SQLException: No suitable driver found for "myDatabaseName";MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
at java.sql.DriverManager.getConnection(Unknown Source) ~[na:1.6.0_24]
at java.sql.DriverManager.getConnection(Unknown Source) ~[na:1.6.0_24]
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98) ~[org.eclipse.persistence.core_2.3.1.v20110908-r10021.jar:2.3.1.v20110908-r10021]
... 14 common frames omitted

I can't tell if it is having trouble with the database drivers or the user name and password. I am never prompted to enter my user name and password, it just says Database Connection failed and that is it. Can somebody instruct me as to what I am doing wrong? Thanks for your help.
Re: Using H2 Database [message #755057 is a reply to message #754893] Mon, 07 November 2011 09:03 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

The H2 database can run in embedded mode or in a server mode. As we use the embedded mode as our default database, we automatically use the username "sa" (without quotes) and an empty password to connect to the database in the embedded mode. This means that running the H2 database in the server mode will not work with Jubula. If you are using the server mode, this would then be the reason.

Hope that helps,
Alex
Re: Using H2 Database [message #755137 is a reply to message #755057] Mon, 07 November 2011 13:47 Go to previous messageGo to next message
Diane Mising name is currently offline Diane Mising nameFriend
Messages: 22
Registered: June 2011
Junior Member
Hi Alex,

Maybe I was a little unclear with my question. I know it is recommended to use an Oracle Database as the backend, but I was wondering if Jubula supports using a H2 database (not the embedded database, but our own H2 database)?

Thanks,
Diane
Re: Using H2 Database [message #755181 is a reply to message #755137] Mon, 07 November 2011 15:47 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Diane,

Thanks for the clarification. The H2 embedded database was added to make database connection as simple and automatic as possible. For this reason, there are a lot of things hard-coded into Jubula when it comes to H2, to ensure that it works out of the box.

It would be possible to change this code to be able to add new H2 databases, but this isn't something that is on our roadmap. If you decide to implement this for yourself though, you could create a patch and we would look at including it.

Best regards,
Alex
Previous Topic:Jubula Standalone for Windows 64 Bit?
Next Topic:SWT_AWT bridge
Goto Forum:
  


Current Time: Fri Mar 29 01:26:39 GMT 2024

Powered by FUDForum. Page generated in 0.05925 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top