0 Replies Latest reply on Nov 7, 2012 3:48 PM by Roberto Requena

    Need help invoking EJB 2.0 on JBoss 4.3.0 from JBoss 7.1 client

    Roberto Requena Newbie

      regards,

       

      Please if anyone can help me, I'm trying to invoke an EJB 2.0 that is deployed in JBOSS EAP 4.3 from a 3.0 EJB that is deployed in a JBOSS 7.1 as follows:

       

         

      Hashtable<String, String> env = new Hashtable<String, String>();
                                    env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.as.naming.InitialContextFactory");
                                    env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
                                    env.put(Context.PROVIDER_URL, "remote://10.79.4.60:4447"); // remote machine IP
                                    env.put(Context.SECURITY_PRINCIPAL, "admid");
                                    env.put(Context.SECURITY_CREDENTIALS, "admid");
        
                                    Context context = new InitialContext (env);
      
                                    Object obj = context.lookup("ejb:WorkflowEAR.ear/WorkflowEJB.jar/WorkflowEJB/ServiciosInterfazNegociadoraEJB!ve.gob.mf.sigecof.workflow.negocio.servicios.ServiciosInterfazNegociadoraEJB");
      
                                      ServiciosInterfazNegociadoraEJBHome interfazNegociadoraEJBHome =  (ServiciosInterfazNegociadoraEJBHome) PortableRemoteObject.narrow(obj, ServiciosInterfazNegociadoraEJBHome.class);
                                    ServiciosInterfazNegociadoraEJB interfazNegociadoraEJB = interfazNegociadoraEJBHome.create();
      
      

       

      but this code gives me the following error:

       

      15:59:26,291 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) javax.naming.NamingException: Could not load ejb proxy class ve.gob.mf.sigecof.workflow.negocio.servicios.ServiciosInterfazNegociadoraEJB [Root exception is java.lang.ClassNotFoundException: ve.gob.mf.sigecof.workflow.negocio.servicios.ServiciosInterfazNegociadoraEJB from [Module "deployment.CargaPresupuesAutomatico-ear.ear.CargaPresupuesAutomatico-ejb-0.0.1-SNAPSHOT.jar:main" from Service Module Loader]]
      15:59:26,293 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:108)
      15:59:26,293 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.ejb.client.naming.ejb.EjbNamingContext.lookup(EjbNamingContext.java:96)
      15:59:26,294 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.ejb.client.naming.ejb.EjbNamingContext.lookup(EjbNamingContext.java:76)
      15:59:26,294 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:100)
      15:59:26,295 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)
      15:59:26,295 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at javax.naming.InitialContext.lookup(InitialContext.java:392)
      15:59:26,295 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at ve.gob.oncop.cpa.servicios.CargaPresupuestoAutomaticoBean.validarUsuario(CargaPresupuestoAutomaticoBean.java:273)
      15:59:26,296 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:59:26,296 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:59:26,297 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:59:26,297 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at java.lang.reflect.Method.invoke(Method.java:597)
      15:59:26,297 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)
      15:59:26,298 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,298 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374)
      15:59:26,299 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:127)
      15:59:26,299 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:135)
      15:59:26,300 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)
      15:59:26,300 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,301 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
      15:59:26,301 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)
      15:59:26,301 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,302 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
      15:59:26,303 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,303 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:105)
      15:59:26,304 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:56)
      15:59:26,304 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,304 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:82)
      15:59:26,305 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,305 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
      15:59:26,306 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,306 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
      15:59:26,307 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
      15:59:26,307 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,307 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
      15:59:26,308 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,308 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
      15:59:26,309 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,309 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
      15:59:26,310 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,310 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
      15:59:26,311 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,311 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)
      15:59:26,311 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,312 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
      15:59:26,312 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      15:59:26,313 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
      15:59:26,313 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
      15:59:26,313 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.webservices.invocation.AbstractInvocationHandlerEJB.invoke(AbstractInvocationHandlerEJB.java:112)
      15:59:26,314 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)
      15:59:26,314 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)
      15:59:26,315 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
      15:59:26,315 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      15:59:26,315 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      15:59:26,316 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      15:59:26,316 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
      15:59:26,317 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
      15:59:26,317 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      15:59:26,317 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      15:59:26,318 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
      15:59:26,318 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)
      15:59:26,319 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)
      15:59:26,319 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
      15:59:26,319 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
      15:59:26,320 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
      15:59:26,320 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      15:59:26,321 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
      15:59:26,321 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)
      15:59:26,321 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      15:59:26,322 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
      15:59:26,322 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      15:59:26,323 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
      15:59:26,323 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
      15:59:26,323 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
      15:59:26,324 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
      15:59:26,324 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      15:59:26,325 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      15:59:26,325 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
      15:59:26,325 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
      15:59:26,326 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
      15:59:26,326 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
      15:59:26,327 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at java.lang.Thread.run(Thread.java:662)
      15:59:26,327 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) Caused by: java.lang.ClassNotFoundException: ve.gob.mf.sigecof.workflow.negocio.servicios.ServiciosInterfazNegociadoraEJB from [Module "deployment.CargaPresupuesAutomatico-ear.ear.CargaPresupuesAutomatico-ejb-0.0.1-SNAPSHOT.jar:main" from Service Module Loader]
      15:59:26,328 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
      15:59:26,328 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
      15:59:26,329 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
      15:59:26,329 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
      15:59:26,330 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
      15:59:26,330 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
      15:59:26,331 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at java.lang.Class.forName0(Native Method)
      15:59:26,331 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at java.lang.Class.forName(Class.java:247)
      15:59:26,331 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:106)
      15:59:26,332 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)           ... 80 more
      

       

      If anyone has a suggestion thank you very much.