I was running a JUnit Test on a code that accessed data from a database via a stored proceudre. The output of the stored proc is an Oracle Type object. It threw the following error:
java.lang.NoClassDefFoundError: weblogic/utils/wrapper/WrapperImpl
…. (application related methods)…
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
But the same use case worked fine within the web environment. Turns out that the missing jar was com.bea.core.utils.wrapper-1.3.0.0.jar. Add this to your test classes or if you are using Maven – add it to pom.xml in test scope:
<dependency> <groupId>oracle.weblogic.modules</groupId> <artifactId>com.bea.core.utils.wrapper</artifactId> <version>1.3.0.0</version> <scope>test</scope> </dependency>