Help save net neutrality! Learn more.

#108 ClassNotFoundException after update to 2.x

Version 2.0.1
JaCoCo (32)

Since a update to eclemma 2.x (2.0.1 to be exact) i cannot cover oracle projects, because of : "java.lang.ClassNotFoundException:"

It seems like the new eclemma is now 'preloading' all classes (, but there is actually no OracleWallet. (And it is not needed) So this will fail. The normal Classloader as well as the old eclemma one, didn't have this problem.

Btw, the Workaround: just create a empty "" Class. In case of the Oracle driver i can live with that workaround, because it's only one class. But i guess there are other libraries with similar effects and a whole bunch of missing classes.

driver : -> ojdbc14-
Java : 1.6.0_17 (Sun)
eclemma : 2.0.1
eclipse : latests, indigo sr1
OS : windows 7, x64

Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
java.lang.NoClassDefFoundError: oracle/security/pki/OracleWallet
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(
at org.apache.commons.dbcp.BasicDataSource.createDataSource(
at org.apache.commons.dbcp.BasicDataSource.getConnection(
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(
at org.hibernate.cfg.SettingsFactory.buildSettings(
at org.hibernate.cfg.Configuration.buildSettings(
at org.springframework.test.context.TestContext.loadApplicationContext(
at org.springframework.test.context.TestContext.getApplicationContext(
at org.springframework.test.context.TestContextManager.prepareTestInstance(
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(
at org.junit.runners.BlockJUnit4ClassRunner.runChild(
at org.junit.runners.ParentRunner$
at org.junit.runners.ParentRunner$1.schedule(
at org.junit.runners.ParentRunner.runChildren(
at org.junit.runners.ParentRunner.access$000(
at org.junit.runners.ParentRunner$2.evaluate(
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
Caused by: java.lang.NoClassDefFoundError: oracle/security/pki/OracleWallet
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(
... 87 more
Caused by: java.lang.ClassNotFoundException:
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
... 90 more


  • Marc R. Hoffmann

    When looking at the Oracle driver class files there actually is a indirect dependency to the missing class:

    oracle.jdbc.OracleDriver extends oracle.jdbc.driver.OracleDriver which in turn has several methods with local variables of type

    But still no clue why this is only a problem when the JaCoCo agent instrumented the driver classes.

  • Marc R. Hoffmann

    Marc Steffens pointed out, that this problem seems to be JaCoCo version specific. A detailed analysis reveals that the problem happens with JaCoCo 0.5.1 or younger:

    0.4.1 ok
    0.5.0 ok
    0.5.1 CNFE
    0.5.2 CNFE
    0.5.3 CNFE
    0.5.4 CNFE
    0.5.5 CNFE

    With 0.5.1 I reworked the way how probes for conditional jumps are inserted to guarantee correct stack map frames. The class files in question have version 1.2, so stack map frames shouldn't be inserted here. But anyways, with 0.5.1 the resulting control structures have changed.

  • Marc R. Hoffmann

    • labels: --> JaCoCo
  • Marc R. Hoffmann

    With JaCoCo 0.5.8-SNAPSHOT the instrumentation strategy has been reworked and the ClassNotFoundException does not occur anymore.

  • Marc R. Hoffmann

    This problem has been resolved with the latest JaCoCo 0.5.8-SNAPSHOT build. The next EclEmma release will then ship with the fixed JaCoCo version.

  • Marc R. Hoffmann

    • status: open --> closed-fixed
  • Marc R. Hoffmann

    Fixed in EclEmma 2.1.3.