0 Replies Latest reply on Jun 28, 2005 7:39 PM by jamesohearn

    comp not bound error

    jamesohearn

      I am adapting a stand-alone java application to use ejb(s). I am running from class files, not a jar. When the app attempts to get the home interface for the first session bean, the following exception is thrown:

      javax.naming.NameNotFoundException: comp not bound

      I am using the utility class generated by MyEclipse, using XDoc, to get the home interface:

      private static XXModelHome xxModelHome = null;

      static {
      try {
      xxModelHome = XXModelUtil.getHome();
      }
      catch (Exception e) {
      System.out.println(e);
      }
      }

      The jmx-console shows, after invoking JMX MBean list():

      Ejb Module: XXServer.jar
      java:comp namespace of the XXComponent bean:
      +- env (class: org.jnp.interfaces.NamingContext)

      java:comp namespace of the XXModel bean:
      +- env (class: org.jnp.interfaces.NamingContext)

      java:comp namespace of the XX bean:
      +- env (class: org.jnp.interfaces.NamingContext)

      Global JNDI Namespace
      +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
      +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
      +- UserTransactionSessionFactory (proxy: $Proxy11 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
      +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
      +- console (class: org.jnp.interfaces.NamingContext)
      | +- PluginManager (proxy: $Proxy37 implements interface org.jboss.console.manager.PluginManagerMBean)
      +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
      +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
      +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
      +- topic (class: org.jnp.interfaces.NamingContext)
      | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
      | +- testTopic (class: org.jboss.mq.SpyTopic)
      | +- securedTopic (class: org.jboss.mq.SpyTopic)
      +- queue (class: org.jnp.interfaces.NamingContext)
      | +- A (class: org.jboss.mq.SpyQueue)
      | +- testQueue (class: org.jboss.mq.SpyQueue)
      | +- ex (class: org.jboss.mq.SpyQueue)
      | +- DLQ (class: org.jboss.mq.SpyQueue)
      | +- D (class: org.jboss.mq.SpyQueue)
      | +- C (class: org.jboss.mq.SpyQueue)
      | +- B (class: org.jboss.mq.SpyQueue)
      +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
      +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
      +- ejb (class: org.jnp.interfaces.NamingContext)
      | +- com (class: org.jnp.interfaces.NamingContext)
      | | +- xxxx (class: org.jnp.interfaces.NamingContext)
      | | | +- xxx (class: org.jnp.interfaces.NamingContext)
      | | | | +- server (class: org.jnp.interfaces.NamingContext)
      | | | | | +- model (class: org.jnp.interfaces.NamingContext)
      | | | | | | +- ejb (class: org.jnp.interfaces.NamingContext)
      | | | | | | | +- XXComponentLocalHome (proxy: $Proxy51 implements interface com.xxxx.xxx.server.model.interfaces.XXComponentLocalHome)
      | | | | | | | +- XXComponentHome (proxy: $Proxy56 implements interface com.xxxx.xxx.server.model.interfaces.XXComponentHome,interface javax.ejb.Handle)
      | | | | | +- ejb (class: org.jnp.interfaces.NamingContext)
      | | | | | | +- XXModelHome (proxy: $Proxy58 implements interface com.xxxx.xxx.server.interfaces.XXModelHome,interface javax.ejb.Handle)
      | | | | | | +- XXHome (proxy: $Proxy60 implements interface com.xxxx.xxx.server.interfaces.XXHome,interface javax.ejb.Handle)
      +- jmx (class: org.jnp.interfaces.NamingContext)

      After doing some investingation, my suspicion is that I have to create an application-client.xml file and a jboss-client.xml file. However, I haven't found enough information about where these files have to be placed (do they go in a meta-inf directory in my app's classpath??) and I don't believe I've found any examples of a jboss-client.xml file yet.

      I appreciate any help you can give, especially references to building and placing the xml files I noted earlier.

      Thanks.