3

当我在 NetBeans 中运行我的项目时一切正常,但是当我尝试部署它时,我收到以下错误:

Error occurred during deployment: 

Exception while loading the app : java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
java.lang.RuntimeException:
com.sun.faces.config.ConfigurationException: Source Document:
jar:file:/C:/Users/User/Downloads/glassfish-4.0/glassfish4/glassfish/domains/domain1/applications/Zaman/WEB-INF/lib/primefaces-3.4.jar!/META-INF/faces-config.xml
Cause: Class 'org.primefaces.component.fileupload.FileUploadRenderer'
is missing a runtime dependency: java.lang.NoClassDefFoundError:
org/apache/commons/fileupload/FileItem. Please see server.log for more
details.

它说原因是:

Cause: Class 'org.primefaces.component.fileupload.FileUploadRenderer'
is missing a runtime dependency: java.lang.NoClassDefFoundError:
org/apache/commons/fileupload/FileItem.

我不知道该怎么办。

4

2 回答 2

3

您应该将Commons Fileupload添加到您的应用程序中。

于 2013-07-30T12:13:20.623 回答
1

看看如何使用 PrimeFaces p:fileUpload?侦听器方法从未被调用或 UploadedFile 为空

您必须将commons-iocommons-fileupload添加到您的类路径

于 2013-07-30T12:16:15.340 回答