• Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring Jar files - Can not find class def  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a simple swing webstart demo that worked great using the .jnlp file. Then, I converted it to work with the Spring Framework and HttpInvoker. I worked great when I ran it as an application from Webshpere RAD. However, after I created a new .jnlp file to inlcude / download the TreeDemo.jar and all the Spring jars as resources it throws a NoClassDefFoundError :

java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext

As I understand it from the Oracle / Webstart documentation the resource jars listed in the jnlp file should automatically be downloaded and included in the class path. It finds the Treedemo.jar main class but not the ApplicationContext class from the Spring jar. The confusing part is that ApplicationContext class is in fact in the spring.jar. I can drill down through org/springframework/context/ApplicationContext and get to it in the webapp lib folder as well as import it into classes at compile time.

So, it appears that it is in the class path when run as a application from RAD, but when served via WebStart it does not get included in the class path or it is not reachable by Web Start.


<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:9080/SOSWeb/" href="TreeDemo.jnlp">
<vendor>IBM - JWS example of HelloWorld</vendor>
<description>Tree Demo - Example of JWS</description>
<description kind="short">Tree Demo with Spring DB Access example</description>
<j2se version="1.6+"/>
<jar href="spring.jar"/>
<jar href="TreeDemo.jar"/>
<jar href="spring-web.jar"/>
<jar href="spring-webmvc.jar"/>
<jar href="commons-logging.jar"/>
<jar href="commons-pool.jar"/>
<jar href="commons-lang.jar"/>
<jar href="commons-httpclient.jar"/>
<jar href="xmlconfig.jar"/>

<application-desc main-class="org.sos.ss.client.hello.TreeDemo"/>

Any ideas ?
Thanks in advance.

Posts: 3752
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

In my project, the files listed as resource are still listed in classpath in manifest.mf file. I'm not sure whether this is required, but I don't have problems running the app.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!