2 Replies Latest reply on Sep 10, 2003 8:58 AM by sateesh

    Unable to Access a Stateless Session Bean

    sateesh

      Hi,

      i have deployed a cust.jar file in jboss 3.2 App server.
      when i am trying accesses it is saying JasperException.
      at my EJB Home Interface.


      The following code when i kept in a jsp(.war file) it is
      working fine.even when i am running it from command prompt making a java Client , it is working fine.

      when i kept the following code in EJBHF.java , from a jsp i am taking instance of EJBHF calling the following code it is not working..

      for which .jar files i need to set classpath to run a stateless session bean.



      can you please tell me what is the reason.





      Properties properties = new Properties();
      String s = "x";
      String s1 = "y";

      properties.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      properties.put("java.naming.provider.url", "jnp://localhost:1099/");
      properties.put("java.naming.security.principal", s);
      properties.put("java.naming.security.credentials", s1);
      InitialContext lContext=new InitialContext(properties);
      Object lObject = lContext.lookup( "/sf/CustServiceSF" );
      CustServiceSFHome custServiceSFHome = (CustServiceSFHome)PortableRemoteObject.narrow(lObject,CustServiceSFHome.class);
      CustServiceSF custServiceSF = custServiceSFHome.create();
      val=custServiceSF.getServiceRequestCode();

      regards,
      sateesh

        • 1. Re: Unable to Access a Stateless Session Bean

          There is a jbossall-client.jar in /client

          Regards,
          Adrian

          • 2. Re: Unable to Access a Stateless Session Bean
            sateesh

            Hi ,

            Thanx a lot

            first i set the classpath to jbossall-client.jar

            it was saying NoClassDefFoundError one bye one as follows



            java.lang.NoClassDefFoundError: org/jboss/mx/util/Serialization
            org/jboss/logging/Logger
            EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
            org.jboss.system.server.ServerInfo
            org/jboss/security/auth/login/XMLLoginConfigImpl
            gnu/regexp/UncheckedRE

            finally i set the classpath to following jars depending upon the NoClassDefFoundError

            Classpath:

            ..\client\client\jbossall-client.jar;..\lib\jboss-jmx.jar;..\lib\jboss-common.jar;..\lib\concurrent.jar;..\lib\jboss-system.jar;..\client\jbosssx-client.jar;..\lib\gnu-regexp.jar

            Now it is working fine i am able to accesses the BEAN ,but it is showing the following exception on console.


            13:01:10,818 WARN [XMLLoginConfigImpl] Failed to load config: file:/D:/javasoft/jboss-3.2.2RC2/ser
            org.jboss.security.auth.login.ParseException: Encountered "<?xml" at line 1, column 1.
            Was expecting one of:

            ...

            at org.jboss.security.auth.login.SunConfigParser.generateParseException(SunConfigParser.jav
            at org.jboss.security.auth.login.SunConfigParser.jj_consume_token(SunConfigParser.java:327)
            at org.jboss.security.auth.login.SunConfigParser.config(SunConfigParser.java:98)
            at org.jboss.security.auth.login.SunConfigParser.parse(SunConfigParser.java:57)
            at org.jboss.security.auth.login.SunConfigParser.doParse(SunConfigParser.java:79)
            at org.jboss.security.auth.login.XMLLoginConfigImpl.loadSunConfig(XMLLoginConfigImpl.java:2
            at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:255)
            at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginConfigImpl.java:231)
            at org.jboss.security.auth.login.XMLLoginConfig.startService(XMLLoginConfig.java:152)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:28
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:394)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:28
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
            at $Proxy5.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:632)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:28
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
            at $Proxy6.deploy(Unknown Source)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:383)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:290)
            at org.jboss.Main.boot(Main.java:150)
            at org.jboss.Main$1.run(Main.java:388)
            at java.lang.Thread.run(Thread.java:484)
            13:01:11,178 INFO [XMLLoginConfig] Started

            once again than you very much for throwing some light in my way.

            warm regards,
            sateesh