2 Replies Latest reply on Dec 8, 2010 6:10 AM by Murali Kumar

    jndi properties & javax.naming.NameNotFoundException: xyz not bound

    infinity2heaven Novice

      It looks like there are atleast 10 posts in this forum with similar requests, none of these posts have threads with replied answers, however.


      Here's my setup.


      JBoss 4.2 (Custom install with my corporate's security stuff etc)


      Seam 2.0.1


      Application - .ear package, exploded outside JBoss. (jboss-service.xml pointing to this as hot-deploy folder). The root folder exploded is called myear.ear


      My app deploys fine on JBoss without any problem and I can see the static facelts pages showing. I wrote a SFSB with @Name(manageFund), my components.xml looks like this



      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
           xmlns:core="http://jboss.com/products/seam/core"
           xmlns:web="http://jboss.com/products/seam/web"
           xmlns:security="http://jboss.com/products/seam/security"
           xmlns:drools="http://jboss.com/products/seam/drools"
           xmlns:transaction="http://jboss.com/products/seam/transaction"
           xmlns:persistence="http://jboss.com/products/seam/persistence"
           xmlns:mail="http://jboss.com/products/seam/mail"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation=
                      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
                       http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd
                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
                       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
      
           <core:init jndi-pattern="myear.ear/#{ejbName}/local" debug="true"/>
      
           <core:manager conversation-timeout="120000"
                concurrent-request-timeout="500" conversation-id-parameter="cid" />
      
           <persistence:managed-persistence-context name="entityManager"
                persistence-unit-jndi-name="java:/EntityManagerFactories/myDatasource" />     
      </components>




      When I access the page which has the SFSB, I get the following error: -



      |org.jboss.seam.InstantiationException: Could not instantiate Seam component: manageFund
           at org.jboss.seam.Component.newInstance(Component.java:1970)
           at org.jboss.seam.Component.getInstance(Component.java:1873)
           at org.jboss.seam.Component.getInstance(Component.java:1840)
           at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
      ...
      ...
      Caused by: javax.naming.NameNotFoundException: myear.ear not bound
           at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
           at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
           at org.jnp.server.NamingServer.getObject(NamingServer.java:543)|




      It certainly looks like a jndi issue, either with my jboss setup or my application. I've tried for several hours, looking through the forums etc,no help so far. Surisingly, such a show stopper, configuring it is not mentioned in Seam Reference or Seam in Action book.