Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4597

Exception when running WebModuleUtilTest under Java 8

    XMLWordPrintable

    Details

    • Complexity:
      L

      Description

      The initializationError test in the WebModuleUtilTest class throws an exception when running under Java 8.

      <error message="Failed to transform class with name org.openmrs.module.web.WebModuleUtilTest. Reason: java.io.IOException: invalid constant type: 18" type="java.lang.IllegalStateException">java.lang.IllegalStateException: Failed to transform class with name org.openmrs.module.web.WebModuleUtilTest. Reason: java.io.IOException: invalid constant type: 18
      at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:219)
      at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:147)
      at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:67)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:340)
      at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:132)
      at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:39)
      at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:217)
      at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.<init>(JUnit4TestSuiteChunkerImpl.java:59)
      at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.<init>(AbstractCommonPowerMockRunner.java:32)
      at org.powermock.modules.junit4.PowerMockRunner.<init>(PowerMockRunner.java:33)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
      at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
      at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
      at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:51)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
      Caused by: java.lang.RuntimeException: java.io.IOException: invalid constant type: 18
      at javassist.CtClassType.getClassFile2(CtClassType.java:203)
      at javassist.CtClassType.subtypeOf(CtClassType.java:303)
      at javassist.bytecode.stackmap.TypeData$TypeName.update(TypeData.java:274)
      at javassist.bytecode.stackmap.TypeData$TypeName.setType(TypeData.java:203)
      at javassist.bytecode.stackmap.TypeData.setType(TypeData.java:46)
      at javassist.bytecode.stackmap.Tracer.checkParamTypes(Tracer.java:913)
      at javassist.bytecode.stackmap.Tracer.doInvokeMethod(Tracer.java:818)
      at javassist.bytecode.stackmap.Tracer.doOpcode148_201(Tracer.java:615)
      at javassist.bytecode.stackmap.Tracer.doOpcode(Tracer.java:101)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:182)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:141)
      at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:96)
      at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:416)
      at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:398)
      at javassist.expr.ExprEditor.doit(ExprEditor.java:112)
      at javassist.CtClassType.instrument(CtClassType.java:1374)
      at org.powermock.core.transformers.impl.MainMockTransformer.transform(MainMockTransformer.java:75)
      at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:215)
      ... 31 more
      Caused by: java.io.IOException: invalid constant type: 18
      at javassist.bytecode.ConstPool.readOne(ConstPool.java:1090)
      at javassist.bytecode.ConstPool.read(ConstPool.java:1033)
      at javassist.bytecode.ConstPool.<init>(ConstPool.java:149)
      at javassist.bytecode.ClassFile.read(ClassFile.java:737)
      at javassist.bytecode.ClassFile.<init>(ClassFile.java:108)
      at javassist.CtClassType.getClassFile2(CtClassType.java:190)
      ... 83 more
      </error>

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tmueller Tomasz Mueller
              Reporter:
              ibewes Wesley Brown
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 6 hours
                  1d 6h