java.lang.ClassNotFoundException: com.jme3.system.JmeDesktopSystem JME3 - java

When I try to simulate my little project, I decided to use jme3 library and browsed the jar file through Configure-> JDK Profiles-> Add Archieve-> JME3-core.jar and ran the project sample code. The code was written in a website and I got the exception as:
Mar 25, 2014 10:53:44 AM com.jme3.system.JmeSystem checkDelegate
SEVERE: No JmeSystemDelegate specified, cannot instantiate default JmeDesktopSystem:
{0}
java.lang.ClassNotFoundException: com.jme3.system.JmeDesktopSystem
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.jme3.system.JmeSystem.checkDelegate(JmeSystem.java:125)
at com.jme3.system.JmeSystem.showSettingsDialog(JmeSystem.java:96)
at com.jme3.app.SimpleApplication.start(SimpleApplication.java:129)
at Main.main(Main.java:12)
Exception in thread "main" java.lang.NullPointerException
at com.jme3.system.JmeSystem.showSettingsDialog(JmeSystem.java:97)
at com.jme3.app.SimpleApplication.start(SimpleApplication.java:129)
at Main.main(Main.java:12)
Process completed.
Is the problem about the native libraries kind of issue which is also need to be dealt with J3D libraries? I mean, do I need to follow some instructions about installing and importing JME3 libraries? If so, can anyone tell me the instructions or where to download the correct .jar file?

find a similar discussion here ..this might be relevant ...
more on the same http://hub.jmonkeyengine.org/forum/topic/latest-jme3-sdk-update-trashed-13-of-my-installations/

Related

Error with Slf4j and classpath

I would execute a maven project but my classpath is not correct...
I tried many possibilities without find any solution.
The compilation is successfull, but when I start the program, I have this following error :
[root#sandbox kafka-log-appender]# java -cp "target/kafka-log-appender-1.0-SNAPSHOT.jar:log4j-1.2.17.jar" com.log.kafka.RogueApplication
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at com.log.kafka.RogueApplication.<clinit>(RogueApplication.java:11)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 1 more
Thanks
Add slf4j.jar given in the below path:
http://www.java2s.com/Code/JarDownload/slf4j/slf4j.jar.zip
If the issue is not solved try with other slf4j jars suggested in the same page.
Look for slf4j-api.jar and any slf4j jar that references log4j and add those as well. There are two or three drivers for log4j. I don't know which one Kafka ships with, but if you see multiple, only put one on there as multiple can make slf4j have problems.

NoClassDefFoundError when using java impl of leveldb

for those who've managed to use this java implementation of leveldb https://github.com/dain/leveldb/
I'm getting the following stacktrace when I try to execute the code in the readme:
NoClassDefFoundError occurs when runing the following line:
DB db = factory.open(new File("example"), options);
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Lists
at org.iq80.leveldb.impl.DbImpl.(DbImpl.java:95)
at org.iq80.leveldb.impl.Iq80DBFactory.open(Iq80DBFactory.java:59)
at com.test.LevelDBDain.main(LevelDBDain.java:23)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Lists
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
I confirmed that new File("example") returns a non-null value; same as the variable options
I import two jars built from the source into my library:
1.leveldb-api.jar
2.leveldb.jar
I've tried this with releases 0.6, 0.7 and 0.8-SNAPSHOT and always get the same error.
Could it be something I'm doing wrong ...or missing?
com.google.common.collect.util from guava is a dependency of the leveldb library but for some reason adding it explicitly as a dependency for my java project solved the problem.

No class def found java

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpContext
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:119)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:103)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:362)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:344)
at Gethtml_fromS3.main(Gethtml_fromS3.java:16)
Caused by: java.lang.ClassNotFoundException: org.apache.http.protocol.HttpContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 5 more
Can any one give me a solution for the above error?
Please check if you have httpcore jar. I got rid of this error, after adding httpcore-4.2.jar to my lib.
It's difficult to pinpoint the exact reason why your application raises this exception, but a few common pointers that might help you.
The exception is raised when you are using a class in your code that isn't available when it runs. In this case, it seems you are unable to use org.apache.http.protocol.HttpContext. Most likely, you created an application that does include the Amazon AWS jar, but lacks the Apache HTTPClient jar.
If you used gradle/maven to create your application, include it in your dependencies. It it's a plain Java program, ensure the required JARs are available in your classpath (e.g. the same place as you currently have the Amazon jar located).

Cannot Get JOGL to run, compiles fine but error during execution

I followed the installation here:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#IntelliJ_IDEA
and
http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL
I'm using IntelliJ IDEA Community 13. Everything compiles nicely but when i go to run the code i get the error:
Exception in thread "main" java.lang.ClassNotFoundException: com.helljogl.OneTriangleSwingGLJPanel
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
I have OpenGL and Java experience, but for some reason this is giving me a huge headache.
I've been at it for hours and have seen similar problems, but found no solutions...
Any ideas?
Rather than adding the dependencies to the project through the IDE, use maven (or Gradle). There's no need to manually download the jogl jar files and mess around with your classpath. See How to set up IntelliJIdea for development using JOGL on Linux and Windows?
After so many Installation Attempts I had jogl.jars all over the place. After cleaning up my environment everything is going smoothly!

Trouble setting up lucene on Mac OSX

I'm having a lot of trouble getting Lucene to work on Mac OS 10.7.5
I downloaded the binaries from http://lucene.apache.org/core/2_9_4/demo.html.
I changed my classpath
$ echo $CLASSPATH
/Users/me/Downloads/lucene-4.5.1/demo/lucene-demo-4.5.1.jar:/Users/me/Downloads/lucene-4.5.1/core/lucene-core-4.5.1.jar
Now I'm trying to run it.
$java org.apache.lucene.demo.IndexFiles /Users/me/Downloads/lucene-4.5.1/src
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/lucene/analysis/standard/StandardAnalyzer
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.standard.StandardAnalyzer
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
It's not working. Can someone give me a step-by-step guide to getting up and running with Lucene. I have a simple task I want to do achieve, which is searching for text in a directory of files in a more efficient way than grep. Any help would be appreciated.
You'll also need to add two more jars to your classpath: lucene-analyzers-common-{version}.jar to fix this problem, and lucene-queryparser-{version}.jar to fix the next one. More recent demo documentation makes this clear (the documentation you linked to is for version 2.9.4)

Categories