5 Replies Latest reply on Jan 17, 2004 10:06 AM by juha

    A problem about invoke ejb from servlet

    mystzhm

      Hi all
      I use jboss2.2.1 under jdk1.4.1 before ,everything is ok . But I update my jdk to jdk1.4.2 yesterday ,and I found I could't invoke my ejb components from servlet in tomcat4.1. How could I deal with this problem ? thanks!!

        • 1. Re: A problem about invoke ejb from servlet
          darranl

          You probably forgot to say the magic words during your installation.

          • 2. Re: A problem about invoke ejb from servlet
            mystzhm

             

            "mystzhm" wrote:
            I'm sorry , I don't know "magic words" means what.
            When I installa jdk ,there is no err,but when the servlet run to the home.create() ,I can catch a err
            java.lang.reflect.UndeclaredThrowableException


            • 3. Re: A problem about invoke ejb from servlet

              You need to post full error description and stack traces when requesting help for your problems.

              • 4. Re: A problem about invoke ejb from servlet
                mystzhm

                I apologize, maybe I didn't express clearly.
                I use tomcat4.1+jboss2.2.1+jdk1.4.1 before, when I update my jdk to jdk1.4.2 , I can't call my ejb componts from tomcat4.1 anymore , the code is like this

                try {
                System.setProperty("java.naming.factory.initial",
                "org.jnp.interfaces.NamingContextFactory");
                System.setProperty("java.naming.provider.url",
                JbossServer);
                InitialContext jndiContext = new InitialContext();
                Object ref = jndiContext.lookup("PtlEjb");
                PtlEjbHome home = (PtlEjbHome)
                PortableRemoteObject.narrow (ref, PtlEjbHome.class);
                ejb = home.create();
                ejb.PTLCdromConv(PTLFile,CSVFile,SelectItem);
                } catch(Exception e) {System.out.println("Connect Jboss server error");
                }
                when it run to "ejb = home.create();" I catch an exception . "java.lang.reflect.UndeclaredThrowableException"

                if I turn back to jdk1.4.1, there is none err

                Please help , thanks

                • 5. Re: A problem about invoke ejb from servlet

                  Still need the full stack trace. The exception name itself gives little to no information.