从属库ClassNotFoundException

时间:2018-03-02 15:00:19

标签: maven primefaces

我有一个EJB项目,并且我正在使用Primefaces这就是我将Primefaces 6.1包含在pom.xml中的方式:

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>6.1</version>
    <scope>compile</scope>
</dependency>

我可以将我的应用部署到WebLogic 12c并且我的应用程序开始运行但是当我尝试调用任何方法时它会抛出此异常:

java.lang.NoClassDefFoundError: org/primefaces/model/UploadedFile
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetPublicMethods(Class.java:2902)
    at java.lang.Class.getMethods(Class.java:1615)
    at weblogic.iiop.IDLUtils.isAbstractInterface(IDLUtils.java:486)
    at weblogic.iiop.Utils.isAbstractInterface(Utils.java:533)
    at weblogic.corba.rmic.StubGenerator.genWriteParam(StubGenerator.java:376)
    at weblogic.corba.rmic.StubGenerator.genMarshalingCode(StubGenerator.java:334)
    at weblogic.corba.rmic.StubGenerator.generateInnerTryCatch(StubGenerator.java:291)
    at weblogic.corba.rmic.StubGenerator.generateOuterTryCatch(StubGenerator.java:270)
    at weblogic.corba.rmic.StubGenerator.getCodeForMethod(StubGenerator.java:257)
    at weblogic.corba.rmic.StubGenerator.addMethod(StubGenerator.java:251)
    at weblogic.corba.rmic.StubGenerator.addMethods(StubGenerator.java:225)
    at weblogic.corba.rmic.StubGenerator.<init>(StubGenerator.java:74)
    at weblogic.corba.utils.RemoteInfo.createStubs(RemoteInfo.java:314)
    at weblogic.servlet.ClasspathServlet.getIIOPStubClassSource(ClasspathServlet.java:578)
    at weblogic.servlet.ClasspathServlet.getGeneratedClassSource(ClasspathServlet.java:504)
    at weblogic.servlet.ClasspathServlet.findSourceFromApplicationContainer(ClasspathServlet.java:462)
    at weblogic.servlet.ClasspathServlet.findResource(ClasspathServlet.java:367)
    at weblogic.servlet.ClasspathServlet.doGet(ClasspathServlet.java:224)
    at weblogic.servlet.ClasspathServlet.service(ClasspathServlet.java:209)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3432)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused By: java.lang.ClassNotFoundException: org.primefaces.model.UploadedFile
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:357)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:318)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:186)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetPublicMethods(Class.java:2902)
    at java.lang.Class.getMethods(Class.java:1615)
    at weblogic.iiop.IDLUtils.isAbstractInterface(IDLUtils.java:486)
    at weblogic.iiop.Utils.isAbstractInterface(Utils.java:533)
    at weblogic.corba.rmic.StubGenerator.genWriteParam(StubGenerator.java:376)
    at weblogic.corba.rmic.StubGenerator.genMarshalingCode(StubGenerator.java:334)
    at weblogic.corba.rmic.StubGenerator.generateInnerTryCatch(StubGenerator.java:291)
    at weblogic.corba.rmic.StubGenerator.generateOuterTryCatch(StubGenerator.java:270)
    at weblogic.corba.rmic.StubGenerator.getCodeForMethod(StubGenerator.java:257)
    at weblogic.corba.rmic.StubGenerator.addMethod(StubGenerator.java:251)
    at weblogic.corba.rmic.StubGenerator.addMethods(StubGenerator.java:225)
    at weblogic.corba.rmic.StubGenerator.<init>(StubGenerator.java:74)
    at weblogic.corba.utils.RemoteInfo.createStubs(RemoteInfo.java:314)
    at weblogic.servlet.ClasspathServlet.getIIOPStubClassSource(ClasspathServlet.java:578)
    at weblogic.servlet.ClasspathServlet.getGeneratedClassSource(ClasspathServlet.java:504)
    at weblogic.servlet.ClasspathServlet.findSourceFromApplicationContainer(ClasspathServlet.java:462)
    at weblogic.servlet.ClasspathServlet.findResource(ClasspathServlet.java:367)
    at weblogic.servlet.ClasspathServlet.doGet(ClasspathServlet.java:224)
    at weblogic.servlet.ClasspathServlet.service(ClasspathServlet.java:209)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3432)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

我尝试了其他Primefaces版本,但发生了同样的错误。我试图建立没有<scope>compile</scope>没有改变任何东西。我该怎么办?

0 个答案:

没有答案