-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate2 and JBoss3.2.x DataSource Issue
PostPosted: Thu Mar 10, 2005 4:14 am 
Newbie

Joined: Thu Mar 10, 2005 3:58 am
Posts: 1
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


    Top
     Profile  
     
     Post subject: datasource .....???
    PostPosted: Fri Mar 18, 2005 4:30 pm 
    Newbie

    Joined: Thu Mar 10, 2005 7:29 am
    Posts: 3
    what about your mysql-ds.xml. does the jndi name correspondens with your hibernate jndi name???

    boris


    Top
     Profile  
     
    Display posts from previous:  Sort by  
    Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

    All times are UTC - 5 hours [ DST ]


    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum

    Search for:
    © Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.