2011-08-22 69 views
0

我想在Netbeans IDE本地運行我的javaEE站點。我相信我擁有了一切設置正確,但我收到以下錯誤:從本地的NetBeans運行javaEE

Initializing... deploy?DEFAULT=C:\Documents and Settings\nicholasr\Desktop\Work Notes\temp code files\ASP\build\web&name=ASP&force=true failed on GlassFish Server 3.1 Error occurred during deployment: Exception while deploying the app [ASP] : Servlet [Resource Servlet] and Servlet [Persistent Faces Servlet] have the same url pattern: [/xmlhttp/*]. Please see server.log for more details. C:\Documents and Settings\nicholasr\Desktop\Work Notes\temp code files\ASP\nbproject\build-impl.xml:871: The module has not been deployed. at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:187) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154) BUILD FAILED (total time: 58 seconds)

我已經做了在網上一番搜索,但沒有看到任何相關的鏈接。有誰知道爲什麼我會得到這個錯誤,以及如何解決?如有需要,我可以提供任何其他信息。謝謝!

回答

2

Error occurred during deployment: Exception while deploying the app [ASP] : Servlet [Resource Servlet] and Servlet [Persistent Faces Servlet] have the same url pattern: [/xmlhttp/]*

您似乎正在使用IceFaces。我不做IceFaces,但錯誤消息表明它們不應該映射到完全相同的URL模式。我做了一些小的研究,並根據下列文件...

...我只能得出這樣的結論 「持續面孔的Servlet」是IceFaces 1.8.x的典型代碼,「資源Servlet」是IceFaces 2.x的典型代碼。你應該使用這一個或另一個,而不是兩個。我認爲你的目標是IceFaces 2.x,所以你應該擺脫你的web.xml中的「Persistent Faces Servlet」的聲明和映射。

+0

嗯,我剛剛在web.xml中發現它,就像你說的。我使用的是ICEfaaces 1.8.x,所以我剛剛擺脫了「資源Servlet」。現在我得到了一個新的錯誤:D –

+0

不客氣。對於新的問題/問題,只要在有新問題時就按右側頂部的「提問問題」按鈕,您就會陷入困境。提示:類路徑中缺少該類(但您顯然不需要它,您是否忘記刪除它的「」條目?) – BalusC

+0

我不需要它嗎?我很確定我的確如此 –