Llamada ejb remota de tomcat6 a jboss5 que causa: No se pudo desreferenciar la excepción del objeto

Estoy usando Jboss5.1, Tomcat 6, Ejb3.0

Estaba tratando de hacer una llamada remota Ejb simple desde el servlet Tomcat6 al bean sin estado remoto que se implementó en Jboss5.1.

Agregué todos los frascos necesarios al directorio tomcat lib. y aún después de mucha lucha, aparece este error al intentar buscar

Esa es la excepción:

javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
      at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:803)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.MomSetUp.setUp(MomSetUp.java:46)
      at org.apache.jsp.test.test_jsp._jspService(test_jsp.java:58)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.reflect.UndeclaredThrowableException
      at $Proxy0.createProxyBusiness(Unknown Source)
      at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
      at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
      at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
      at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
      ... 23 more
Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:453)
      at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:352)
      at org.jboss.remoting.Client.connect(Client.java:512)
      at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:59)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
      ... 30 more
Caused by: java.lang.NoSuchMethodError: org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(Ljava/lang/Object;Ljava/util/Properties;Z)V
      at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.mapJavaBeanProperties(MicroSocketClientInvoker.java:1280)
      at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.setup(MicroSocketClientInvoker.java:496)
      at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.<init>(MicroSocketClientInvoker.java:275)
      at org.jboss.remoting.transport.socket.SocketClientInvoker.<init>(SocketClientInvoker.java:78)
      at org.jboss.remoting.transport.socket.TransportClientFactory.createClientInvoker(TransportClientFactory.java:39)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:453)
      at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:352)
      at org.jboss.remoting.Client.connect(Client.java:512)
      at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:59)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
      at $Proxy0.createProxyBusiness(Unknown Source)
      at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
      at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
      at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
      at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:803)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.MomSetUp.setUp(MomSetUp.java:46)
      at org.apache.jsp.test.test_jsp._jspService(test_jsp.java:58)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:619)
      at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)

este es mi cliente tomcat:

 public void setUp() throws Exception {
                try {

                      Properties p = new Properties();
                      p.put(Context.INITIAL_CONTEXT_FACTORY,
                                  "org.jnp.interfaces.NamingContextFactory");
                      p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");

                      p.put(Context.PROVIDER_URL, "192.168.200.32:1099"); // if not using


                      InitialContext context = new InitialContext(p);

                      // String lookupStr = "Mom/DispactherBeanRemote/remote";
                      String lookupStr = "DispactherBean/remote";
                      //System.out.println("lookup =" + context.lookup(lookupStr));

                      DispactherBeanRemote dispactherBean = (DispactherBeanRemote) context
                                  .lookup(lookupStr);
                      // Object dispactherBean = context.lookup(lookupStr);

                      System.out.println("dispactherBean ="
                                  + dispactherBean.getClass().getCanonicalName());

                } catch (Exception e) {
                      e.printStackTrace();


          }

este es mi bean sin estado ejb y su interfaz:

Stateless
@Remote(
{ DispactherBeanRemote.class })
@RemoteBinding(jndiBinding = "DispactherBean")
public class DispactherBean implements DispactherBeanRemote, Serializable
{
...
}




@Remote
public interface DispactherBeanRemote
{

    public MomDispatcherResponseMsgDTO dispatchMsg(MomDispatcherRequestMsgDTO momMessageRequestDTO);

}

gracias, ray.

preguntado el 03 de mayo de 12 a las 13:05

1 Respuestas

Necesita agregar jars ejb3 al proyecto para analizar los objetos.

contestado el 06 de mayo de 12 a las 13:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.