[jboss-user] [JBoss Seam] - Datasource Issue in WebLogic 9.2

neilac333 do-not-reply at jboss.com
Thu Jan 10 12:46:32 EST 2008


My Seam-JPA application can't be deployed to WebLogic 9.2 because there is a JNDI error when trying to locate the datasource.  I have set up a datasource in the Admin Console called java:/myWebAppDS.  Then, in my persistence.xml I have this:


  | <persistence-unit name="srmWebapp" transaction-type="JTA">
  |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |       <jta-data-source>java:/myWebAppDS</jta-data-source>
  |       <properties>
  |          [Some stuff...]
  |          <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup" />
  |          <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.CMTTransactionFactory" />
  |          [More stuff...]
  |       </properties>
  | </persistence-unit>
  | 

This seems right to me, but then I get this exception:


  | javax.naming.NameNotFoundException: While trying to look up /myWebAppDS in /app/webapp/myProject.war/3153055.; remaining name '/myWebAppDS'
  | 	at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
  | 	at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:142)
  | 	at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:269)
  | 	at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:362)
  | 	at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
  | 	at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
  | 	at javax.naming.InitialContext.lookup(InitialContext.java:351)
  | 	at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
  | 	at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
  | 	at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
  | 	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.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
  | 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
  | 	at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
  | 	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
  | 	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
  | 	at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81)
  | 	at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
  | 	at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
  | 
  | 

I cannot figure out what the issue is, so any insight is appreciated.  

Thanks.

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

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



More information about the jboss-user mailing list