2

我有以下设置:

Tomcat --WEB-SERVICE--> JBoss Proxy --EJB--> JBoss Back End

如果我在 JBoss 后端重新部署应用程序而不在代理上重新部署代码,则代理对后端 EJB 的后续调用将失败,日志中出现以下错误:

2012-05-11 08:40:31,907 ERROR [com.mycompany.ProxyImplI] (http-0.0.0.0-18880-2) Error method findUser null
java.lang.reflect.UndeclaredThrowableException
    at $Proxy360.findUser(Unknown Source)
    at com.mycompany.ProxyImplI.findUser(ProxyImplI.java:622)
    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.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
    at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
    at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
    at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
    at sun.reflect.GeneratedMethodAccessor307.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
    ... snip ...
Caused by: org.jboss.aop.NotFoundInDispatcherException: Object with oid: jboss.j2ee:ear=backend.ear,jar=backend-internal-services-6.1.6-SNAPSHOT.jar,name=UserAccountsServiceImplI,service=EJB3 was not found in the Dispatcher
    at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:85)
    at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
    at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
    at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
    at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:211)
    at org.jboss.remoting.Client.invoke(Client.java:1724)
    at org.jboss.remoting.Client.invoke(Client.java:629)
    at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
    at $Proxy375.invoke(Unknown Source)
    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
    at $Proxy360.findUser(Unknown Source)
    at com.mycompany.ProxyImplI.findUser(ProxyImplI.java:622)
    ...snip...

其他有用的信息:

  • JBoss 5.1.0,在非标准端口上运行*,禁用了一些未使用的服务,添加了 Metro Web Services 3.2.1
  • Tomcat 6.0.14(看不到这真的会影响任何东西)
  • JDK 1.6.0_18
  • 被调用的 bean 是@Stateless

我很确定应该可以在不重新部署代理的情况下重新部署后端。

目前我们通过重新部署代理服务器来绕过它,但我们宁愿不必这样做。

有没有办法使org.jboss.aop.Dispatcher类中已经存在的引用无效,还是有另一种方法可以采取?


  • 我见过这个错误,它在使用非标准端口时提到了类似的问题,但它适用于 JBoss 4.0.4。
4

0 回答 0