3 Replies Latest reply on Mar 10, 2003 2:01 PM by Peter Doornbosch

    Ejb2.0 + relation + local interface = Not Bind

    sachinsisodia Newbie

      Hello Guys
      all of u did the fine job for me till now and hope u can help me to sort out this problem too.

      First i m creating
      1. User ejb with local interface
      2. UserInfo with local interface

      User has one to one mapping with UesrInfo ejb only unidirection.

      Now i call these 2 by a Session Bean which is in the same JVM

      Now it is compiled and deploy successfully and jboss console gives the message that User and UserInfo table is created successfully

      Now i wants to try to call this session bean through my client

      But when i tried jboss console gives the following message:

      14:39:08,846 ERROR [STDERR] javax.naming.NameNotFoundException: Userr not bound
      14:39:08,846 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(Naming
      14:39:08,846 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(Naming
      14:39:08,846 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingS
      14:39:08,846 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServ
      14:39:08,846 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(Namin
      14:39:08,846 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(Namin
      14:39:08,846 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialCon
      14:39:08,846 ERROR [STDERR] at user.UserManagementEJB.addUser(UserManagement
      14:39:08,846 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method
      14:39:08,846 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$Conta
      14:39:08,846 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedCo
      14:39:08,846 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanc
      14:39:08,846 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.i
      14:39:08,846 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWit
      14:39:08,846 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke
      14:39:08,846 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.inv
      14:39:08,846 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(L
      14:39:08,846 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.invok
      14:39:08,862 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java
      14:39:08,862 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
      14:39:08,862 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.
      14:39:08,862 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method
      14:39:08,862 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(Unic
      14:39:08,862 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.j
      14:39:08,862 ERROR [STDERR] at java.security.AccessController.doPrivileged(N
      ative Method)
      14:39:08,862 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Trans
      14:39:08,862 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMess
      14:39:08,862 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$Connection
      14:39:08,862 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484)

      Note: I changed the name of the User ejb to Userr coz User is a key word in the sql server

      Why it is giving error that userr is not bind. i already successfully deploy the jar file
      it is mean that only Userr is nt bind and the another local bean Userinfo is binded

      I m using jboss.
      i tried to sereach this problem what i didn't get any satisfactory ans yetCould any body tell me, why thses error comes, i tried all the option bt i encounter the same error

      thanx in advance

      with regards

        • 1. Re: Ejb2.0 + relation + local interface = Not Bind
          Peter Doornbosch Apprentice

          The error message means that your EJB is not bound with the jndi name 'Userr'. Maybe it is still deployed with the jndi name 'User'?
          You can check the jndi names by surfing to the jmx-console (http://localhost:8080/jmx-console): select the MBean called JNDIView, hit the button 'list' and browse through the list to find your bean and see what it is called.
          JBoss looks for the jndi-name in the jboss.xml file in the ejb.jar and when it's not specified there, it takes the name of the EJB as specified in the ejb-jar.xml


          • 2. Re: Ejb2.0 + relation + local interface = Not Bind
            sachinsisodia Newbie

            Hi peter,
            thanx to reply me,
            i sloved that probelm which i was facing for last one week.
            i checked the jndi view and the userr is being binded successfully there.

            Bt when i tried to lookup that bean with "Local/Userr",
            that problem was sloved (Could any body explain me, is there any need to lookup with local) bt i get another exception:

            11:08:02,682 ERROR [LogInterceptor] TransactionRolledbackLocalException, causedB
            java.lang.InstantiationException: user.UserrEJB
            at java.lang.Class.newInstance0(Native Method)
            at java.lang.Class.newInstance(Class.java:237)
            at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createBeanClassInst

            Does anybody know where the problem could be?
            Any tips would be really apreciated.
            Thanks in advance



            • 3. Re: Ejb2.0 + relation + local interface = Not Bind
              Peter Doornbosch Apprentice

              Probably, the constructor of your bean is throwing an exception. Put a try-catch block in it and check if this is the case...