Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从netbeans maven webapp中的实体类生成RESTful Web服务会导致应用程序失败,显示;Payara服务器,部署,null,false“;_Maven_Jakarta Ee_Jax Rs_Microservices_Payara - Fatal编程技术网

从netbeans maven webapp中的实体类生成RESTful Web服务会导致应用程序失败,显示;Payara服务器,部署,null,false“;

从netbeans maven webapp中的实体类生成RESTful Web服务会导致应用程序失败,显示;Payara服务器,部署,null,false“;,maven,jakarta-ee,jax-rs,microservices,payara,Maven,Jakarta Ee,Jax Rs,Microservices,Payara,我想使用jee 8为我的应用程序创建一个持久性微服务。资源端点与一个简单的PersistenceResource类配合使用效果良好。我已经从mysql数据库中生成了实体,应用程序仍然运行良好。不幸的是,当我从实体类生成RESTful Web服务时,payara服务器无法运行。服务器日志中的消息为 在Payara服务器上部署 配置文件模式:false 调试模式:false 部队重新部署:正确 在/home/nkengasong/NetBeansProjects/CreatixxPersistenc

我想使用jee 8为我的应用程序创建一个持久性微服务。资源端点与一个简单的PersistenceResource类配合使用效果良好。我已经从mysql数据库中生成了实体,应用程序仍然运行良好。不幸的是,当我从实体类生成RESTful Web服务时,payara服务器无法运行。服务器日志中的消息为

在Payara服务器上部署
配置文件模式:false
调试模式:false
部队重新部署:正确
在/home/nkengasong/NetBeansProjects/CreatixxPersistence/target/CreatixxPersistence现场部署
Payara服务器,部署,null,false

当我为实体类生成会话bean时,会显示相同的错误请问有什么问题?我已经在网上搜索了几个小时了

该应用程序是一个传统的maven原型webapp,我正在使用:

NetBeans IDE 9.0

帕亚拉服务器

Java EE 8

打开JDK 11

Ubuntu18.04 lts(在windows 10上也有同样的问题)

下面是我的pom.xml

<?xml version="1.0" encoding="UTF-8"?>

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0

<groupId>com.jee8ng</groupId>
<artifactId>CreatixxPersistence</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>

<name>CreatixxPersistence Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <failOnMissingWebXml>false</failOnMissingWebXml>
</properties>  

<dependencies>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.core</artifactId>
        <version>2.5.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.asm</artifactId>
        <version>2.5.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.antlr</artifactId>
        <version>2.5.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.jpa</artifactId>
        <version>2.5.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.jpa.jpql</artifactId>
        <version>2.5.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>javax.persistence</artifactId>
        <version>2.1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
        <version>2.5.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>8.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.json</groupId>
        <artifactId>javax.json-api</artifactId>
        <version>1.1</version>
        <scope>provided</scope>
    </dependency>      
    <dependency>
        <groupId>javax.json.bind</groupId>
        <artifactId>javax.json.bind-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-annotations</artifactId>
        <version>1.5.16</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>8.0.13</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <finalName>CreatixxPersistence</finalName>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
            <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.2</version>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.2.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.5.2</version>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>
        </plugins>
    </pluginManagement>
</build>
com.jee8ng


我真的需要帮助!请问为什么当我生成Web服务或会话时,应用程序停止运行?我如何补救?提前感谢您。Payara服务器尚未与JDK 11完全兼容。您仍然需要JDK 8版本。

我最终通过切换到NetBeans 8.2并更改默认的@XmlTransient解决了这个问题将实体类的某些字段注释为@JsonbTransient
(如果您打算使用JSON而不是XML,这可以避免stackoverflow错误)。默认情况下,当您从数据库生成实体类时,某些字段会用@XmlTransient进行注释。我切换了netbeans,因为netbeans IDE 9.0显然不稳定。我希望这对某些人有所帮助。感谢大家的帮助!

您有堆栈跟踪吗?是的@Rafael,就是它
在Payara服务器上部署配置文件模式:错误调试模式:错误强制重新部署:在/home/nkengasong/NetBeansProjects/CreatixxPersistence/target/CreatixxPersistence Payara服务器上进行真实就地部署,部署,null,false
@Rafael,这是Payara服务器日志中唯一的堆栈跟踪您是从netbeans部署的吗?这是netbeans本身的输出吗?-检查server.log文件,确保没有引发部署异常。@MarkW是的,我是在netbeans中部署的。没有引发异常只是
Payara服务器,deploy,null,false
Rudy是对的,您需要JDK 8来运行Payara服务器5。计划在明年(2019年)。@OndrejM我将我的jdk降级到JDK1.8,但没有成功。我仍然会遇到同样的错误,我在互联网上尝试了一切,但什么都没有尝试works@CaptainA您能用Maven生成WAR文件吗(例如mvn clean package)并将其部署到NetBeans之外的Payara服务器。然后您应该能够在服务器日志文件中看到真正的异常。您使用的Payara服务器和JDK 8的版本是什么?@RudyDeBusscher我使用的是Payara服务器5.183#badassfish(build 380)&&oracle jdk我认为1.8.0_162符合。错误是:
意外异常优先级:静默类别:错误找不到基本名称sun.util.logging.resources.logging的捆绑包,区域设置en_US