2 Replies Latest reply on Apr 26, 2006 3:56 PM by Pawel Kaczor

    JNDI exception when deploying on Tomcat with embedded EJB

    Pawel Kaczor Newbie

      Hi,
      I have successfully deployed booking example application on tomcat with embedded EJB, but I can't run my own seam application.
      The following exceptions occurs when starting tomcat:

      INFO 24-04 23:40:30,812 (EJBContainer.java:start:558) -STARTED EJB: com.consil
      eon.controlling.workflow.UserTasksFinderBean ejbName: UserTasksFinderBean
      ERROR 24-04 23:40:30,828 (AbstractController.java:incrementState:350) -Error in
      stalling to Start: name=jboss.j2ee:jar=controlling,name=UserTasksFinderBean,serv
      ice=EJB3 state=Create
      javax.naming.NamingException: Could not bind stateful local proxy with ejb name
      UserTasksFinderBean into JNDI under jndiName: java:/UserTasksFinderBean/localSta
      tefulProxyFactory [Root exception is javax.naming.OperationNotSupportedException
      : Can''t generate an absolute name for this namespace]
      at org.jboss.ejb3.stateful.StatefulLocalProxyFactory.start(StatefulLocal
      ProxyFactory.java:69)
      at org.jboss.ejb3.ProxyDeployer.start(ProxyDeployer.java:107)
      at org.jboss.ejb3.SessionContainer.start(SessionContainer.java:85)
      at org.jboss.ejb3.stateful.StatefulContainer.start(StatefulContainer.jav
      a:84)

      Do you have any ideas what is the problem?

      Pawel Kaczor

        • 1. Re: JNDI exception when deploying on Tomcat with embedded EJ
          Gavin King Master

          Ask in the EJB3 forum. I've never seen this.

          • 2. Re: JNDI exception when deploying on Tomcat with embedded EJ
            Pawel Kaczor Newbie

            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