Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" java.lang.NoClassDefFoundError: edu/berkeley/nlp/lm/io/MakeKneserNeyArpaFromText #7

Closed
GoogleCodeExporter opened this issue Jul 16, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Download berkeleylm-1.0.0 or berkeleylm-1.0b3
2. Run examples\make-kneserney-arpa-from-raw-text.sh without the -server option

What is the expected output? What do you see instead?
Generate the ngram arpa file

What version of the product are you using? On what operating system?
1.0.0 or 1.0b3

Message Error:
--------------
Exception in thread "main" java.lang.NoClassDefFoundError: 
edu/berkeley/nlp/lm/io/MakeKneserNeyArpaFromText
Caused by: java.lang.ClassNotFoundException: 
edu.berkeley.nlp.lm.io.MakeKneserNeyArpaFromText
        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: 
edu.berkeley.nlp.lm.io.MakeKneserNeyArpaFromText.  Program will exit.

Original issue reported on code.google.com by Eng.Sa...@gmail.com on 19 Feb 2012 at 12:38

@GoogleCodeExporter
Copy link
Author

Can you give me a few more details? Does it work with the -server option? Can 
you report the actual command you are using? 

Thanks,

Adam

Original comment by adpa...@gmail.com on 19 Feb 2012 at 5:45

@GoogleCodeExporter
Copy link
Author

No more details. I tried to download both of the stated versions and generate 
ngrams for raw text file using your example, but it didn't work.

The command is:

java -ea -mx1000m -cp ../src edu.berkeley.nlp.lm.io.MakeKneserNeyArpaFromText 5 
kneserNeyFromText.arpa ../test/edu/berkeley/nlp/lm/io/big_test.txt

Please let me know if you need more info.

Original comment by Eng.Sa...@gmail.com on 19 Feb 2012 at 6:09

@GoogleCodeExporter
Copy link
Author

Does it work with the -server option? And did you first run the build script?

I'll have a chance to test things out soon, but am away from my home computer 
right now. 

Original comment by adpa...@gmail.com on 19 Feb 2012 at 6:14

@GoogleCodeExporter
Copy link
Author

No it doesn't and I didn't run the build script. Do I have too?

The code I downloaded already has the JAR files and no need to re-build the src.

Original comment by Eng.Sa...@gmail.com on 19 Feb 2012 at 6:52

@GoogleCodeExporter
Copy link
Author

Yes, that script does assume you've run the build. You could change the 
classpath (-cp) to point to the jar instead of the src directory. (The src 
directory would contain the compiled .class files if you ran the script).

Sorry for the confusion,

Adam

Original comment by adpa...@gmail.com on 19 Feb 2012 at 7:55

  • Changed state: WontFix

@GoogleCodeExporter
Copy link
Author

Thanks. Problem has been resolved.

Sadek

Original comment by Eng.Sa...@gmail.com on 20 Feb 2012 at 6:39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant