aspose file tools*
The moose likes Beginning Java and the fly likes Pergamon Porblem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Pergamon Porblem" Watch "Pergamon Porblem" New topic
Author

Pergamon Porblem

Kevin Brown
Greenhorn

Joined: Aug 08, 2008
Posts: 5
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
Marshal

Joined: Mar 22, 2005
Posts: 42945
    
  68
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

Joined: Aug 08, 2008
Posts: 5
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

Joined: Aug 08, 2008
Posts: 5
ahh nevermind its an additional package..
Kevin Brown
Greenhorn

Joined: Aug 08, 2008
Posts: 5
no tried adding the package its still screwy anyone know the right way to add packages into netbeans IDE??
Kevin Brown
Greenhorn

Joined: Aug 08, 2008
Posts: 5
lol got it nevermind
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19790
    
  20

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 ]

SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pergamon Porblem