[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - org.hibernate.HibernateException: Could not find datasource:

schander10 do-not-reply at jboss.com
Tue Jul 22 14:14:44 EDT 2008


After copying the oracle-ds.xml in jobss's server/default directory, when I start the server, I get the following in the logs:

ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=OracleDS' to JNDI name 'java:OracleDS'

and then later on in the logs I get the exception 
Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not find datasource: java:/OracleDS
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:737)
        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
        at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:85)
        at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
        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:585)
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
        at org.jboss.seam.Component.callComponentMethod(Component.java:2100)
        at org.jboss.seam.Component.callCreateMethod(Component.java:2015)
        at org.jboss.seam.Component.newInstance(Component.java:1976)

I checked my JMX console and verified that the Datasource has been setup properly. 

Can someone please help in identifying what I am missing? I have all the latest Hibernate and Persistence related jar files in the jboss lib directory. 

Thanks
Chander

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165963#4165963

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165963



More information about the jboss-user mailing list