I am trying to publish an Atom/RSS feed in my Java based Google App Engine code. I have tried using Rome and keep getting the following error (tried googling without success), also the code I am running that generates the error is the demo code (so I get the feeling Rome won't work with GAE)
java.lang.NoClassDefFoundError: org/jdom/JDOMException
at com.sun.syndication.io.SyndFeedOutput.<init>(SyndFeedOutput.java:44)
What I am looking for is recommendations for a simple Java library to create and publish an Atom feed from within Google App Engine.
Thanks.
java.lang.NoClassDefFoundError: org/jdom/JDOMException
This just means that the particular class is missing in the runtime classpath (while it was available in the compiletime classpath, that's the difference with ClassNotFoundException).
Logical next step would be to include the particular class (or more actually, the JAR file with the particular class) in the runtime classpath. Then this error wil gone.
Check your compiletime classpath if it is there and add it to runtime classpath. Or if it is actually a dependency which you don't have yet, then it's good to know that the package name already hints that you could find and download it at http://jdom.org.
#Adriana and any other people late to the thread:
What Balus meant was that the original poster, was missing the JDOM library, which can be downloaded at http://jdom.org/. You just need to add the .jar to the classpath, which the ROME demo code apparently was lacking.
Related
Hey guys I am working on a Scala/Java project and we are using OpenCv to image processing. I have been stuck for several days trying to import the library, I went through different errors but right now the one I am having in the last attempts is
Uncaught error from thread [application-akka.actor.default-dispatcher-9]: org.opencv.imgcodecs.Imgcodecs.dicomJpgMatRead_0(JII)J, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[application
java.lang.UnsatisfiedLinkError: org.opencv.imgcodecs.Imgcodecs.dicomJpgMatRead_0(JII)J
Please, I would be very grateful if someone could help me. I don't know what else to try.
Thank you in advance!
This generally happens when your code has access to the class when you compile but not when you run. In many IDEs it's due to where you are placing the classes or how you are deploying the code.
UnsatisfiedLinkError refers specifically to a DLL (or Lib in Linux) that it isn't finding at runtime. Does your running code have access to the dynamically linked library? (obviously not, find out why)
Hey guys thank you for the response. I try (at least I think) all the solutions I found including the onces that are in the link you mentioned #zoranjeremic.
I am working with a Java project that has inside one class "JDicomImageLoader" that is the one who needs the opencv library. Inside of it I have a method call setup:
Now I am using a System.load with absolute path but I also try doing System.loadLibrary with the respective "java.library.path".
Then I am compile this Java project (sbt compile) and publish locally (sbt publishlocal) to use in my Scala project.
Downloaded the Neuroph 2.9 library to include in my Java project. The library is linked into the project like so:
But using any classes in the library results in the error:
Full admission: I am a noob with linking libraries in Java, and Google doesn't seem to have anything useful. Apparently I need to dive into the "Classpath" or some .xml config file, does anyone with more Java experience know where to start (do they recognise the java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory error)? I don't think it's necessarily an issue with this particular library, but I've linked it in the wrong way or missed an important step.
Solved by adding neuroph-2.9\libs\slf4j-api-1.7.5 and neuroph-2.9\libs\slf4j-nop-1.7.6 to the Project Libraries.
Do not link all of the jars inside that folder. This results in the error "SLF4J: Class path contains multiple SLF4J bindings."
I'm working on a Java project with a native library in question. I believe that another version is being loaded when I try to use it from a non-Netbeans environment- when I debug the file in Netbeans, it works as expected, but when I run it from anywhere else, it hits a "NoSuchMethodError", leading me to believe that there is another instance (in the wrong version) being loaded
I've already examined my java.library.path and removed all other instances of the library beyond the dist/lib, but the error persists. Is there an easy way to find the location of a loaded library, so that I might be able to find out what is happening?
Im working on building a java application in windows vista using the Emotiv Epoc Neuroheadset, http://emotiv.com/index.php.
I'm new to java and having a really tough time getting started. I have some examples that came with the headset I'm trying to run in either eclipse or netbeans (at this point I really don't have a preference, suggestions?)
The user manual gives these directions:
*2. Package content: Jna.rar, Edk.java, EmoState.java, EDkErrorCode.java
Example 1: EEGLog
Example 2: EmoStateLog
Developer‘s guide: Step 1: Add the JNA library to your project. Step 2: Add Edk.java, EmoState.java, EdkErrorCode.java to your project. The classes in these files contain methods calling the APIs from Edk.dll using JNA library. You can find more information about the conversion between data types on the JNA's homepage.*
This is all Chinese to me! Can someone explain to me exactly how to do these steps (in a way a small child who have never used eclipse or netbeans before can understand!) Somebody from the Emotiv Epoc forum gave me these directions as well:
*To see how to Java wrapper examples work you should install Eclipse and open, compile them. You put edk_utils.dll and edk.dll into System32 or the same root directory of each example as EmoStateLog, CognitivExample,... before running them.*
My problem is I dont know enough about the IDEs to run these examples. Am I supposed to make a new project then add these files? Or do I open one of the examples, then add the .dll files and the JNA library? How do you add libraries to a project? Where do I put the .dll files?
Thanks in advance!
I know this is fairly simple stuff but its always the simple stuff thats hardest to figure out it seems!
-Eric
Based purely off of what you're saying here...
Developer‘s guide: Step 1: Add the JNA library to your project. Step 2: Add Edk.java, EmoState.java, EdkErrorCode.java to your project. The classes in these files contain methods calling the APIs from Edk.dll using JNA library. You can find more information about the conversion between data types on the JNA's homepage.*
Create a new project in Eclipse.
Add Edk.java, Emostate.java, EdkErrorCode.java into the src folder
Add the JNA library into the libs folder. (Make sure the library is in the project path, otherwise Eclipse won't detect it.)
Whether or not it will compile depends on if those are the only supporting files.
I had an issue where I was getting the following error in the Problems view when attempting to save/compile a Java script library in a DB held on a server. I'm using DDE 8.5.3 (Note, I've changed the app and the lib names):
Project 'app_name.nsf.java-lib-name.javalib' is missing required library: 'C:\lotus\notes8\jvm\lib\axis\axis.jar'
It's worth noting that I'm using the Eclipse based Java editor, this issue doesn't happen if I use the traditional editor.
My script library had a number of JAR files associated, however none of them were included via the path which appeared to be causing the issue. Also it couldn't have been some deeply concealed dependency thing as all of the included JARs are custom built and none of them user or require Axis.
I also did a test creating a fresh library without pulling any external JARs in and the same error occurred.
It turns out the problem was being caused by the use of "JavaUserClassesExt" in my local notes.ini. I've recently been using a LN client app which depends on Axis and part of the install process includes dropping the relevant Axis files into a custom directory within jvm/lib/ext and then updating the ini to include those files using "JavaUserClassesExt" when launching the JVM.
I guess the issue has only shown up now because I've recently had to change the location of my LN install from the path indicated above (lotus\notes8) to something slightly different (lotus\notes853). I copied my ini across from the original install location which is why it still references the old path. Once I removed the references to the wrong path, the error cleared up.
So I can kind of understand what is happening, the JVM is attempting to load all required files on the classpath but is running into an issue because the files being requested via "JavaUserClassesExt" can no longer be found.
What I don't understand is why it's throwing this error when I'm attempting to edit a script library in a completely different database which has nothing to do with the Axis framework. I'd expect a compile error if trying to import anything to do with Axis based on it being on my local classpath, but to throw this error when the library has nothing to do with Axis seems confusing and incorrect to me.
As I mentioned, this only happens when using the Eclipse based Java editor so I presume this is a bug with that version of the editor.
Has anyone come across anything similar? Would this be classed as expected behaviour or can anyone confirm if this is a bug?
I realise this is a pretty edge case issue but would be interested in any insight.
Cheers,
Lee