You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jrrosel <je...@landsend.com> on 2009/10/14 17:40:36 UTC

UnsupportedClassVersionError

I'm working on a jms/camel SA. When attempting to put in a
MessageExchangeListener in the jms SU xbean.xml file I get an
UnsupportedClassVersionError when running the maven install command.

2009-10-14 10:33:15,302 [main           ] INFO  XBeanXmlBeanDefinitionReader  
-
 Loading XML bean definitions from URL
[file:/c:/servicemix_tutorial/prototypes/
camel/tutorial-camel-jms-su/src/main/resources/xbean.xml]
[WARNING] Failed to generate jbi.xml:
org.apache.servicemix.maven.plugin.jbi.Jbi
PluginException: Unable to generate service unit descriptor!
org.apache.servicemix.maven.plugin.jbi.JbiPluginException: Unable to
generate se
rvice unit descriptor!
        at
org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
ojo.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:206)
        at
org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
ojo.execute(GenerateServiceUnitDescriptorMojo.java:143)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:558)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:499)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:478)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:291)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Unexp
ected exception parsing XML document from URL
[file:/c:/servicemix_tutorial/prot
otypes/camel/tutorial-camel-jms-su/src/main/resources/xbean.xml]; nested
excepti
on is java.lang.UnsupportedClassVersionError: Bad version number in .class
file

Everything compiles and builds fine until I try to wire the bean into my
xbean.xml file. Here is xbean source.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       xmlns:tutorial="urn:org:apache:servicemix:tutorial:camel"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:bean="http://servicemix.apache.org/bean/1.0">

    <jms:provider service="tutorial:jms"
              endpoint="provider"
              destinationName="JRR.TESTIN.Q"
              connectionFactory="#mqConnectionFactory" 
              marshaler="#marshaler" />
              
    <jms:consumer service="tutorial:jms"
              endpoint="consumer"
              destinationName="JRR.TESTIN.Q"
              connectionFactory="#mqConnectionFactory" 
              marshaler="#consumerMarshaler" 
              targetService="tutorial:jms"
	      targetEndpoint="consumer" />

  <bean id="marshaler" 
	class="org.apache.servicemix.jms.endpoints.DefaultProviderMarshaler"> 
	<property name="needJavaIdentifiers" value="true" /> 
  </bean> 
  <bean id="consumerMarshaler"
class="org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler">
   <property name="needJavaIdentifiers" value="true" />
  </bean>
  
  <bean:endpoint service="jms:test" endpoint="endpoint"
bean="#IntlOrderIntegrationListener"/>
  
  <bean id="IntlOrderIntegrationListener"
class="com.landsend.servicemix.LEIntlOrderIntegrationListener">
  </bean>
  
  <bean id="mqConnectionFactory"
class="com.ibm.mq.jms.MQQueueConnectionFactory">
    <!-- <property name="transportType" value="1" /> -->
    <property name="transportType" >
	   <util:constant
static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
    </property> 
    <property name="queueManager" value="queueManager" />
    <property name="hostName" value="hostname" />
    <property name="channel" value="JAVA.CHANNEL" />
    <property name="port" value="1414" />
  </bean>
</beans>
-- 
View this message in context: http://www.nabble.com/UnsupportedClassVersionError-tp25893548p25893548.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: UnsupportedClassVersionError

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

That error usually means you're running code that has been compiled
with a higher-versioned or otherwise incompatible JDK.  E.g. it
happens when you're trying to run classes compiled with a Java 6 JDK
on a Java 5 JVM.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/10/14 jrrosel <je...@landsend.com>:
>
> I'm working on a jms/camel SA. When attempting to put in a
> MessageExchangeListener in the jms SU xbean.xml file I get an
> UnsupportedClassVersionError when running the maven install command.
>
> 2009-10-14 10:33:15,302 [main           ] INFO  XBeanXmlBeanDefinitionReader
> -
>  Loading XML bean definitions from URL
> [file:/c:/servicemix_tutorial/prototypes/
> camel/tutorial-camel-jms-su/src/main/resources/xbean.xml]
> [WARNING] Failed to generate jbi.xml:
> org.apache.servicemix.maven.plugin.jbi.Jbi
> PluginException: Unable to generate service unit descriptor!
> org.apache.servicemix.maven.plugin.jbi.JbiPluginException: Unable to
> generate se
> rvice unit descriptor!
>        at
> org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
> ojo.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:206)
>        at
> org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
> ojo.execute(GenerateServiceUnitDescriptorMojo.java:143)
>        at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:451)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:558)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> fecycle(DefaultLifecycleExecutor.java:499)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:478)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:330)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:291)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:142)
>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>        at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unexp
> ected exception parsing XML document from URL
> [file:/c:/servicemix_tutorial/prot
> otypes/camel/tutorial-camel-jms-su/src/main/resources/xbean.xml]; nested
> excepti
> on is java.lang.UnsupportedClassVersionError: Bad version number in .class
> file
>
> Everything compiles and builds fine until I try to wire the bean into my
> xbean.xml file. Here is xbean source.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>       xmlns:tutorial="urn:org:apache:servicemix:tutorial:camel"
>       xmlns:util="http://www.springframework.org/schema/util"
>       xmlns:bean="http://servicemix.apache.org/bean/1.0">
>
>    <jms:provider service="tutorial:jms"
>              endpoint="provider"
>              destinationName="JRR.TESTIN.Q"
>              connectionFactory="#mqConnectionFactory"
>              marshaler="#marshaler" />
>
>    <jms:consumer service="tutorial:jms"
>              endpoint="consumer"
>              destinationName="JRR.TESTIN.Q"
>              connectionFactory="#mqConnectionFactory"
>              marshaler="#consumerMarshaler"
>              targetService="tutorial:jms"
>              targetEndpoint="consumer" />
>
>  <bean id="marshaler"
>        class="org.apache.servicemix.jms.endpoints.DefaultProviderMarshaler">
>        <property name="needJavaIdentifiers" value="true" />
>  </bean>
>  <bean id="consumerMarshaler"
> class="org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler">
>   <property name="needJavaIdentifiers" value="true" />
>  </bean>
>
>  <bean:endpoint service="jms:test" endpoint="endpoint"
> bean="#IntlOrderIntegrationListener"/>
>
>  <bean id="IntlOrderIntegrationListener"
> class="com.landsend.servicemix.LEIntlOrderIntegrationListener">
>  </bean>
>
>  <bean id="mqConnectionFactory"
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>    <!-- <property name="transportType" value="1" /> -->
>    <property name="transportType" >
>           <util:constant
> static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
>    </property>
>    <property name="queueManager" value="queueManager" />
>    <property name="hostName" value="hostname" />
>    <property name="channel" value="JAVA.CHANNEL" />
>    <property name="port" value="1414" />
>  </bean>
> </beans>
> --
> View this message in context: http://www.nabble.com/UnsupportedClassVersionError-tp25893548p25893548.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: UnsupportedClassVersionError

Posted by jrrosel <je...@landsend.com>.
Thanks much.  That was it. I added the maven compiler entry and all is well.


Jean-Baptiste Onofré wrote:
> 
> Hi,
> 
> In your bean pom.xml, have you defined the maven-compiler-plugin source 
> and target to force to the 1.5 JVM ?
> 
> Regards
> JB
> 

-- 
View this message in context: http://www.nabble.com/UnsupportedClassVersionError-tp25893548p25913638.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: UnsupportedClassVersionError

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

In your bean pom.xml, have you defined the maven-compiler-plugin source 
and target to force to the 1.5 JVM ?

Regards
JB

jrrosel wrote:
> I'm working on a jms/camel SA. When attempting to put in a
> MessageExchangeListener in the jms SU xbean.xml file I get an
> UnsupportedClassVersionError when running the maven install command.
> 
> 2009-10-14 10:33:15,302 [main           ] INFO  XBeanXmlBeanDefinitionReader  
> -
>  Loading XML bean definitions from URL
> [file:/c:/servicemix_tutorial/prototypes/
> camel/tutorial-camel-jms-su/src/main/resources/xbean.xml]
> [WARNING] Failed to generate jbi.xml:
> org.apache.servicemix.maven.plugin.jbi.Jbi
> PluginException: Unable to generate service unit descriptor!
> org.apache.servicemix.maven.plugin.jbi.JbiPluginException: Unable to
> generate se
> rvice unit descriptor!
>         at
> org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
> ojo.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:206)
>         at
> org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
> ojo.execute(GenerateServiceUnitDescriptorMojo.java:143)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:451)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:558)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> fecycle(DefaultLifecycleExecutor.java:499)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:478)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:330)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:291)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:142)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unexp
> ected exception parsing XML document from URL
> [file:/c:/servicemix_tutorial/prot
> otypes/camel/tutorial-camel-jms-su/src/main/resources/xbean.xml]; nested
> excepti
> on is java.lang.UnsupportedClassVersionError: Bad version number in .class
> file
> 
> Everything compiles and builds fine until I try to wire the bean into my
> xbean.xml file. Here is xbean source.
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>        xmlns:tutorial="urn:org:apache:servicemix:tutorial:camel"
>        xmlns:util="http://www.springframework.org/schema/util"
>        xmlns:bean="http://servicemix.apache.org/bean/1.0">
> 
>     <jms:provider service="tutorial:jms"
>               endpoint="provider"
>               destinationName="JRR.TESTIN.Q"
>               connectionFactory="#mqConnectionFactory" 
>               marshaler="#marshaler" />
>               
>     <jms:consumer service="tutorial:jms"
>               endpoint="consumer"
>               destinationName="JRR.TESTIN.Q"
>               connectionFactory="#mqConnectionFactory" 
>               marshaler="#consumerMarshaler" 
>               targetService="tutorial:jms"
> 	      targetEndpoint="consumer" />
> 
>   <bean id="marshaler" 
> 	class="org.apache.servicemix.jms.endpoints.DefaultProviderMarshaler"> 
> 	<property name="needJavaIdentifiers" value="true" /> 
>   </bean> 
>   <bean id="consumerMarshaler"
> class="org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler">
>    <property name="needJavaIdentifiers" value="true" />
>   </bean>
>   
>   <bean:endpoint service="jms:test" endpoint="endpoint"
> bean="#IntlOrderIntegrationListener"/>
>   
>   <bean id="IntlOrderIntegrationListener"
> class="com.landsend.servicemix.LEIntlOrderIntegrationListener">
>   </bean>
>   
>   <bean id="mqConnectionFactory"
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>     <!-- <property name="transportType" value="1" /> -->
>     <property name="transportType" >
> 	   <util:constant
> static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
>     </property> 
>     <property name="queueManager" value="queueManager" />
>     <property name="hostName" value="hostname" />
>     <property name="channel" value="JAVA.CHANNEL" />
>     <property name="port" value="1414" />
>   </bean>
> </beans>

-- 
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
jb@nanthrax.net
PGP : 17D4F086