5 Replies Latest reply on May 22, 2006 1:41 PM by Ovidiu Feodorov

    NoSuchMethodError running Messaging 1.0.1CR1 on JBoss 4.0.1S

    James Bibby Newbie

      I am running JBoss Messaging successfully on 4.0.4.GA, but need to also run it on Jboss 4.0.1SP1 if possible.

      Details of the installation:

      Messaging: 1.0.1CR1
      JBossAS: 4.0.1SP1
      Sun JDK: 1.4.2_08

      When I run the queue example I get no problems, however when I run the mdb example or my own queues I get the following exception:

      Caused by: java.lang.NoSuchMethodError: org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(Ljava/lang/Object;Ljava/util/Properties;Z)V
       at org.jboss.remoting.transport.socket.SocketServerInvoker.setup(SocketServerInvoker.java:97)
       at org.jboss.remoting.ServerInvoker.create(ServerInvoker.java:1151)
       at org.jboss.remoting.transport.Connector.init(Connector.java:408)
       at org.jboss.remoting.transport.Connector.create(Connector.java:745)
       at org.jboss.jms.client.remoting.JMSRemotingConnection.setUpConnection(JMSRemotingConnection.java:254)
       at org.jboss.jms.client.remoting.JMSRemotingConnection.<init>(JMSRemotingConnection.java:103)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getRemotingConnection(ClientConnectionFactoryDelegate.java:237)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.invoke(ClientConnectionFactoryDelegate.java:179)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$getClientAOPConfig_8697532701842707646.invokeNext(ClientConnectionFactoryDelegate$getClientAOPConfig_8697532701842707646.java)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPConfig(ClientConnectionFactoryDelegate.java)
       at org.jboss.jms.client.JBossConnectionFactory.ensureAOPConfigLoaded(JBossConnectionFactory.java:220)
       at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:183)
       at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:105)
       at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:100)
       at br.sage.jms.JMSMessageSender.init(JMSMessageSender.java:87)
       at br.sage.jms.JMSMessageSender.sendMessage(JMSMessageSender.java:97)
       at br.sage.upm.JournalHandler.queueJournal(JournalHandler.java:553)
       at br.sage.upm.JournalHandler.createJournal(JournalHandler.java:292)
       ... 41 more
      


      I saw a JIRA bug posted that was similar but it had been marked fixed for release 1.0.1CR1

      Any help is appreciated.

        • 1. Re: NoSuchMethodError running Messaging 1.0.1CR1 on JBoss 4.
          James Bibby Newbie

          Apologies, I get that exception only on my own queues. The mdb example gives the following exception:

          The ant task outputs the following

          Buildfile: build.xml
          
          identify:
           [echo] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           [echo] X Running the MDB example X
           [echo] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           [echo] The queue: testQueue
          
          sanity-check:
          
          init:
          
          compile:
          
          jar:
          
          deploy:
           [copy] Copying 1 file to C:\java\jboss-4.0.1SP1\server\messaging\deploy
          
          sleep:
           [echo] Sleeping for 5 seconds ...
          
          run:
          
          send:
           [java] java.lang.UnsupportedClassVersionError: org/jboss/example/jms/mdb/Sender (Unsupported major.minor version 49.0)
           [java] at java.lang.ClassLoader.defineClass0(Native Method)
           [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
           [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
           [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
           [java] at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
           [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
           [java] at java.security.AccessController.doPrivileged(Native Method)
           [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
           [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
           [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
           [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
           [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
           [java] Exception in thread "main"
          
          BUILD FAILED
          C:\java\jboss-messaging-1.0.1.CR1\examples\mdb\build.xml:95: The following error occurred while executing this line:
          C:\java\jboss-messaging-1.0.1.CR1\examples\mdb\build.xml:104: Java returned: 1
          


          The jboss server outputs the following:

          17:17:00,748 WARN [verifier] EJB spec violation:
          Bean : MDBExample
          Section: 22.2
          Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods in the <ejb-class> element.
          Info : Class not found on 'org.jboss.example.jms.mdb.MDBExample': Unexpected error during load of: org.jboss.example.jms.mdb.MDBExample, msg=org/jboss/example/jms/mdb/MDBExample (Unsupported major.m
          inor version 49.0)
          
          17:17:00,748 ERROR [MainDeployer] could not create deployment: file:/C:/java/jboss-4.0.1sp1/server/messaging/deploy/mdb-example.jar
          org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
           at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
           at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
           at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
           at $Proxy8.deploy(Unknown Source)
           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
          



          Both appear to point to code that was compiled on java 1.5 in teh CR1 release. Is there something special I need to do in order to use CR1 on jdk 1.4.2_08?

          Thanks,
          JB

          • 2. Re: NoSuchMethodError running Messaging 1.0.1CR1 on JBoss 4.
            Ovidiu Feodorov Master

            Without doing more than looking for 2 secs at your output, I think it's a Java 4- Java 5 problem. What Java version are you using to compile the example? What Java version are you using to run the example?

            • 3. Re: NoSuchMethodError running Messaging 1.0.1CR1 on JBoss 4.
              James Bibby Newbie

              Both my JAVA_HOME and path are pointing to 1.4.2_08. I will try running it on a virtualized server without java 1.5 even installed and see if that helps.

              Thnx for the response.

              • 4. Re: NoSuchMethodError running Messaging 1.0.1CR1 on JBoss 4.
                James Bibby Newbie

                Ok so the problems with running the examples is resolved with some cleanup of the java version being used for compilation/running of the server.

                My original problem remains for my queues, when I try to post a message to the queue I still get the following error:

                Caused by: java.lang.NoSuchMethodError: org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(Ljava/lang/Object;Ljava/util/Properties;Z)V
                 at org.jboss.remoting.transport.socket.SocketServerInvoker.setup(SocketServerInvoker.java:97)
                 at org.jboss.remoting.ServerInvoker.create(ServerInvoker.java:1151)
                 at org.jboss.remoting.transport.Connector.init(Connector.java:408)
                 at org.jboss.remoting.transport.Connector.create(Connector.java:745)
                 at org.jboss.jms.client.remoting.JMSRemotingConnection.setUpConnection(JMSRemotingConnection.java:254)
                 at org.jboss.jms.client.remoting.JMSRemotingConnection.<init>(JMSRemotingConnection.java:103)
                 at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getRemotingConnection(ClientConnectionFactoryDelegate.java:237)
                 at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.invoke(ClientConnectionFactoryDelegate.java:179)
                 at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$getClientAOPConfig_8697532701842707646.invokeNext(ClientConnectionFactoryDelegate$getClientAOPConfig_8697532701842707646.java)
                 at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPConfig(ClientConnectionFactoryDelegate.java)
                 at org.jboss.jms.client.JBossConnectionFactory.ensureAOPConfigLoaded(JBossConnectionFactory.java:220)
                 at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:183)
                 at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:105)
                 at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:100)
                 at br.sage.jms.JMSMessageSender.init(JMSMessageSender.java:87)
                 at br.sage.jms.JMSMessageSender.sendMessage(JMSMessageSender.java:97)
                 at br.sage.upm.JournalHandler.queueJournal(JournalHandler.java:553)
                 at br.sage.upm.JournalHandler.createJournal(JournalHandler.java:292)
                 ... 41 more
                


                any ideas?

                • 5. Re: NoSuchMethodError running Messaging 1.0.1CR1 on JBoss 4.
                  Ovidiu Feodorov Master

                  4.0.1SP1 is supported and 1.0.1.CR1 has been tested with it.

                  To me, it looks like you use a wrong jboss-messaging-client.jar in your client classpath. Please make sure that jboss-messaging-client.jar that comes with the release takes precedence in your client's classpath.