4 Replies Latest reply on May 24, 2002 4:26 PM by dmulej

    client lookup failed

    dmulej

      Hi!

      We have great problems with EJB lookup from client.
      Facts are:
      - JBoss-Tomcat-RC3 or JBoss-Tomcat-RC2
      - java 1.4 or java 1.3
      - If beans are deployed in ear file (together with war), everything is OK
      - InitialContext is obtained
      - error is
      C:\projects\zzpt\src\client\build.xml:54: java.lang.NoClassDefFoundError: sun/re
      flect/SerializationConstructorAccessorImpl

      ??

      Darko

        • 1. Re: client lookup failed
          dmulej

          Perhaps i should have added some more info.
          Code fragment is

          Properties p = new Properties();
          p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory" );
          p.put(Context.PROVIDER_URL, "localhost:1099");
          p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"
          InitialContext initCtx = new javax.naming.InitialContext(p);
          Object ref = initCtx.lookup("ejb/MyBean");

          and the problem is the last line (MyBean is stateless session bean).

          Is perhaps this classpath problem?

          Darko

          • 2. Re: client lookup failed
            vickyk

            Hi,
            I have tried myself the deployment of the ejb and using the java client from different jvm it works fine,Can
            you explain how do you deploy the ejbs?I am new to the
            jboss environment...
            regards vicky

            • 3. Re: client lookup failed
              dmulej

              ThankYou for hint.
              I was trying to run client with ant script and it did not work.
              When I tried with plain console it worked!!
              Ant is not that simple as we expected ..

              for curious here is ant fragment to blame:












              Darko

              • 4. Re: client lookup failed
                dmulej

                Change in line

                to

                has made ant script working (in ant 1.5 beta). But why would starting client in new JVM help?!

                Darko