1 Reply Latest reply on Feb 2, 2002 6:56 PM by Joe

    NameNotFoundException during startup

    Joe Newbie

      Hello:

      When starting jBoss 2.4.4, I get the exception below. The Exception says that JNDI can't find the bean, but the line right after the exception, that same bean gets deployed. I made many changes to the code/descriptors, and I can't seem to figure out which change caused the problem... Also, the server continues to boot and work fine, but this exception is a little worrisome. Any ideas on how to get rid of this problem?

      Thanks,

      Joe

      [INFO,ContainerFactory] Deploying:file:/C:/jboss/tmp/deploy/Default/test.ear
      [ERROR,Default] javax.naming.NameNotFoundException: StudentEJB not bound
      [ERROR,Default] at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      [ERROR,Default]
      [ERROR,Default] at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      [ERROR,Default]
      [ERROR,Default] at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      [ERROR,Default]
      [ERROR,Default] at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
      [ERROR,Default]
      [ERROR,Default] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
      [ERROR,Default]
      [ERROR,Default] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
      [ERROR,Default]
      [ERROR,Default] at javax.naming.InitialContext.lookup(Unknown Source)
      [ERROR,Default]
      [ERROR,Default] at com.zapper.ejb.session.stateless.StudentManagerEJB.(Unknown Source)
      [ERROR,Default]
      [ERROR,Default] at java.lang.Class.newInstance0(Native Method)
      [ERROR,Default]
      [ERROR,Default] at java.lang.Class.newInstance(Unknown Source)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.verifier.strategy.AbstractVerifier.hasDefaultConstructor(AbstractVerifier.java:369)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.verifier.strategy.EJBVerifier11.verifySessionBean(EJBVerifier11.java:630)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.verifier.strategy.EJBVerifier11.checkSession(EJBVerifier11.java:93)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:134)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:465)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:369)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:306)
      [ERROR,Default]
      [ERROR,Default] at java.lang.reflect.Method.invoke Native Method)
      [ERROR,Default]
      [ERROR,Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [ERROR,Default]
      [ERROR,Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:487)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
      [ERROR,Default]
      [ERROR,Default] at java.lang.reflect.Method.invoke(Native Method)
      [ERROR,Default]
      [ERROR,Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [ERROR,Default]
      [ERROR,Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.deployment.AutoDeployer.startService(AutoDeployer.java:371)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      [ERROR,Default]
      [ERROR,Default] at java.lang.reflect.Method.invoke(Native Method)
      [ERROR,Default]
      [ERROR,Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [ERROR,Default]
      [ERROR,Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
      [ERROR,Default]
      [ERROR,Default] at $Proxy0.start(Unknown Source)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      [ERROR,Default]
      [ERROR,Default] at java.lang.reflect.Method.invoke(Native Method)
      [ERROR,Default]
      [ERROR,Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [ERROR,Default]
      [ERROR,Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.Main.(Main.java:208)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.Main$1.run(Main.java:110)
      [ERROR,Default]
      [ERROR,Default] at java.security.AccessController.doPrivileged(Native Method)
      [ERROR,Default]
      [ERROR,Default] at org.jboss.Main.main(Main.java:106)
      [ERROR,Default]
      [INFO,ContainerFactory] Deploying StudentEJB

        • 1. Re: NameNotFoundException during startup
          Joe Newbie


          Hello:

          Turns out that the problem was in the constructor of one of the session beans. In that constructor, it was retrieving the entity bean home via a JNDI lookup. Looks like session beans are instantiated before entity beans are available.

          To get around this problem, write a method, getBeanHome(), that will initialize it if null and return it if already set...

          Joe