This content has been marked as final.
Show 4 replies
-
1. Re: Server JVM, Client JVM, JNDI & Workaround
jaikiran Jan 16, 2009 2:21 AM (in response to braca)More details please, like the exception stacktrace. You mention that you are using the datasource in hibernate.cfg.xml, which i believe is on the server side (the same server where datasource is present). So i don't think there should have been a problem.
While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted. -
2. Re: Server JVM, Client JVM, JNDI & Workaround
braca Jan 16, 2009 4:32 AM (in response to braca)Hello,
yes, hibernate.cfg.xml is on serverside (in .ear-file). The stacktrace is as follows:org.hibernate.HibernateException: Could not find datasource at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91) at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99) at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:341) at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571) at org.jbpm.JbpmContext.newProcessInstance(JbpmContext.java:408) Caused by: javax.naming.NameNotFoundException: No object bound for java:InformixDS at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116) at javax.naming.InitialContext.lookup(Unknown Source) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) ... 50 more
braca -
3. Re: Server JVM, Client JVM, JNDI & Workaround
jaikiran Jan 16, 2009 5:23 AM (in response to braca)at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
This class looks suspicious. Do you have any jndi.properties packaged in your application, which might have an incorrect entry about the naming context factory? Or maybe your hibernate configuration file has some incorrect jndi configuration information. Please post that file. -
4. Re: Server JVM, Client JVM, JNDI & Workaround
braca Jan 16, 2009 5:59 AM (in response to braca)Hi,
the only changes I made in hibernate.cfg.xml look like this:<property name="hibernate.dialect">org.hibernate.dialect.InformixDialect</property> <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property> <!-- DataSource properties (begin) --> <property name="hibernate.connection.datasource">java:InformixDS</property> <!-- DataSource properties (end) -->
and I used the (default) jndi.properties for the client:java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=jnp://127.0.0.1:1099
braca