java.lang.NoClassDefFoundError

Help
2007-03-01
2013-04-08
  • Daniel Nüst
    Daniel Nüst
    2007-03-01

    Hi!
    I'm working with Mantaray 1.9 and get a java.lang.NoClassDefFoundError on runtime when Mantaray wants to create a Consumer in ...jms.MantaSession. I hope someone can help me with this. More Information attached below.
    Regards,
    Daniel

    ################# code concerned ################
        private void initMantarayComponents() {
            this.queueConnectionFactory = new MantaConnectionFactory();
           
            try {
                this.connection = this.queueConnectionFactory.createConnection();
                this.connection.start();
               
    //            create incoming Queue for RegistrationMessages
                this.registrationDestinationName = DestinationNameFactory.getRegistrationDestinationName();
                this.sessionIncoming = this.connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                this.registrationQueue = this.sessionIncoming.createQueue(this.registrationDestinationName);
           /*LINE 140*/ this.registrationConsumer = this.sessionIncoming.createConsumer(this.registrationQueue);
                this.registrationConsumer.setMessageListener(this);
                    } catch (JMSException e) {
                log.fatal("Error creating mantaray components!", e);
            }
             }

    ################# console #######################
    Dynamic Service Creation is ENABLED.
    *** MantaRay peer Name: m192.168.1.1006601 ***
    INFO - net.NetworkManager - [main] 2007-03-01 19:34:32,265 - Local MantaRay peer name is 'm192.168.1.1006601'.
    Persistent folder found at ./VirtualCommunicationLayer/test/persistent
    INFO - kernel.PluginManager - [main] 2007-03-01 19:34:32,296 - PluginManager is starting to load 2 plugins
    INFO - kernel.PluginManager - [main] 2007-03-01 19:34:32,312 - Loaded plugin org.mr.plugins.discovery.AutoDiscoveryPlugin
    INFO - coordinators.QueuesCoordinator - [main] 2007-03-01 19:34:32,312 - Starting DynamicQueuesCoordinator
    INFO - kernel.PluginManager - [main] 2007-03-01 19:34:32,312 - Loaded plugin org.mr.plugins.coordinators.QueuesCoordinator
    INFO - indexing.WBManager - [main] 2007-03-01 19:34:32,328 - WBLink starting
    INFO - indexing.WBManager - [main] 2007-03-01 19:34:32,328 - WBLink is disabled
    INFO - rmi.MantaRMIServer - [main] 2007-03-01 19:34:32,328 - MantaRMIServer is disabled property 'enable_rmi_api' is null or false.
    INFO - net.NetworkManager - [GroupReactor] 2007-03-01 19:34:32,671 - Agent transport info resolved: agent=m192.168.1.1006600, info=/192.168.1.100:6600@TCP.
    INFO - discovery.AutoDiscoveryPlugin - [GroupReactor] 2007-03-01 19:34:32,671 - Discovered a new MantaRay peer called m192.168.1.1006600 at [/192.168.1.100:6600@TCP]
    INFO - mr.MantaAgent - [main] 2007-03-01 19:34:33,328 - MantaRay 1.9 initialization completed.
    INFO - mr.MantaAgent - [main] 2007-03-01 19:34:33,328 - MANTARAY LOADED (Don't Panic).
    Exception in thread "main" java.lang.NoClassDefFoundError: antlr/RecognitionException
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at org.mr.api.jms.MantaSession.createConsumer(MantaSession.java:919)
        at org.mr.api.jms.MantaSession.createConsumer(MantaSession.java:823)
        at org.n52.sensorworld.vcl.dictionaries.DictionaryControl.initMantarayComponents(DictionaryControl.java:140)
        at org.n52.sensorworld.vcl.dictionaries.DictionaryControl.<init>(DictionaryControl.java:108)
        at org.n52.sensorworld.test.DestNameFactoryTest.main(DestNameFactoryTest.java:26)

     
    • Daniel Nüst
      Daniel Nüst
      2007-03-12

      I found the solution myself: added antlr.jar (http://www.antlr.org/) to the buildpath.

      Does it not exist, or did I just not found a list of libraries that mantaray depends on?

      regards
      Daniel