Web App(Struts框架) - Java - ClassNotFoundException错误

时间:2015-09-17 18:02:52

标签: java weblogic struts intellij-14

我正在使用Struts 1.x框架在现有Web App中创建一些Java类。我使用IntelliJ和Java语言。在错误日志中,显示以下2个错误:

  

ERROR 2015-09-17 13:31:11,668 org.apache.struts.util.RequestUtils - 创建类test.web.approvals.forms.TestingForm的表单bean时出错   java.lang.ClassNotFoundException:test.st.web.approvals.forms.TestingForm       在weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)       在weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)       在weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)       at java.lang.ClassLoader.loadClass(ClassLoader.java:247)       在weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)       在weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)       在org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)       在org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)       在org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:837)       在org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)       在org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)       在test.st.web.base.OWSRequestProcessor.process(OWSRequestProcessor.java:183)       在org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)       在org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:509)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:707)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:821)       在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:227)       在weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)       在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)       在weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)       在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)       在test.st.web.access.sso.LoginCacFilter.doFilter(LoginCacFilter.java:53)       在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)       at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)       at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.run(WebAppServletContext.java:3696)       在weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)       在weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)       在weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)       在weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)       在weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)       在weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)       在weblogic.work.ExecuteThread.run(ExecuteThread.java:221)   错误2015-09-17 13:31:11,668 org.apache.struts.action.RequestProcessor - 无法创建路径/ test_inbox的操作实例   java.lang.ClassNotFoundException:test.st.web.approvals.actions.TestingInboxAction       在weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)       在weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)       在weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)       at java.lang.ClassLoader.loadClass(ClassLoader.java:247)       在weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)       在weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)       在org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)       在org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)       在org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:326)       在org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:268)       在test.st.web.base.OWSRequestProcessor.process(OWSRequestProcessor.java:183)       在org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)       在org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:509)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:707)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:821)       在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:227)       在weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)       在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)       在weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)       在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)       在test.st.web.access.sso.LoginCacFilter.doFilter(LoginCacFilter.java:53)       在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)       at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)       at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.run(WebAppServletContext.java:3696)       在weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)       在weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)       在weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)       在weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)       在weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)       在weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)       在weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

我该如何解决这些错误?

1 个答案:

答案 0 :(得分:0)

就像提到的例外情况一样:

类TestingForm不在目录下:  test.web.approvals.forms

必须位于WEB-INF / classes下或WEB-INF / lib下的jar文件中