1 Reply Latest reply on Apr 7, 2014 7:47 PM by James Livingston

    How to add jdk to a static module

    Chad Martin Newbie

      I have a module that when i start wildfly this exception happens:

       

      MSC000001: Failed to start service jboss.messaging.jms-bridge.myBridge: org.jboss.msc.service.StartException in service jboss.messaging.jms-bridge.myBridge: JBAS011639: Failed to create JMS Bridge

          at org.jboss.as.messaging.jms.bridge.JMSBridgeService$1.run(JMSBridgeService.java:83) [wildfly-messaging-8.0.0.Final.jar:8.0.0.Final]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

          at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

          at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]

      Caused by: java.lang.NoClassDefFoundError: Lsun/corba/Bridge;

          at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_45]

          at java.lang.Class.privateGetDeclaredFields(Class.java:2397) [rt.jar:1.7.0_45]

          at java.lang.Class.getDeclaredField(Class.java:1946) [rt.jar:1.7.0_45]

          at com.sun.corba.ee.spi.orbutil.tf.MethodMonitorRegistry.initializeField(MethodMonitorRegistry.java:362)

          at com.sun.corba.ee.spi.orbutil.tf.MethodMonitorRegistry.registerClass(MethodMonitorRegistry.java:400)

          at com.sun.corba.ee.impl.io.ObjectStreamClass.<clinit>(ObjectStreamClass.java)

          at com.sun.corba.ee.impl.util.RepositoryId.<clinit>(RepositoryId.java:192)

          at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:824)

          at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:782)

          at com.sun.corba.ee.impl.encoding.CDRInputObject.read_Object(CDRInputObject.java:472)

          at org.omg.CORBA.ObjectHelper.read(ObjectHelper.java:92) [rt.jar:1.7.0_45]

          at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:245) [rt.jar:1.7.0_45]

          at com.sun.enterprise.naming.impl.SerialContext$ProviderCacheKey.getNameService(SerialContext.java:1244)

          at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:411)

          at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:347)

          at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:504)

          at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)

          at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_45]

          at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_45]

          at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_45]

          at org.hornetq.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:56) [hornetq-jms-server-2.4.1.Final.jar:]

          at org.hornetq.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:38) [hornetq-jms-server-2.4.1.Final.jar:]

          at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1217) [hornetq-jms-server-2.4.1.Final.jar:]

          at org.hornetq.jms.bridge.impl.JMSBridgeImpl.start(JMSBridgeImpl.java:409) [hornetq-jms-server-2.4.1.Final.jar:]

          at org.jboss.as.messaging.jms.bridge.JMSBridgeService.startBridge(JMSBridgeService.java:105) [wildfly-messaging-8.0.0.Final.jar:8.0.0.Final]

          at org.jboss.as.messaging.jms.bridge.JMSBridgeService$1.run(JMSBridgeService.java:79) [wildfly-messaging-8.0.0.Final.jar:8.0.0.Final]

          ... 4 more

      Caused by: java.lang.ClassNotFoundException: sun.corba.Bridge from [Module "org.glassfish:main" from local module loader @6b573f80 (finder: local module finder @2d0a238e (roots: C:\Installs\JBoss\wildfly-8.0.0.Final\modules,C:\Installs\JBoss\wildfly-8.0.0.Final\modules\system\layers\base))]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]

          ... 30 more

       

      This class that is not being found is in the jdk. How do i add the jdk to the module?

        • 1. Re: How to add jdk to a static module
          James Livingston Apprentice

          Add a dependency on the "sun.jdk" module to get the common bits, that's the module which is automatically added to deployments. sun.corba isn't part of that, so you'll need to add a system dependency to your module.  Add any other package paths as necessary, and if you want to re-export them, add 'export="true"' to the <system> element

           

          <dependencies>
            <system>
              <paths>
                <path name="sun/corba"/>
              </paths>
            </system>
            ...
          </depenencies>