Datanucleus 5 informix 11 Failed initialising database


Andy
 

Seemingly you must have fixed your problem by now, so it is assumed to be a problem in user code.


Andy
 

I dont have that database so you have to debug the code yourself. As the code shows (current), that line will not (IMHO) give an NPE

https://github.com/datanucleus/datanucleus-rdbms/blob/master/src/main/java/org/datanucleus/store/rdbms/ConnectionFactoryImpl.java#L325

so maybe you don't mean latest code. Anyway, work out what is null is the way to find the problem


vthokonya@...
 

I am trying to connect to informix with no success. Here is the staketrace:
Failed initialising database. Please check that your database JDBC driver is accessible, and the database URL and username/password are correct. Exception : null
java.lang.NullPointerException
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:325)
at org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManager.java:394)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:607)
at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:295)
at org.datanucleus.NucleusContextHelper.createStoreManagerForProperties(NucleusContextHelper.java:190)
at org.datanucleus.PersistenceNucleusContextImpl.initialise(PersistenceNucleusContextImpl.java:426)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:837)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:344)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:223)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at javax.jdo.JDOHelper$16.run(JDOHelper.java:1975)
at java.security.AccessController.doPrivileged(Native Method)
at javax.jdo.JDOHelper.invoke(JDOHelper.java:1970)
at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1177)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:814)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:702)
at com.swanretail.service.Context.startPM(Context.java:292)
at com.swanretail.service.Context.configureServerJDO(Context.java:167)
at com.swanretail.service.Context.initialize(Context.java:237)
at com.swanretail.jdo.Main.main(Main.java:133)

The properties i have are :
javax.jdo.option.ConnectionDriverName=com.informix.jdbc.IfxDriver
javax.jdo.option.ConnectionPassword=<password>
javax.jdo.option.ConnectionUserName=<username>
 
javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.api.jdo.JDOPersistenceManagerFactory
javax.jdo.option.ConnectionURL           =jdbc:informix-sqli:<host>:<port>/<database>:informixserver=<server>