admin管理员组文章数量:1125112
I am working on a project inglobing three modules: ear, ejb and web. The clean and build command in netbeans works and each module is built successfully. When I try to deploy the .ear package just built on my local payara server, the deploy fails and the server.log error says:
[Payara 5.2021.9] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=789 _ThreadName=admin-thread-pool::admin-listener(26)] [timeMillis: 1736417429711] [levelValue: 800]
[[Exception Occurred :Error occurred during deployment: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 22; Deployment descriptor file META-INF/application.xml in archive [APPNAME-ear-1.0-SNAPSHOT]. cvc-complex-type.2.4.a: Invalid content was found starting with element '{";:library-directory}'. One of '{";:display-name, ";:icon, ";:initialize-in-order, ";:module}' is expected.. Please see server.log for more details.]]
Checking on that file, all that I can see is:
<?xml version="1.0" encoding="UTF-8"?>
<application version="6" xmlns="; xmlns:xsi="; xsi:schemaLocation=" .xsd">
<display-name>APPNAME-ear</display-name>
<library-directory>lib</library-directory>
</application>
So I suppose that the value lib is not so appreciated but I cannot understand how it is possible given the fact that the application.xml file is created once the project is built. Could you give me some hints? Thank you in advance
I am working on a project inglobing three modules: ear, ejb and web. The clean and build command in netbeans works and each module is built successfully. When I try to deploy the .ear package just built on my local payara server, the deploy fails and the server.log error says:
[Payara 5.2021.9] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=789 _ThreadName=admin-thread-pool::admin-listener(26)] [timeMillis: 1736417429711] [levelValue: 800]
[[Exception Occurred :Error occurred during deployment: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 22; Deployment descriptor file META-INF/application.xml in archive [APPNAME-ear-1.0-SNAPSHOT]. cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://java.sun.com/xml/ns/javaee":library-directory}'. One of '{"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.]]
Checking on that file, all that I can see is:
<?xml version="1.0" encoding="UTF-8"?>
<application version="6" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd">
<display-name>APPNAME-ear</display-name>
<library-directory>lib</library-directory>
</application>
So I suppose that the value lib is not so appreciated but I cannot understand how it is possible given the fact that the application.xml file is created once the project is built. Could you give me some hints? Thank you in advance
Share Improve this question asked 2 days ago Patrick PalmeriniPatrick Palmerini 114 bronze badges1 Answer
Reset to default 0I have found the issue: the problem was inside the pom.xml of the ear module
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>APPNAME-ejb</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>APPNAME-web</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies>
these dependencies after build block in the xml file were not added; after the edit the error disappeared.
本文标签: deploymentDeploy ear (Payara Server 520219Netbeans 125Maven 363)Stack Overflow
版权声明:本文标题:deployment - Deploy ear (Payara Server 5.2021.9Netbeans 12.5Maven 3.6.3) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736651454a1946149.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论