2017-02-05 93 views
0

我试图创建的IntelliJ IDEA一个简单的RESTful Web服务,我现在遇到了以下错误:失败部署RESTful Web服务应用程序中使用的IntelliJ IDEA

The content of element 'application' is not complete. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":initialize-in-order, "http://java.sun.com/xml/ns/javaee":module}

我认为是没有必要,这些元素在我的application.xml之前,我突然在部署时遇到了这个问题。

我在我的项目中启用了javaEEApplication和Web构面,部署描述符似乎也设置正确。我将Jersey-2.2作为一个库引用来使用RESTful服务。我的项目还将GlassFish 4.1.1 - RESTful Web Service作为依赖项。

我正在使用从模块自动生成的分解工件,并将运行配置设置为构建,然后构建工件。 glassfish管理员的凭据是正确的。

我想知道为什么我突然遇到这个问题,我虽然IntelliJ会自动生成它需要的部署描述符(application.xml)内的任何必要内容。有没有人有任何想法我失踪?也许我必须将Java EE 6或7作为一个库本身来引用?我迷失在这里。

低于完整的错误日志,以防万一:

"C:\Program Files (x86)\glassfish4\glassfish\bin\asadmin.bat" start-domain domain1 
"C:\Program Files\Java\jdk1.8.0_77\bin\java" -Dfile.encoding=windows-1252 -classpath "C:\Program Files (x86)\glassfish4\glassfish\modules\javax.ejb-api.jar;C:\Program Files..... 
[2017-02-05 03:16:49,423] Artifact CapstoneIntelliJProject:war exploded: Server is not connected. Deploy is not available. 
Detected server admin port: 4848 
Detected server http port: 8080 
Attempting to start domain1.... Please look at the server log for more details..... 
Connected to server 
[2017-02-05 03:16:52,358] Artifact CapstoneIntelliJProject:war exploded: Artifact is being deployed, please wait... 
[2017-02-05 03:16:53,536] Artifact CapstoneIntelliJProject:war exploded: Error during artifact deployment. See server log for details. 
[2017-02-05 03:16:53,537] Artifact CapstoneIntelliJProject:war exploded: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while deploying the app [CapstoneIntelliJProject_war_exploded] : org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 15; Deployment descriptor file META-INF/application.xml in archive [CapstoneIntelliJProject_war_exploded]. cvc-complex-type.2.4.b: The content of element 'application' is not complete. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":initialize-in-order, "http://java.sun.com/xml/ns/javaee":module}' is expected.. Please see server.log for more details. 
"C:\Program Files (x86)\glassfish4\glassfish\bin\asadmin.bat" stop-domain domain1 

Process finished with exit code 0 
Waiting for the domain to stop . 
Command stop-domain executed successfully. 
Disconnected from server 

编辑:我已经解决了这个问题上,具有用于项目使javaEEapplication方面是错误的,因为它只是一个RESTful Web服务。现在我面临一个新问题,输出告诉我Application [CapstoneIntelliJProject_war_exploded] contains no valid components.。服务器日志不包含任何有用的信息。我不知道我的战争出了什么问题,似乎配置得很好。

回答

0

我已通过重新创建战争解决了战争爆炸问题

相关问题