简体   繁体   中英

ClassNotFoundException during the extended module [Wildfly]

I want to extend a class that has already been added as a module in the server 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:

<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]

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 .

If not did you used these to retrieve method?

public static Modules.OverriddenModule override(Module... modules)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM