JNDI Problem: DataSource is not bound!
jbosschecker Oct 18, 2005 8:44 AMHi!
I am working with JBoss ejb 3.0 in a an EJB 3.0-Webapplication with Servlets and JSPs.
I have (CMP) Entities, which are mapped to a mySQL DB(4.1). The name of my MySQL Datasource is : estore.
I have a datasource-config-file in the deploy directory, called estore-ds.xml, and an persistence.xml file whithin my entities.par archiv.
Everything was working fine with jboss-EJB_3.0_RC1, but since I work with the last version of JBoss (jboss-EJB_3.0 Production state) nothing works anymore!!
I guess, the problem is, that my JNDI Bindings do not work properly in the production version of JBoss.
here is (a part of) the exception:
Caused by: javax.naming.NameNotFoundException: estore not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:514) at org.jnp.server.NamingServer.getBinding(NamingServer.java:522) at org.jnp.server.NamingServer.getObject(NamingServer.java:528) at org.jnp.server.NamingServer.lookup(NamingServer.java:281) at org.jnp.server.NamingServer.lookup(NamingServer.java:255) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.jboss.ejb3.injection.PersistenceContextHandler.getManagedEntityMa nagerFactory(PersistenceContextHandler.java:81) here are the JNDI Bindings( JNDI-MBean: (localhost:8080/jmx-console MBean.list() ):-----------------
java: Namespace
+- jaas (class: javax.naming.Context) | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext) | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext) | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext) +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter) +- comp.ejb3 (class: javax.naming.Context) | NonContext: null +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl) +- managedEntityFactories (class: org.jnp.interfaces.NamingContext) +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource) +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory) +- TransactionManager (class: org.jboss.tm.TxManager) +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory) +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory) +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter) +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory) +- Mail (class: javax.mail.Session) +- EntityManagerFactories (class: org.jnp.interfaces.NamingContext) +- timedCacheFactory (class: javax.naming.Context) Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory) +- estore (class: org.jboss.resource.adapter.jdbc.WrapperDataSource) +- ActualEntityManagerFactories (class: org.jnp.interfaces.NamingContext) +- comp (class: javax.naming.Context) +- EntityManagers (class: org.jnp.interfaces.NamingContext)
----------------
I have to work with the production version of jboss, because the production version of jboss 4.0.3 promises to be free of CASCADE DELETE problems. Otherwise I would rather work with the version before!
Please help me!!