当前位置: 首页 > 知识库问答 >
问题:

Wildfly 17.0.1上的部署问题

苏野
2023-03-14

我想在Wildfly17.0.1.final上部署一个由子模块组成的ear文件。代码可以正确地部署在Wildfly10.1.0.final上,但在Wildfly17.0.1.final上存在问题。我尝试了standalone.xml和standalone-full.xml。在使用standalone.xml进行部署时,我在部署控制台上得到以下错误:-

Service service jboss.ejb.default-resource-adapter-name-service not found

当我在部署控制台上使用standalone-full.xml时,我会得到以下错误:-

{“wflyctl0062:复合操作失败并被回滚。失败的步骤:”=>{“操作步骤-2”=>{“wflyctl0080:失败的服务”=>{“jboss.depl oyment.subunit.\\”myearfile.ear\“.\\”ear-allversion1.0.war\“.POST_MODULE”=>“wflysrv0153:未能处理子部署的阶段POST_MODULE\\”ear-allversion1.0.war\“部署的阶段POST_MODULE\\\”myearfile.ear\“,原因是:validator/internal/util/logging/log;”,“jbo ss.deployment.subunit.\\myearfile.ear\\\\earmobile-allversion1.0.war\\.POST_MODULE”=>wflysrv0153:未能处理subdeployment的阶段POST_MODULE\\earm未安装:“=>[”jboss.naming.context.java.comp.myearfile.\“ejbdbfinder-allversion1.0\”.changebasicdatabaseData“,”jboss.namin g.context.java.comp.myearfile.\“ejbdbfinder-allversion1.0\”.messegeConsumer“,.......................

我不知道如何解决它。我试图从pom中删除sl4j依赖项,但仍然没有工作。我使用eclipse ide来实现这一点,并只是为wildfly安装了jboss工具,因为其他jboss工具没有安装。所以请让我知道我需要如何升级来部署代码并使其运行。如果我需要为此指定更多细节,请让我知道。

下面是我正在使用的Hibernate依赖项:-

在DB模块中:-

<dependency>
        <groupId>org.hibernate.javax.persistence</groupId>
        <artifactId>hibernate-jpa-2.1-api</artifactId>
        <version>1.0.0.Final</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>4.0.1.Final</version>

    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId> hibernate-core</artifactId>
        <version>4.0.1.Final</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-ehcache</artifactId>
        <version>4.0.1.Final</version>
    </dependency>
<!--In other Module:--->
<dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>3.5.1-Final</version>
            <scope>compile</scope>
        </dependency>

任何帮助都是可以接受的。

共有1个答案

宋昕
2023-03-14

我找到了解决方案。这就是我如何实现目标的:-

    <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-ehcache</artifactId>
            <version>5.4.2.Final</version>
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>6.0.16.Final</version>
        </dependency>

            <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <version>3.4.0.Final</version>
        </dependency>
<dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-weld</artifactId>
            <version>17.0.1.Final</version>
        </dependency>

将jboss-logging从hibernate-ehcache中排除,更改wildfly依赖项并包括hibernate-validation依赖项解决了我的问题。

 类似资料:
  • 在jboss上部署spring boot项目之后,除了我的日程安排任务之外,一切都很顺利。我在我的schedule方法类中用@enablescheduling和@component注释了我的主类,在我的方法中用@scheduled注释了我的主类。但在jboss上成功运行且无错误后,我的计划任务不会启动。我真的需要一个解决方案。Tnx下面的每个主体都是我的配置类和日程类:

  • 如果我使用Tomcat9.0.33将它部署到windows服务器上的tomcat,这也可以正常运行。 然而,当我将它部署到ubuntu上的Tomcat9.0.16或9.0.24时,它并没有启动。catalina.log显示了以下内容,我试着取消对编译“org.springframework.boot:spring-boot-starter-tomcat”的注释,并将其更改为提供的“org.spri

  • 使用 Hangfire.HttpJob 版本需 >= 3.0.2 1. 添加依赖 TimeZoneConverter 到您的项目中 2.在 Startup.cs 中配置 Hangfire.HttpJob 时指定时区参数 参考代码:https://github.com/yuzd/Hangfire.HttpJob/blob/master/Test/TestSqlserver/Startup.cs#L6

  • 我正在Windows 8.1 64位上开发JavaFX8应用程序,带有4GB内存,使用的是运行JDK 8u25 64位版本的Netbeans 8.0.2。 应用平台是JDK版本8u25 32位,问题是当我构建项目时,应用程序运行正常,但当我做本机打包时,我可以为应用程序提供32位JRE和exe文件。 “由于配置问题,已跳过捆绑程序Windows应用程序映像:FX SDK和JRE运行时之间的位体系结

  • 我有一个NodeJs应用程序,在我的本地机器上运行良好。 现在,我想将它部署在具有给定IP和给定超文本传输协议地址的虚拟机上。 假设服务器的ip地址和http地址分别为134.00.00.00和134.00.00http://server-virtualmachine.is.fr 我能够通过ssh连接到此服务器,并将我的节点JS应用程序发送到 /var/www/ 服务器的主文件是app。所以我执行

  • 我有一个使用Thymeleaf作为模板引擎的Spring Boot应用程序,我添加了一个默认控制器,在服务器上部署时应该重定向到主页,控制器代码片段如下: 索引由 ViewResolver 解析到匹配的网页。 当在独立的Tomcat实例上部署生成的war“app . war”时,应用程序工作正常,我被重定向到主页(localhost:XXX/context _ path/index),“local