I am trying to migrate an application from Websphere to Tomcat and facing an issue.
Class not found: com.ibm.websphere.rsadapter.DB2AS400DataStoreHelper
I have this jar com.ibm.ws.runtime-8.5.5.1 in the lib, but it doesn't have this particular DB2AS400DataStoreHelper class inside rsadapter package.
I want to find out the jar or the version number which has DB2AS400DataStoreHelper class.
4:23:42 PM: Caused by: com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException: DSRA8050W: Unable to find the DataStoreHelper class specified: com.ibm.websphere.rsadapter.DB2AS400DataStoreHelper
at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:441)
at com.ibm.ws.rsadapter.DSConfigHelper.createDataStoreHelper(DSConfigHelper.java:797)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.<init>(WSRdbDataSource.java:1153)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.setDataSourceProperties(WSManagedConnectionFactoryImpl.java:2644)
... 72 more
Caused by: java.lang.ClassNotFoundException: com.ibm.websphere.rsadapter.DB2AS400DataStoreHelper
at java.net.URLClassLoader.findClass(Unknown Source)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:204)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:119)
at java.lang.ClassLoader.loadClass(Unknown Source)
Related
I checked out https://github.com/jhipster/jhipster-sample-app-gradle imported the project into eclipse Version: 2020-03 (4.15.0), installed gradle plugin. When I try to run the Junit test Right click -> Run as Junit I keep getting
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/junit/platform/engine/EngineDiscoveryListener
at org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.getLauncherDiscoveryListener(LauncherDiscoveryRequestBuilder.java:241)
at org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.build(LauncherDiscoveryRequestBuilder.java:235)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createUnfilteredTest(JUnit5TestLoader.java:75)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createTest(JUnit5TestLoader.java:66)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.loadTests(JUnit5TestLoader.java:53)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:526)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.lang.NoClassDefFoundError: org/junit/platform/engine/EngineDiscoveryListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 9 more
Caused by: java.lang.ClassNotFoundException: org.junit.platform.engine.EngineDiscoveryListener
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 21 more
I tried searching all over but couldn't find a solution that works, Anybody had the same issue and got it resoled please provide the solution
enthusiast,
Just add
testImplementation('org.junit.platform:junit-platform-launcher:1.5.2')
to the dependencies section in build.gradle file, refresh gradle (on eclipse, on the context menu of the project > Gradle > Refresh Gradle Project). You should be able to run tests one by one.
Happy coding
I have a working Tomcat 8 environment under Eclipse 4.9 IDE 2018‑09 and am trying to add a Tomcat 9 server to Eclipse for testing but upon Tomcat startup I am getting the following No Class Found error. Previously a lib tomcat-util.jar was needed but that doesn't seem to exist with Tomcat 9. Any help would be appreciated.
java.lang.NoClassDefFoundError: org/apache/tomcat/util/file/ConfigurationSource
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:264)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:461)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.util.file.ConfigurationSource
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more
So it looks like I might have had a bad download from a Tomcat mirror. I re-downloaded version 9.0.14 from the tomcat archive and it works fine now. The ConfigurationSource class is in the tomcat-util.jar and the jar was missing from the download.
Tomcat 9.0.14 archive download
While setting up a JUNIT class for a uni project I keep getting the following error (working in Eclipse Oxygen):
Class not found UnitTest
java.lang.ClassNotFoundException: UnitTest
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:688)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Cant really figure out whats going on, already tried a few question-related answers like clean up the project and checking that the test is running from my project/bin folder.
Hi I am working on weka api in Eclipse Mars. Everything was fine until i wrote a class for LinearRegression, just then Eclipse started giving JNI error. Now other classes runs fine but when i try to run LinearRegression class the error pops up.
The first error is Error: A JNI error has occurred, please check you installation and try again followed by JVM launcher error "A java exception has occurred". And then a list of errors
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
I will appreciate if someone could help me with this problem. Thanks.
I have tried running the demo msgsend from JavaMail. I have downloaded version 1.4.5 of JavaMail and unpacked it into my JDK folder. I have added mail.jar to CLASSPATH. I have compiled msgsend.java without getting any error back. However, when I then try running java msgsend I get an "Could not find the main class: msgsend" error.
I am a total noob in Java world and have spend hours browsing through the Internet trying to find an answer but to no avail in my case.
Here is what I get in the console. What am I doing wrong?
C:\Program Files\Java\jdk1.6.0_34\javamail-1.4.5\demo>echo %CLASSPATH%
C:\Program Files\Java\jdk1.6.0_34\javamail-1.4.5\mail.jar
C:\Program Files\Java\jdk1.6.0_34\javamail-1.4.5\demo>javac -cp "%classpath%" ms
gsend.java
C:\Program Files\Java\jdk1.6.0_34\javamail-1.4.5\demo>java msgsend
Exception in thread "main" java.lang.NoClassDefFoundError: msgsend
Caused by: java.lang.ClassNotFoundException: msgsend
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: msgsend. Program will exit.
C:\Program Files\Java\jdk1.6.0_34\javamail-1.4.5\demo>java -cp "%classpath%" msg
send
Exception in thread "main" java.lang.NoClassDefFoundError: msgsend
Caused by: java.lang.ClassNotFoundException: msgsend
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: msgsend. Program will exit.
C:\Program Files\Java\jdk1.6.0_34\javamail-1.4.5\demo>
Classes are case sensitive. Be sure you have the compiled MsgSend in your class path, and invoke the compiled class with the proper case.
Try java MsgSend
Edited:
This is how it will work:
Compile as you were doing:
javac.exe -cp ..\mail.jar msgsend.java
And then to run the compiled class do:
java -cp ..\mail.jar;. msgsend
In other words: you were missing the current folder in your classpath.
You didn't include the directory where msgsend.class exists, usually the current directory ("."). See the examples in README.txt included with JavaMail.