6 Replies Latest reply on Apr 2, 2008 2:57 PM by peterjones_peter.jones

    Logisticx demo startup error

    rg64

      I am running FUSE ESB 3.3.0.6 on Sun JDK 1.5.0_11. When I startup the FUSE ESB with the Logisticx demo 1.0 assemblies deployed, I receive the following error in the console:

       

      INFO  - ServiceAssemblyLifeCycle       - Starting service assembly: order-sa

      INFO  - ServiceUnitLifeCycle           - Initializing service unit: com.logisticx.order.http

      INFO  - ServiceUnitLifeCycle           - Initializing service unit: com.logisticx.order.ws

      INFO  - ServiceUnitLifeCycle           - Initializing service unit: com.logisticx.order.persistence

      INFO  - ServiceUnitLifeCycle           - Starting service unit: com.logisticx.order.http

      Dec 18, 2007 10:44:07 PM sun.reflect.NativeMethodAccessorImpl invoke0

      INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog

      Dec 18, 2007 10:44:07 PM sun.reflect.NativeMethodAccessorImpl invoke0

      INFO: jetty-6.1.0.1-fuse

      Dec 18, 2007 10:44:07 PM sun.reflect.NativeMethodAccessorImpl invoke0

      INFO: Started SelectChannelConnector@0.0.0.0:8192

      INFO  - ServiceUnitLifeCycle           - Starting service unit: com.logisticx.order.ws

      Dec 18, 2007 10:44:08 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass

      INFO: Creating Service OrderServiceImplService from class com.logisticx.service.order.OrderServiceImpl

      Exception in thread "Timer-4" java.lang.UnsupportedClassVersionError: Bad version number in .class file

              at java.lang.ClassLoader.defineClass1(Native Method)

              at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

              at org.apache.xbean.classloader.JarFileClassLoader.access$200(JarFileClassLoader.java:48)

              at org.apache.xbean.classloader.JarFileClassLoader$6.run(JarFileClassLoader.java:272)

              at java.security.AccessController.doPrivileged(Native Method)

              at org.apache.xbean.classloader.JarFileClassLoader.findClass(JarFileClassLoader.java:224)

              at org.apache.xbean.classloader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:200)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

              at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:111)

              at org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.getRequestWrapper(JaxWsServiceConfiguration.java:510)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getRequestWrapper(ReflectionServiceFactoryBean.java:1346)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInputWrappedMessageParts(ReflectionServiceFactoryBean.java:890)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createOperation(ReflectionServiceFactoryBean.java:394)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:372)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:242)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:272)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:146)

              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:89)

              at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:83)

              at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:107)

              at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:147)

              at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:287)

              at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:227)

              at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179)

              at org.apache.servicemix.cxfse.CxfSeEndpoint.start(CxfSeEndpoint.java:193)

              at org.apache.servicemix.common.endpoints.SimpleEndpoint.activate(SimpleEndpoint.java:55)

              at org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:53)

              at org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:151)

              at org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)

              at org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:132)

              at org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:378)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingSAs(AutoDeploymentService.java:480)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents(AutoDeploymentService.java:532)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateSharedLibrary(AutoDeploymentService.java:314)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:251)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)

              at java.util.TimerThread.mainLoop(Timer.java:512)

              at java.util.TimerThread.run(Timer.java:462)

       

      Any thoughts?

       

      - Ron

        • 1. Re: Logisticx demo startup error
          bsnyder

           

          ...

          Exception in thread "Timer-4" java.lang.UnsupportedClassVersionError: Bad version number in .class file

           

           

          This error occurs when a class file has been compiled on a newer version of the JDK than it is being run on. E.g., the com.logisticx.service.order.OrderServiceImpl class was compiled using JDK 1.5 and it is being run on a JDK lower than that. Are you sure you're using JDK 1.5 to run the FUSE ESB?

           

          Bruce

          • 2. Re: Logisticx demo startup error
            rg64

            Hi Bruce,

             

            I was definitely running FUSE ESB on JDK 1.5.0_11. When I rebuilt the demo code myself (see other thread), I was able to successfully deploy it to the same FUSE ESB runtime.

             

            - Ron

            • 3. Re: Logisticx demo startup error
              bsnyder

              Upon looking deeper, we've located a bug in the way that the java2wsdl function from the cxf-codegen-plugin works. Evidently it ignores the fact that the maven-compile-plugin is set to compile for Java 1.5 and instead compiles against the version of the JDK that is compiling it. We're working to fix it and upload a new version soon.

               

              Bruce

              • 4. Re: Logisticx demo startup error
                rg64

                So, is it possible that the version of the demo I downloaded was compiled with the Java 6 compiler. That would explain the class version problems with it running on a 1.5 JDK.

                 

                Ron

                • 5. Re: Logisticx demo startup error
                  bsnyder

                  Yes, that's what I'm saying; the logisticx-demo was compiled with the Java 1.6 compiler. This is fine because we set the maven-compile-plugin to compile the source for Java 1.5 compatibility. However, the cxf-codegen-plugin has a bug that doesn't abide by the maven-compile-plugin settings. This is why you're seeing the issue.

                   

                  Bruce

                  • 6. Re: Logisticx demo startup error
                    peterjones_peter.jones

                    Hi there,

                     

                    Just came across this same error, so thought I'd create a jira to track this issue:

                     

                    http://open.iona.com/issues/browse/DEMO-30

                     

                    Cheers,

                    Peter