Error during class instrumentation: com.sun.beans.finder.ClassFinder: java.lang.NullPointerException

I get this error when I run unit tests with coverage.

I'm using IntelliJ 14.1.4 with Java SDK 7_79.

Any ideas?

4 comments
Comment actions Permalink

Please check if you have coverage-error.log in the working directory of the tests.

Anna

0
Comment actions Permalink

If you can reproduce it with a small sample project, please submit a bug at http://youtrack.jetbrains.com/issues/IDEA .

0
Comment actions Permalink

[2015.06.25 07:09:54] (Coverage): Error during class instrumentation: com.sun.beans.finder.ClassFinder
java.lang.NullPointerException
 at com.intellij.rt.coverage.instrumentation.Instrumentator$MyClassWriter.typeInfo(Instrumentator.java:370)
 at com.intellij.rt.coverage.instrumentation.Instrumentator$MyClassWriter.getCommonSuperClass(Instrumentator.java:295)
 at org.jetbrains.org.objectweb.asm.ClassWriter.getMergedType(ClassWriter.java:1654)
 at org.jetbrains.org.objectweb.asm.Frame.merge(Frame.java:1426)
 at org.jetbrains.org.objectweb.asm.Frame.merge(Frame.java:1325)
 at org.jetbrains.org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1475)
 at org.jetbrains.org.objectweb.asm.MethodVisitor.visitMaxs(MethodVisitor.java:866)
 at com.intellij.rt.coverage.instrumentation.SamplingInstrumenter$1.visitMaxs(SamplingInstrumenter.java:99)
 at org.jetbrains.org.objectweb.asm.ClassReader.readCode(ClassReader.java:1554)
 at org.jetbrains.org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1017)
 at org.jetbrains.org.objectweb.asm.ClassReader.accept(ClassReader.java:693)
 at org.jetbrains.org.objectweb.asm.ClassReader.accept(ClassReader.java:506)
 at com.intellij.rt.coverage.instrumentation.Instrumentator.instrument(Instrumentator.java:193)
 at com.intellij.rt.coverage.instrumentation.Instrumentator.access$000(Instrumentator.java:41)
 at com.intellij.rt.coverage.instrumentation.Instrumentator$1.transform(Instrumentator.java:154)
 at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
 at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
 at com.sun.beans.finder.InstanceFinder.instantiate(InstanceFinder.java:93)
 at com.sun.beans.finder.InstanceFinder.find(InstanceFinder.java:66)
 at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:438)
 at java.beans.Introspector.<init>(Introspector.java:388)
 at java.beans.Introspector.getBeanInfo(Introspector.java:163)
 at org.apache.log4j.config.PropertySetter.introspect(PropertySetter.java:83)
 at org.apache.log4j.config.PropertySetter.getPropertyDescriptor(PropertySetter.java:294)
 at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:140)
 at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
 at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:772)
 at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
 at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
 at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
 at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
 at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
 at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
 at com.mbs.rlData.dataLayer.DatabaseTestCase.<clinit>(DatabaseTestCase.java:26)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
 at junit.framework.TestSuite.createTest(TestSuite.java:131)
 at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
 at junit.framework.TestSuite.<init>(TestSuite.java:75)
 at junit.framework.TestSuite.addTestSuite(TestSuite.java:101)
 at com.eclipsys.hl7.data.AllDataTests.suite(AllDataTests.java:18)
 at com.eclipsys.AllEclipsysHL7Tests.suite(AllEclipsysHL7Tests.java:30)
 at com.AllHL7Tests.suite(AllHL7Tests.java:21)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at com.intellij.junit3.TestRunnerUtil.createClassOrMethodSuite(TestRunnerUtil.java:122)
 at com.intellij.junit3.TestRunnerUtil.getTestSuite(TestRunnerUtil.java:81)
 at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:50)
 at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
 at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

0
Comment actions Permalink

It works fine with a simple project. It must be some issue with my class path in my unit test code. I'll keep looking.

0

Please sign in to leave a comment.