Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-11411

ModuleClassLoader fails with ClassNotFoundException when class in a jar file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 11.0.0.Final, 14.0.0.Final
    • Class Loading
    • None
    • Hide

      Eg.

      See attached files. Put "server" in war project and "service" in different jar project.

      Show
      Eg. See attached files. Put "server" in war project and "service" in different jar project.

      Simple REST service with Application activator in project and Rest Server in another project with jar file fails to load.

      Works okay with EAR project structure but not with simpler WAR project structure.

      Caused by: java.lang.ClassNotFoundException: rest.service.server.RestSever from [Module "deployment.restserver7.war" from Service Module Loader]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)

        1. JaxRsActivator.java
          0.4 kB
          Karl Nicholas
        2. RestSever.java
          0.3 kB
          Karl Nicholas

              yborgess1@redhat.com Yeray Borges Santana
              karlnicholas Karl Nicholas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: