9 Replies Latest reply: Feb 23, 2012 10:54 AM by Gonne Martens RSS

Missing module system:main in JBoss7.1.Beta1

Gonne Martens Novice

Hi,

 

I am missing module system:main since trying to use JBoss7.1.Beta1, because I need access to com.sun.net.ssl.internal.ssl.Provider.

 

Regards,

Gonne

 

14:44:32,975 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.module.service."deployment.merlix-ear.ear".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.merlix-ear.ear".main: Failed to load module: deployment.merlix-ear.ear:main
    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:67) [jboss-as-server-7.1.0.Beta1.jar:]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
    at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
Caused by: org.jboss.modules.ModuleNotFoundException: Module system:main is not found in local module loader @13b8f864 (roots: D:\jboss\jboss-as-7.1.0.Beta1\modules)
    at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126)
    at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:265)
    at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:212)
    at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94)
    at org.jboss.modules.Module.addPaths(Module.java:790)
    at org.jboss.modules.Module.link(Module.java:997)
    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1023)
    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:198)
    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:63) [jboss-as-server-7.1.0.Beta1.jar:]
    ... 5 more

 

  • 1. Re: Missing module system:main in JBoss7.1.Beta1
    Ales Justin Master

    Afais, system module has been removed -- imo you need a diff way to get this class; e.g. check sun.jdk module.

  • 2. Re: Missing module system:main in JBoss7.1.Beta1
    Gonne Martens Novice

    According to the documentation the module sun.jdk is always added, but it does not include the sun ssl classes.

     

    I do not know what the recommended way for this problem is.

    As workaround I added the package path to the module.xml of the sun.jdk module:

    ...
    <dependencies>
        <system export="true">
            <paths>
                ...
                <path name="com/sun/net/ssl/internal/ssl"/>
            </paths>
    ...
        </system>
    </dependencies>
    ...
    

     

  • 3. Re: Missing module system:main in JBoss7.1.Beta1
    Ales Justin Master

    Yes, I think that's one of the ways to do it -- and not really a hack.

    Or, you could create your own module -- similar to sun.jdk.

  • 4. Re: Missing module system:main in JBoss7.1.Beta1
    Andrew Regan Newbie

    Sorry to tack this onto the end of the thread, but I'm getting the same "Module system:main is not found in local module loader", despite not having any "com.sun" refs (in any parent classes), and this is only after upgrading from 7.1.0.Alpha2. Can't find any other references to this problem, and nothing in the release notes.

     

    Very weird.  I can't see anything different about the class it's complaining about.

     

    Any ideas?

    21:33:22,607 ERROR [fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.subunit."myapp-ear-1.0-SNAPSHOT.ear"."myapp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."myapp-ear-1.0-SNAPSHOT.ear"."myapp.war".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "myapp.war" of deployment "myapp-ear-1.0-SNAPSHOT.ear"

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Beta1.jar:]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:]

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]

        at java.lang.Thread.run(Thread.java:680) [:1.6.0_29]

    Caused by: java.lang.RuntimeException: Error getting reflective information for class com.hiatus.myapp2.servlet.GlobalSearchServlet with ClassLoader ModuleClassLoader for Module "deployment.myapp-ear-1.0-SNAPSHOT.ear:main" from Service Module Loader

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.0.Beta1.jar:]

        at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:70)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:117)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.Beta1.jar:]

        ... 5 more

    Caused by: org.jboss.modules.ModuleLoadError: Module system:main is not found in local module loader @2b20bf2c (roots: /Users/andrewregan/Desktop/jboss-as-7.1.0.Beta1/modules)

        at org.jboss.modules.ModuleLoadException.toError(ModuleLoadException.java:78)

        at org.jboss.modules.Module.getPathsUnchecked(Module.java:984)

        at org.jboss.modules.Module.loadModuleClass(Module.java:495)

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)

        at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_29]

        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_29]

        at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_29]

        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_29]

        at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:330)

        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:411)

        at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260)

        at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

        at org.jboss.modules.Module.loadModuleClass(Module.java:500)

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)

        at java.lang.Class.getDeclaredFields0(Native Method) [:1.6.0_29]

        at java.lang.Class.privateGetDeclaredFields(Class.java:2291) [:1.6.0_29]

        at java.lang.Class.getDeclaredFields(Class.java:1743) [:1.6.0_29]

        at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.0.Beta1.jar:]

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.0.Beta1.jar:]

  • 5. Re: Missing module system:main in JBoss7.1.Beta1
    Gonne Martens Novice

    Do you have a dependency defined to the module 'system' in a jboss-deployment-structure.xml or the MANIFEST.MF of your EAR or as global module in your standalone.xml?

  • 6. Re: Missing module system:main in JBoss7.1.Beta1
    Andrew Regan Newbie

    Not in MANIFEST.MF, but I notice that a module I added a while back has "<module name="system"/>" in its descriptor - and that this module is referred-to within the servlet class that is failing...

     

    I'll try removing the module's dependency on 'system' and see if that fixes it. Thanks for the suggestion!

  • 7. Re: Missing module system:main in JBoss7.1.Beta1
    Ales Justin Master

    If you need anything from system classpath, see how "org.jboss.modules" does it.

    Since JBoss Modules is what's on the system classpath, along with JDK of course.

  • 8. Re: Missing module system:main in JBoss7.1.Beta1
    David Lloyd Master

    Gonne Martens wrote:

     

    According to the documentation the module sun.jdk is always added, but it does not include the sun ssl classes.

     

    I do not know what the recommended way for this problem is.

    As workaround I added the package path to the module.xml of the sun.jdk module:

    
    ...
    <dependencies>
        <system export="true">
            <paths>
                ...
                <path name="com/sun/net/ssl/internal/ssl"/>
            </paths>
    ...
        </system>
    </dependencies>
    ...
    

     

    I did have a patch which filled in all of the major sun.jdk paths, but I guess it never made it upstream.  But yes I'd say this is the proper fix.