2012-10-09 45 views
0

當我在Eclipse中添加PrimeFaces罐子典型的動態Web項目,我得到以下錯誤:JBOSS 7.1:添加Primefaces支撐防止部署

15:44:40,338 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015003: Found FileUploadTest.war in deployment directory. To trigger deployment create a file called FileUploadTest.war.dodeploy 
15:44:40,338 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "FileUploadTest.war" 
15:44:40,339 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."FileUploadTest.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."FileUploadTest.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "FileUploadTest.war" 
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_35] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_35] 
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_35] 
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011093: Could not load component class org.primefaces.webapp.filter.FileUploadFilter 
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:113) 
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54) 
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final] 
    ... 5 more 
Caused by: java.lang.ClassNotFoundException: org.primefaces.webapp.filter.FileUploadFilter from [Module "deployment.FileUploadTest.war:main" from Service Module Loader] 
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) 
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) 
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:111) 
    ... 7 more 

15:44:40,386 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "FileUploadTest.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"FileUploadTest.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"FileUploadTest.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"FileUploadTest.war\""}} 
15:44:40,402 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report 
JBAS014777: Services which failed to start:  service jboss.deployment.unit."FileUploadTest.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."FileUploadTest.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "FileUploadTest.war" 

15:44:40,402 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"FileUploadTest.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"FileUploadTest.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"FileUploadTest.war\""}}}} 
15:44:40,417 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment FileUploadTest.war in 9ms 

我已經添加commons-fileupload-1.2.1.jar以及commons-io-1.4.jar。不知道問題可能是什麼。我也提到了Error deploying Primefaces application on JBoss 7.1.0,並嘗試在web.xml中添加「context-param」值,但無濟於事。

+0

它看起來像你缺少PrimeFaces依賴項。你可以添加WAR的結構嗎? –

+0

@ JamesR.Perkins這是一個標準的日食動態Web項目。我只將PrimeFaces.jar,commons-fileupload-1.2.1.jar以及commons-io-1.4.jar添加到構建路徑中。這就是全部 –

回答

1

我想出了我做錯了什麼。我通過做

Right click project->Build Path->Configure Build Path->Java Build Path添加了JAR文件(primefaces,commons-fileupload-1.2.1和commons-io-1.4),並在其中添加了JAR。

我需要將它們添加到...->Configure Build Path->Deployment Assembly

我想我需要學習如何使用Eclipse :)

+1

或者只是使用像Maven這樣的構建工具:-) –