Is there any one knows how to fix the error below. Before I have epubcheck-1.2.jar and it perfectly worked in my program and now i try to incorporate this new epubcheck-3.0.1.jar. I encounter this error. I am not a java developer, hope someone can help me here.. I need to upgrade my program because the for epub 2 and epub 3, or there is any one knows an offline validator.
Epubcheck Version 3.0.1
java.lang.NoClassDefFoundError: com/thaiopensource/validate/SchemaReaderFactory
at com.adobe.epubcheck.ocf.OCFChecker.<clinit>(OCFChecker.java:65)
at com.adobe.epubcheck.api.EpubCheck.validate(EpubCheck.java:205)
at com.adobe.epubcheck.tool.Checker.validateFile(Checker.java:172)
at com.adobe.epubcheck.tool.Checker.run(Checker.java:255)
at com.adobe.epubcheck.tool.Checker.main(Checker.java:182)
Caused by: java.lang.ClassNotFoundException: com.thaiopensource.validate.SchemaReaderFactory
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)
... 5 more
It's look like You missed at least one dependency
http://mvnrepository.com/artifact/com.thaiopensource/jing/20091111
here it is on maven. if you add this to your project anything should be ok.
Related
While Executing the Program, Below are the issues Compiler is throwing
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/collections4/ListValuedMap
at ReadExcel.main(ReadExcel.java:19)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.collections4.ListValuedMap
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)
... 1 more
Please help me know how to solve this
Thanks in advance
you should be good if you add the below jar.
https://mvnrepository.com/artifact/org.apache.commons/commons-collections4/4.1
You are missing some required class maybe check your version on pom.xml if you are using eclipse you can do cnt shift T and see if you can open the missing class (ListValuedMap)file and see if it comes from the same jar as you specified in your pom.
I'm new to Stanford NER and have some problems.
I have downloaded Stanford Named Entity Recognizer version 3.6.0. It works, no problem. But I can't get a tagged text as an output file. Read about extracting data on this site: http://www.themacroscope.org/2.0/using-the-stanford-named-entity-recognizer-to-extract-data-from-texts (Windows user).
Tried to do the same, but got a few errors in command line:
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFacto
ry
at edu.stanford.nlp.io.IOUtils.<clinit>(IOUtils.java:42)
at edu.stanford.nlp.ie.AbstractSequenceClassifier.loadClassifier(Abstrac
tSequenceClassifier.java:1484)
at edu.stanford.nlp.ie.AbstractSequenceClassifier.loadClassifierNoExcept
ions(AbstractSequenceClassifier.java:1497)
at edu.stanford.nlp.ie.crf.CRFClassifier.main(CRFClassifier.java:3015)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
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)
... 4 more
Can somebody explain what's wrong and how should I correct it?
Thank you!
You need to include the lib folder in your CLASSPATH. It contains the necessary jars.
Your program is missing a logger dependency (or somehow it's being blocked by another dependency). I'd try adding it manually:
http://mvnrepository.com/artifact/org.slf4j/slf4j-api/1.7.21
Side note: you can also give a try to illinois-NER.
After creating a number of Android apps using Java in Eclipse. I now need to create a stand alone Java program so that I can create an sqlite database - that will eventually be used in a future Android app.
I am using the SQLJet library from http://sqljet.com and have copied their example code.
When I try to run the code by using the "Run" button in Eclipse I get the following error.
Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/runtime/RecognitionException
at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine$2.runSynchronized(SqlJetEngine.java:282)
at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.runSynchronized(SqlJetEngine.java:217)
at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.readSchema(SqlJetEngine.java:276)
at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.getOptions(SqlJetEngine.java:299)
at nlmc.loader.apps4care.com.Test.main(Test.java:36)
Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.RecognitionException
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)
... 5 more
Now as the code has been copied without change, I am guessing there is nothing wrong with that and I suspect that I don't have my environment set up correctly. As a newbie Java developer (normally C#) I'm struggling to make sense of what the problem is. never mind the solution.
Code now working and the database is created. Unfortunately looks like it is not compatible with the sqlite3, the version Android uses. Back to the drawing board...!
The program needs the class org.antlr.runtime.RecognitionException. See here for a list of jars where you can find it: http://www.jarfinder.com/index.php/java/info/org.antlr.runtime.RecognitionException
EDIT: And here you can see all the dependencies for SQLJet: http://mvnrepository.com/artifact/org.tmatesoft.sqljet/sqljet/1.1.1
I am new to jUnit and unit testing in general, and have been trying to set up my testing environment and failing all day. This is trying to test a method in my android application.
I added a test class to the same package the java class is in. I added a method as below:
#Test
public void testIsExpectedNote() {
assertTrue(Frequency.isExpectedNote(440, "A"));
}//should return true
This fails with the following stack trace:
java.lang.NoClassDefFoundError: android/util/Log
at dataLogicLayer.Frequency.isExpectedNote(Frequency.java:13)
at dataLogicLayer.FrequencyTest.testIsExpectedNote(FrequencyTest.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
...
Caused by: java.lang.ClassNotFoundException: android.util.Log
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)
... 25 more
Any ideas what is going wrong? I have been playing with my run configurations and in the classpath i have:
jre system library [jre7]
junit 4
Do you have the android sdk in your classpath? search for the jar containing the class android.util.Log in your classpath
regards
Grub
The answer was to make a new project and do testing in there instead, must make it an android junit test, and make sure the run configs are correct. thanks to Grub for your help
Seems like you are mixing Android SDK and Java SDK. You should not be doing that. Android is a self sufficient library.
after about a month of not opening eclipse at all, I get a strange error
java.lang.NoClassDefFoundError: Z
Caused by: java.lang.ClassNotFoundException: Z
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)
Exception in thread "main"
I don't really understand what it wants, it doesn't show me anything else, something about main class "Z" not being defined? but it is, isn't it?
[CODE][/CODE] doesn't work very well here so I'll put source here: http://pastebin.com/heMhDqU2
Thank you.
Edit 1: it shows me when I try to compile and run. Btw, indent code by using 4 spaces for 500 lines... seems kinda reduntant
Your code is fine it compiles here.
Most probably an eclipse error.
Try this.
Close eclipse
Start eclipse with the flag .../eclipse.exe -clean
Press Project -- > Clean