• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pergamon Porblem

 
Kevin Brown
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I am trying to get my crawler to pull off data from in this case a pdf file on a website.. But I get an exceptions and don't know what I am doing wrong..

Here is my code:


And this is the problem I get after build:


Exception in thread "pool-1-thread-1" java.lang.NoClassDefFoundError: org/pdfbox/pdfparser/PDFParser
at net.sourceforge.pergamon.parser.Parser.createPDFParser(Unknown Source)
at retrieverappsample2.Main$3.analyze(Main.java:124)
at net.sourceforge.retriever.URLParser.analyze(Unknown Source)
at net.sourceforge.retriever.URLParser.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
INFO MESSAGE: Crawler stopped on Fri Aug 08 22:06:15 MDT 2008
Caused by: java.lang.ClassNotFoundException: org.pdfbox.pdfparser.PDFParser
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

[edit]Add code tags. CR[/edit]
[ August 10, 2008: Message edited by: Campbell Ritchie ]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

It looks like the PDFBox library is not in the classpath. How are you running the code? If it's from the command line, are you using the -classpath switch?
 
Kevin Brown
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply

no using netbeans IDE I have loaded the jar file into the classpath but its still not finding the classes.. Not sure if I am setting this up right.
 
Kevin Brown
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ahh nevermind its an additional package..
 
Kevin Brown
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no tried adding the package its still screwy anyone know the right way to add packages into netbeans IDE??
 
Kevin Brown
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lol got it nevermind
 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say Kevin, there's a button that looks like a piece of paper and a pencil.

If you press that, you can edit your messages. It beats 4 messages in a row.

Because of clarity, please don't edit posts that have already had replies, or people (including me ) can get confused.
[ August 09, 2008: Message edited by: Rob Prime ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic