gpt4 book ai didi

java - WELD-000119 : Not generating any bean definitions from because of underlying class loading error

转载 作者:行者123 更新时间:2023-11-30 08:03:28 26 4
gpt4 key购买 nike

我是 MyEclipse 和 Java EE 的新手

我正在尝试在 wildfly 8.0.0 上部署我的网络应用程序。在 MyEclipse 中。

不幸的是,我在从 SVN 进行了一些代码更改后遇到了这个错误(我不确定这是原因),在此之前它工作正常:

[org.jboss.weld.Bootstrap] (weld-worker-2) WELD-000119: Not generating any bean definitions from (.....) because of underlying class loading error: Type WebArchive from [Module "deployment.Test.war:main" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.

当我(运行)服务器时,部署成功,尽管控制台产生了一些相同的错误行,但是当我(调试)服务器时,它一直产生相同的错误。

谁能帮帮我

谢谢。

最佳答案

可能是类加载器找不到“WebArchive”,因为需要将其作为模块添加到WildFly配置中。你这样做:

module add --name=org.apache.commons.lang3.commons-lang3 --resources=C:\Users\b\.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar

此外,您可能需要将 WebArchive 添加为 <build> 中的依赖项pom.xml 的一部分。

这是我的 pom.xml 的相关部分:

  <build>
<!-- Maven will append the version to the finalName (which is the name
given to the generated WAR, and hence the context root) -->
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<!-- Java EE doesn't require web.xml, Maven needs to catch up! -->
<failOnMissingWebXml>false</failOnMissingWebXml>
<archive>
<manifestEntries>
<Dependencies>com.fasterxml.jackson.datatype.jackson-datatype-jsr310,org.hibernate,org.apache.commons.lang3.commons-lang3</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- The WildFly plug-in deploys the WAR to a local WildFly container -->
<!-- To use, run: mvn package wildfly:deploy -->
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version>
</plugin>
</plugins>
</build>

如果您无法弄清楚,请尝试发布您的 pom.xml 和 jboss-deployment-structure.xml(如果您有的话)。

关于java - WELD-000119 : Not generating any bean definitions from because of underlying class loading error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36287993/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com