Hello,
I am using Hibernate version 2-1 and trying out with jBPM on JBoss 3.2.5 and 3.2.6. I am facing a problem looking up the datasource in JBoss ..
Ant Version 1.6.2
After struggling a lot, I have narrowed down the issue to a "ClassNotFoundException" in NamingHelper class. I believe that this could be due to some version mismatch... but was wondering if anybody has run into this issue...
I have tried providing jnpserver and jnp-client jars, but does not seem to resolve the issue...
## JNDI Datasource
hibernate.connection.datasource=java:/JbpmDS
hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/test
hibernate.query.substitutions true=1, false=0
hibernate.connection.username=root
hibernate.connection.password=root1
hibernate.session_factory_name=hibernate/SessionFactory
hibernate.jndi.class=org.jnp.interfaces.NamingContextFactory
hibernate.jndi.url=jnp://localhost:1099
hibernate.transaction.manager_lookup_class net.sf.hibernate.transaction.JBossTransactionManagerLookup
hibernate.transaction.factory_class net.sf.hibernate.transaction.JTATransactionFactory
02:23:22,328 ERROR [NamingHelper] Could not obtain initial context
caused by exception : javax.naming.NoInitialContextException
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at net.sf.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:32)
at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)
at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1172)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:803)
at org.jbpm.persistence.hibernate.HibernateSessionFactory.initialize(HibernateSessionFactory.java:42)
at org.jbpm.persistence.hibernate.HibernateSessionFactory.<init>(HibernateSessionFactory.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.jbpm.JbpmConfiguration.instantiate(JbpmConfiguration.java:502)
at org.jbpm.JbpmConfiguration.instantiateConfiguredObjects(JbpmConfiguration.java:462)
at org.jbpm.JbpmConfiguration.<init>(JbpmConfiguration.java:254)
at org.jbpm.ant.DeployParTask.execute(DeployParTask.java:29)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.Main.start(Main.java:147)
at org.apache.tools.ant.Main.main(Main.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:13)
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
Thnx
xav