问题描述
异常如下:java.lang.NoClassDefFoundError: com/jacob/activeX/ActiveXComponentat com.app.checkTemplate.MSWordManager.<init>(MSWordManager.java:124)at jsp_servlet._datacheck.__testword._jspService(__testword.java:251)at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:391)at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309)at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)at app.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:170)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3212)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:1983)at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)代码是之前几个月写的,现在做修改居然在项目里面运行不了。是weblogic设置的问题。jacob.dll在system32和jdk/bin以及weblogic安装目录bin文件夹下都拷贝了。jar包也已经加了。另外,在java Application下能运行。在web项目中报错。
解决方案
请把有关的jar放在${weblogic_home}user_projectsdomains{domain_name}lib下
解决方案二:
java.lang.NoClassDefFoundError: com/jacob/activeX/ActiveXComponent 你看看是不是没这个文件