重新编译后WebLogic 10.3.3中的java.lang.ClassCastException
在编辑一些代码时,开发人员在 Weblogic 10.3.3 中重新编译后注意到此错误。底层对象是 DimensionLabel。我们在 Weblogic 9.2 中尝试了这一点,它工作得很好,没有例外。开发人员只需重新编译调用 DimensionLabel SearchServiceProcessor 的类并重新运行应用程序。
net.nrj.service.SearchServiceProcessor java.lang.ClassCastException: net.nrj.alf.DimensionLabel
java.lang.ClassCastException: net.nrj.alf.DimensionLabel
at net.nrj.service.SearchServiceProcessor.setRefinements(SearchServiceProcessor.java:911)
at net.nrj.service.SearchServiceProcessor.process(SearchServiceProcessor.java:134)
at net.nrj.service.ServiceController.processRequest(ServiceController.java:323)
at net.nrj.service.ServiceController.doGet(ServiceController.java:307)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:529)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:719)
at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:591)
at weblogic.servlet.FileServlet.findSource(FileServlet.java:270)
at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:191)
at weblogic.servlet.FileServlet.service(FileServlet.java:173)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
这是我的代码:
DimensionLabel dimLabel = (DimensionLabel);
dimensionLabel.get(currentDimension.getName());
currentRefinementDimension = new Refinement(); // Exception here
currentRefinementDimension.setExpanded(true);
我调试了代码,并且散列表维度标签中有一个维度标签。
While editing some code a developer noticed this error after a recompile in Weblogic 10.3.3. And the underlying object is a DimensionLabel. And we tried this in Weblogic 9.2 and it works fine with no exception. The developer simply recompiled the class calling the DimensionLabel the SearchServiceProcessor and reran the application.
net.nrj.service.SearchServiceProcessor java.lang.ClassCastException: net.nrj.alf.DimensionLabel
java.lang.ClassCastException: net.nrj.alf.DimensionLabel
at net.nrj.service.SearchServiceProcessor.setRefinements(SearchServiceProcessor.java:911)
at net.nrj.service.SearchServiceProcessor.process(SearchServiceProcessor.java:134)
at net.nrj.service.ServiceController.processRequest(ServiceController.java:323)
at net.nrj.service.ServiceController.doGet(ServiceController.java:307)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:529)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:719)
at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:591)
at weblogic.servlet.FileServlet.findSource(FileServlet.java:270)
at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:191)
at weblogic.servlet.FileServlet.service(FileServlet.java:173)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Here is my code :
DimensionLabel dimLabel = (DimensionLabel);
dimensionLabel.get(currentDimension.getName());
currentRefinementDimension = new Refinement(); // Exception here
currentRefinementDimension.setExpanded(true);
I debugged into the code and the hashtable dimensionLabel has a DimensionLabel in it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您可以调试代码,请检查您的类是从哪里调用的。通常你需要调用
这会告诉你加载类的jar。检查是否存在jar冲突(旧jar等)
If you can debug into the code then check from where your class is being called from. Generally you need to call
This will tell you the jar from which your classes are loaded. Check if there is a jar conflict(old jar etc.)