Can not get an Output file in Stanford NER - java

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.

Related

Eclipse: export java library with dependencies

I am trying to export a java library in eclipse that has other dependencies - namely apache commons-io. I was able to export it by going to Export >> Jar File - making sure that the libraries are ticked in the "Select the resources to export" box. However, when I implement the library into a test class and run it; I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
at com.jwf.JavaWebFramework.main.PageBuilder.copyInputFiles(PageBuilder.java:135)
at com.jwf.JavaWebFramework.main.PageBuilder.build(PageBuilder.java:44)
at com.jwf.JavaWebFramework.main.JWF.init(JWF.java:18)
at com.jwf.JWFTest.JWFTest2Main.main(JWFTest2Main.java:23)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
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
For whatever reason, Eclipse doesn't appear to be finding the FileUtils class.
Any advice would be greatly appreciated.
Cheers!

ListValuedMap NoClassDefFoundError when Reading Excel using Apache Poi?

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.

Error Console in Spigot server

Pops up that error on the console:
Please help me guys i need this for now!
Error:
[13:36:23] [Server thread/ERROR]: Ambiguous plugin name `'KwadratowyHardcore' for files `plugins\KHH.jar' and `plugins\KH.jar' in `plugins'
[13:36:23] [Server thread/INFO]: Set PluginClassLoader as parallel capable
[13:36:23] [Server thread/ERROR]: Could not load 'plugins\KHH.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.skyter.hardcore.HardcorePlguin'
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:66) ~[spigot_server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot_server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot_server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot_server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot_server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot_server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot_server.jar:git-Spigot-db6de12-18fbb24]
at java.lang.Thread.run(Unknown Source) [?:1.7.0_21]
Caused by: java.lang.ClassNotFoundException: me.skyter.hardcore.HardcorePlguin
at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_21]
at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_21]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_21]
at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_21]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot_server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot_server.jar:git-Spigot-db6de12-18fbb24]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_21]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_21]
at java.lang.Class.forName0(Native Method) ~[?:1.7.0_21]
at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_21]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot_server.jar:git-Spigot-db6de12-18fbb24]
Server it spigot 1.8.9!
I compiles with bukkit api 1.7.2, 1.8.8 and spigot 1.8.9 and craftbukit 1.8.9
The plugin is invalid. Always look for the line with Caused by: (Ctrl+F). You should let the developer of the plugin know.
Caused by: java.lang.ClassNotFoundException: me.skyter.hardcore.HardcorePlguin
Tells you, that the class with this path could not be found, therefor the plugin is invalid / not able to run.
Make sure the paths match, and check your plugin.yml for the wrong path
You have your main class setted worng in plugin.yml
Try to delete KHH.jar or KH.jar (the older one), maybe having the same plugin twice causes a problem.
Ambiguous plugin name `'KwadratowyHardcore' for files `plugins\KHH.jar' and `plugins\KH.jar' in `plugins'
If that doesn't solve the error, look at the other posts here, then the plugin.yml is the problem.
I see two problems here:
In your plugin.yml, the "main" value doesn't point to the actual
class that extends "JavaPlugin".
There are two files containing the plugin with the same name, so
Spigot doesn't know which one to use. Delete the older one and it would be fine.
Cannot find main class `me.skyter.hardcore.HardcorePlguin'
I would recommend changing this to where your Main class that extends JavaPlugin is located. I also see a spelling issue, me.skyter.hardcore.HardcorePlguin. That's where your error is.
You need to make sure that you specifically indicate your Main class (the class with 'extends JavaPlugin') in your plugin.yml file.
It should look something like this:
main: com.YouWebsite.PackageName.Main
name: ProjectName
version: 1.0
author: YourName
If you don't identify where your Main class is, your plugin won't be able to run properly.
You can identify what the issue is in the error message that says:
org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.skyter.hardcore.HardcorePlguin'

how can i fix the error in epubcheck 3.01.jar

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.

Having trouble running code in Eclipse using JOGL

I'm trying to run an application in eclipse which is setup as MVC app and it is the solution code posted by our professor for a homework. After I copy and pasted all of the classes and tried to run it, I got the following error:
JOGL> Hello JOAL Exception in thread "main" java.lang.NoClassDefFoundError: com/jogamp/openal/JoalVersion at jogamp.opengl.openal.av.ALDummyUsage.main(ALDummyUsage.java:14) Caused by: java.lang.ClassNotFoundException: com.jogamp.openal.JoalVersion 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) ... 1 more
I'm not entirely sure what the issue is and apparently no one else has been having the same issue.
My buildpath has a library I titled "JOGL" and I added the external jars gluegen-rt.jar and jogl-all.jar as was instructed by the professor.
Thanks for the help!
Actually, your code uses JOAL too, you need to put joal.jar into your classpath (Build path in Eclipse) and you need to put the JAR(s) containing its native libraries into the same directory as you did for JOGL and GlueGen. I assume you followed these instructions:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Eclipse_IDE_project
Edit.: You don't run your own program for your homework, you try to run ALDummyUsage which is in JOGL itself. If you want to run your own program with your own main class, rather right-click on it and choose "Run As" -> "Java application" in Eclipse.

Categories