File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JNLP and Web Start and the fly likes JNLP log4J Classnotfound Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "JNLP log4J Classnotfound Exception" Watch "JNLP log4J Classnotfound Exception" New topic
Author

JNLP log4J Classnotfound Exception

Ali Yuruz
Greenhorn

Joined: Oct 10, 2007
Posts: 8
I use Log4J as Logsystem. Wenn I start jnlp, i get the error:

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/log4j/Layout
at client.Start$2.propertyChange(Start.java:115)

- Do I need to insert the jar in WEB-XML?
- or should I pack in the jar.
Can anybody help??


SCJP
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

In the JNLP file there is a "jar" element. Its description (copied from the JNLP tutorial) says this:
Specifies a JAR file that is part of the application's classpath.

Notice it says "specifies a jar file" and not "specifies the jar file". So, you have several jar files you need to be in the application's classpath? Then you need the same number of "jar" elements in your JNLP file.
Ali Yuruz
Greenhorn

Joined: Oct 10, 2007
Posts: 8
What means that?
Have you got the tutorial?
My jnlp part looks like that:
<resources>
<j2se version="1.5+"/>
<jar href="client.jar"/>
<jar href="log4j-1.2.15.jar"/>
</resources>
Here, log4j is the library that i want to add to my classpath.
Client.jar ist the main jar which holds the business logic.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Originally posted by Ali Yuruz:
Have you got the tutorial?
I didn't post a link to the tutorial because I expected either that you had already read it, or that you would use "jnlp tutorial" as your google keywords to find it. Have you done neither of those things? What is your source of information for JNLP?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNLP log4J Classnotfound Exception