Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-3765

itest/wsdlgen creates classes that don't run on JDK 5

    XMLWordPrintableJSON

Details

    Description

      The Tuscany build is set up to ensure that when it is run under JDK 6 it produces classes that are compatible with JDK 5. This works in most cases but it's not working for itest/wsdlgen as the build for this creates some classes that run on JDK 6 only. This can cause problems because the unit test for tools/contrib2wsdl uses these classes and produces the exception stack trace shown below if it is run on JDK 5 after building itest/wsdlgen on JDK 6.

      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------
      Running org.apache.tuscany.tools.contrib2wsdl.Contrib2WSDLTestCase
      03-Nov-2010 12:54:48 org.apache.tuscany.sca.node.impl.NodeImpl <init>
      INFO: Creating node: null
      03-Nov-2010 12:54:48 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
      INFO: Loading contribution: file:/E:/td/tags/161rc1/sca-java-1.6.1/tools/contrib
      2wsdl/../../itest/wsdlgen/target/classes/
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.502 sec <<< FA
      ILURE!
      testContrib2WSDL(org.apache.tuscany.tools.contrib2wsdl.Contrib2WSDLTestCase) Ti
      me elapsed: 2.479 sec <<< ERROR!
      java.lang.UnsupportedClassVersionError: Bad version number in .class file
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
      4)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at org.apache.tuscany.sca.contribution.java.impl.ContributionClassLoader
      .findClassFromContribution(ContributionClassLoader.java:302)
      at org.apache.tuscany.sca.contribution.java.impl.ContributionClassLoader
      .findClass(ContributionClassLoader.java:100)
      at org.apache.tuscany.sca.contribution.java.impl.ContributionClassLoader
      .loadClass(ContributionClassLoader.java:158)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:242)
      at org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProc
      essor$1.run(JAXWSJavaInterfaceProcessor.java:233)
      at org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProc
      essor$1.run(JAXWSJavaInterfaceProcessor.java:230)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProc
      essor.visitInterface(JAXWSJavaInterfaceProcessor.java:230)
      at org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceIntrospect
      orImpl.introspectInterface(JavaInterfaceIntrospectorImpl.java:123)
      at org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImp
      l.createJavaInterface(JavaInterfaceFactoryImpl.java:58)
      at org.apache.tuscany.sca.implementation.java.introspect.impl.ServicePro
      cessor.createService(ServiceProcessor.java:175)
      at org.apache.tuscany.sca.implementation.java.introspect.impl.ServicePro
      cessor.visitClass(ServiceProcessor.java:97)
      at org.apache.tuscany.sca.implementation.java.impl.JavaClassIntrospector
      Impl.introspectClass(JavaClassIntrospectorImpl.java:72)
      at org.apache.tuscany.sca.implementation.java.impl.JavaImplementationFac
      toryImpl.createJavaImplementation(JavaImplementationFactoryImpl.java:55)
      at org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProc
      essor.resolve(JavaImplementationProcessor.java:228)
      at org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProc
      essor.resolve(JavaImplementationProcessor.java:74)
      at org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProc
      essorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcess
      orExtensionPoint.java:388)
      at org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactP
      rocessor.resolve(ExtensibleStAXArtifactProcessor.java:183)
      at org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveImpl
      ementation(BaseAssemblyProcessor.java:340)
      at org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(Compos
      iteProcessor.java:1028)
      at org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(Compos
      iteProcessor.java:90)
      at org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProc
      essorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcess
      orExtensionPoint.java:388)
      at org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactP
      rocessor.resolve(ExtensibleStAXArtifactProcessor.java:183)
      at org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolv
      e(CompositeDocumentProcessor.java:231)
      at org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolv
      e(CompositeDocumentProcessor.java:59)
      at org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactPr
      ocessor.resolve(ExtensibleURLArtifactProcessor.java:106)
      at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
      mpl.processResolvePhase(ContributionServiceImpl.java:625)
      at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
      mpl.addContribution(ContributionServiceImpl.java:430)
      at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
      mpl.contribute(ContributionServiceImpl.java:198)
      at org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java
      :524)
      at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:381)
      at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANode(NodeFa
      ctoryImpl.java:47)
      at org.apache.tuscany.tools.contrib2wsdl.Contrib2WSDL.main(Contrib2WSDL.
      java:80)
      at org.apache.tuscany.tools.contrib2wsdl.Contrib2WSDLTestCase.testContri
      b2WSDL(Contrib2WSDLTestCase.java:32)
      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:592)
      at junit.framework.TestCase.runTest(TestCase.java:168)
      at junit.framework.TestCase.runBare(TestCase.java:134)
      at junit.framework.TestResult$1.protect(TestResult.java:110)
      at junit.framework.TestResult.runProtected(TestResult.java:128)
      at junit.framework.TestResult.run(TestResult.java:113)
      at junit.framework.TestCase.run(TestCase.java:124)
      at junit.framework.TestSuite.runTest(TestSuite.java:232)
      at junit.framework.TestSuite.run(TestSuite.java:227)
      at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.
      java:79)
      at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
      java:62)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
      tSet(AbstractDirectoryTestSuite.java:138)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
      stractDirectoryTestSuite.java:125)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
      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:592)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
      refireBooter.java:308)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
      ava:879)

      Results :

      Tests in error:
      testContrib2WSDL(org.apache.tuscany.tools.contrib2wsdl.Contrib2WSDLTestCase)

      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] There are test failures.

      Attachments

        Activity

          People

            scnash Simon Nash
            scnash Simon Nash
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: