This content has been marked as final.
Show 2 replies
-
1. Re: JNDI exception when deploying on Tomcat with embedded EJ
gavin.king Apr 25, 2006 10:21 AM (in response to newion)Ask in the EJB3 forum. I've never seen this.
-
2. Re: JNDI exception when deploying on Tomcat with embedded EJ
newion Apr 26, 2006 3:56 PM (in response to newion)I missed exception thrown earlier during tomcat startup procedure:
INFO 26-04 21:38:17,750 (Ejb.java:startup:37) -starting the embedded EJB conta iner INFO 26-04 21:38:20,296 (LocalTxDataSource.java:bindConnectionFactory:117) -Bo und datasource to JNDI name 'java:/DefaultDS' INFO 26-04 21:38:20,781 (LocalTxDataSource.java:bindConnectionFactory:117) -Bo und datasource to JNDI name 'java:/controllingDatasource' INFO 26-04 21:38:21,921 (Ejb3Deployment.java:create:465) -EJB3 deployment time took: 1093 INFO 26-04 21:38:21,921 (MCKernelAbstraction.java:install:79) -installing bean : persistence.units:jar=controlling.jar,unitName=entityManager with dependencies : INFO 26-04 21:38:21,937 (MCKernelAbstraction.java:install:82) - Abstract DependencyMetaData@46a5c4{dependency=controllingDatasource} ERROR 26-04 21:38:21,953 (AbstractController.java:incrementState:350) -Error in stalling to Start: name=persistence.units:jar=controlling.jar,unitName=entityMan ager state=Create javax.naming.NameNotFoundException: Name controllingDatasource is not bound in t his Context at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(Unknown Source) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnit Deployment.java:240)
And this is the content of my jboss-beans.xml:<bean name="controllingDatasourceBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource"> <property name="driverClass">com.mysql.jdbc.Driver</property> <property name="connectionURL">jdbc:mysql://localhost:3306/consileon</property> <property name="userName">pawel</property> <property name="password">pawel</property> <property name="jndiName">java:/controllingDatasource</property> <property name="minSize">0</property> <property name="maxSize">10</property> <property name="blockingTimeout">1000</property> <property name="idleTimeout">100000</property> <property name="transactionManager"><inject bean="TransactionManager"/></property> <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> </bean> <bean name="controllingDatasource" class="java.lang.Object"> <constructor factoryMethod="getDatasource"> <factory bean="controllingDatasourceBootstrap"/> </constructor> </bean>
I will be grateful for any hints.
Pawel Kaczor