昨天修改了项目中一个EJB实现类,重新编译,然后发布,发布成功,看来一切都是好好的。然后启动客户端进行测试。怪事出现了,只要一调用EJB,控制台就报如下错误:
<BEA-010051> <EJB Exception occurred during invocation from home: cn.com.pansky.xmdswz.system.idgenerator.IDGeneratorEJB_ducnu_HomeImpl@165a43b threw exception: java.lang.IncompatibleClassChangeError
java.lang.IncompatibleClassChangeError
at cn.com.pansky.xmdswz.system.idgenerator.IDGeneratorEJBBean.getPlBxhByJsqlxAndZlx(IDGeneratorEJBBean.java:64)
at cn.com.pansky.xmdswz.system.idgenerator.IDGeneratorEJB_ducnu_EOImpl.getPlBxhByJsqlxAndZlx(IDGeneratorEJB_ducnu_EOImpl.java:100)
at cn.com.pansky.xmdswz.system.idgenerator.IDGeneratorEJB_ducnu_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
at cn.com.pansky.xmdswz.system.idgenerator.IDGeneratorEJB_ducnu_EOImpl_814_WLStub.getPlBxhByJsqlxAndZlx(Unknown Source)
at cn.com.pansky.xmdswz.utility.SequenceUtility.getPlBxhByJsqlxAndZlx(SequenceUtility.java:76)
at cn.com.pansky.xmdswz.utility.SequenceUtility.getPlBxhByJsqlxAndZlx(SequenceUtility.java:54)
at cn.com.pansky.xmdswz.wssb.service.WssbService.getPlBxhByJsqlxAndZlx(WssbService.java:61)
at cn.com.pansky.xmdswz.wssb.manager.DfsfMgr.add(DfsfMgr.java:72)
at cn.com.pansky.xmdswz.wssb.command.Dfsf_addCmd.perform(Dfsf_addCmd.java:34)
at cn.com.pansky.xmdswz.system.frameext.BaseCmd.execute(BaseCmd.java:213)
at cn.com.ebis.frame.busirealization.facade.CommandBean.sessionProcess(CommandBean.java:169)
at cn.com.ebis.frame.busirealization.facade.CommandBean.execute(CommandBean.java:66)
at cn.com.ebis.frame.busirealization.facade.Command_azsdjk_EOImpl.execute(Command_azsdjk_EOImpl.java:100)
at cn.com.ebis.frame.busirealization.facade.Command_azsdjk_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
at cn.com.ebis.frame.busirealization.facade.Command_azsdjk_EOImpl_814_WLStub.execute(Unknown Source)
at cn.com.ebis.frame.msgRouter.MsgRouter.execute(MsgRouter.java:142)
at cn.com.ebis.frame.action.FrameAction.myPerformIt(FrameAction.java:266)
at cn.com.ebis.frame.action.FrameAction.performIt(FrameAction.java:60)
at cn.com.ebis.frame.action.ActionBase.perform(ActionBase.java:85)
at cn.com.ebis.frame.action.ActionBase.execute(ActionBase.java:26)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at cn.com.pansky.xmdswz.system.frameext.BaseRequestProcessor.processActionPerform(BaseRequestProcessor.java:82)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at cn.com.pansky.xmdswz.protal.sso.SSOFilter.doChain(SSOFilter.java:268)
at cn.com.pansky.xmdswz.protal.sso.SSOFilter.doFilter(SSOFilter.java:147)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
>
真是怪事,类不兼容错误??应用中的类都是用JDK1.4编译的,怎么会不兼容?于是把EJB重新打包、重新布署,这样来来回回折腾好多次,问题依然存在,到底是碰到了哪个筋?百思不得其解。
想来想去,后来实然想到在发布时,为了删除重复类文件,当时脑袋一热就把客户端类jar包中把EJB的那几个类删除了,会不会这个原因呢?于是就把那几个EJB的class文件重新放到客户端类jar包中,再启动测试,问题解决了。
这个问题原因其实挺简单,但花了那么多时间来处理,主要是因为错误提示信息的误导所致。让我崩溃的是为什么系统不提示缺少类文件是提示类不兼容呢?