[英]ClassNotFoundException during the extended module [Wildfly]
I want to extend a class that has already been added as a module in the server Wildfly. 我想扩展已经在服务器Wildfly中作为模块添加的类。 At the time of compilation and development work I added to the project jar (myJar-1.0.jar with com.test.wildfly.TestClass) along with the following: 在进行编译和开发工作时,我将以下内容添加到了项目jar(带有com.test.wildfly.TestClass的myJar-1.0.jar)中:
<dependency>
<groupId>test-group</
<artifactId>test</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/lib/myJar-1.0.jar</systemPath>
</dependency>
Project compiles, deployed and run. 项目进行编译,部署和运行。 But the problem is when I go to the place where is overriding class I'm getting an error 但是问题是当我去上课的地方时遇到错误
Caused by: java.lang.ClassNotFoundException: com.test.wildfly.TestClass from [Module "deployment.testapp-1.00.00.ear:main" from Service Module Loader] 由以下原因导致:java.lang.ClassNotFoundException:com.test.wildfly.TestClass来自[来自服务模块加载程序的模块“ deployment.testapp-1.00.00.ear:main”]
First of all are you sure the method you are trying to override is not declared as final
in myJar-1.0.jar
or maybe something its using is final
. 首先,您确定要覆盖的方法未在myJar-1.0.jar
声明为final
,或者其使用的方法是final
。
If not did you used these to retrieve method? 如果不是,您是否使用这些来检索方法?
public static Modules.OverriddenModule override(Module... modules) 公共静态Modules.OverriddenModule重写(Module ...模块)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.