This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate using weblogic 10.3 Datasource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate using weblogic 10.3 Datasource" Watch "Hibernate using weblogic 10.3 Datasource" New topic
Author

Hibernate using weblogic 10.3 Datasource

Srinivas Kaza
Greenhorn

Joined: Jul 17, 2012
Posts: 1
HI,
When I use direct jdbc connection my code is working with Hibernate. I am trying to use Weblogic datasource then I am getting error. Your helps is highly appreciated. thanks.

I have configured datasource in weblogic 10.3 server. the DataSource JNDI Identifier is jdbc/MyDB
I have added this in weblogic.xml & web.xml

WEBLOGIC.xml


web.xml


Now in hibernate.cfg.xml I configured like below



When I use this setup I am getting the following error:
org.hibernate.service.jndi.JndiException: Unable to lookup JNDI name [java:/comp/env/jdbc/MyDB]
at org.hibernate.service.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:68)
at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:116)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:223)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:89)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2277)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2273)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1742)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1782)
at com.dataresources.daoimpl.DepartmentDAOImpl.addDepartment(DepartmentDAOImpl.java:15)
at com.mycompany.businessdelegate.BusinessDelegate.SaveDepartement(BusinessDelegate.java:12)
at com.mycompany.controller.SpringController.saveDepartment(SpringController.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

 
Don't get me started about those stupid light bulbs.
 
subject: Hibernate using weblogic 10.3 Datasource
 
Similar Threads
hibernate in Eclipse helios
Problem with Hibernate and Oracle
Hibernate configuration issue: connection provider or hibernate.dialect issue
*.hibernate3.LocalDataSourceConnectionProvider cannot be cast to *.ConnectionProvider
Problem deploying JBoss AS 7.1.0 - ClassNotFoundException