Current position:  Home > Default > Extra jar fetched but not loaded ?

Extra jar fetched but not loaded ?

Time:October 11
Advertisement
Hi there !
I have a very strange issue. I have planned to use JNLP to "deploy" a Java application via HTTP, but I ran into some issues I was able to reproduce even using very simple projects (e.g. a Blank desktop app).
The problem I have is that even though the JNLP file and all the resources are fetched correctly via HTTP (see Apache logs extracts below), the Java Console tells me it couldn't load a class although the jar file containing it is loaded correctly.
Here is the JNLP file (even with such a basic JNLP it fails) :
<jnlp codebase="http://lt087/dev/TestValidation/" href="launch.jnlp" spec="1.0+">
<information>
<title>ValidationApp for example purposes</title>
</information>
<update check="background"/>
<resources>
<j2se version="1.5+"/>
<jar href="TestValidation.jar" main="true"/>
<jar href="lib/appframework-1.0.3.jar"/>
<jar href="lib/swing-worker-1.1.jar"/>
</resources>
<application-desc main-class="validationapp.TestValidationMainApp" />
<security>
<all-permissions/>
</security>
</jnlp>
Here are the apache logs to confirm the files are fetched correctly :
172.29.55.147 - - [23/Nov/2010:09:55:25 +0100] "GET /dev/TestValidation/launch.jnlp HTTP/1.1" 200 677 "-" "JNLP/6.0 javaws/1.6.0_22 (b04) Java/1.6.0_22"
172.29.55.147 - - [23/Nov/2010:09:55:25 +0100] "GET /dev/TestValidation/TestValidation.jar HTTP/1.1" 200 119374 "-" "JNLP/6.0 javaws/1.6.0_22 (b04) Java/1.6.0_22"
172.29.55.147 - - [23/Nov/2010:09:55:25 +0100] "GET /dev/TestValidation/lib/swing-worker-1.1.jar HTTP/1.1" 200 13258 "-" "JNLP/6.0 javaws/1.6.0_22 (b04) Java/1.6.0_22"
172.29.55.147 - - [23/Nov/2010:09:55:25 +0100] "GET /dev/TestValidation/lib/appframework-1.0.3.jar HTTP/1.1" 200 272709 "-" "JNLP/6.0 javaws/1.6.0_22 (b04) Java/1.6.0_22"
And here is the exception I'm getting (after the dialog asking me to trust the editor) :
java.lang.NoClassDefFoundError: org/jdesktop/application/SingleFrameApplication
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClassCond(Unknown Source)
     at java.lang.ClassLoader.defineClass(Unknown Source)
     at java.security.SecureClassLoader.defineClass(Unknown Source)
     at java.net.URLClassLoader.defineClass(Unknown Source)
     at java.net.URLClassLoader.access$000(Unknown Source)
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
     at com.sun.javaws.Launcher.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.application.SingleFrameApplication
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     ... 16 more
I have tried running it from a stock VM running a standard 1.6.22 JRE but I had the same issue, does anyone have an idea why it fails ?
Advertisement
So you are saying that JaNeLA showed no red errors at the end of the changes?
As an aside, please use the code tags for code, XML/HTML or input/output. How to do it is described on the sticky post at the top of the forum listing. Here is how the code tags make XML appear..
<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
<jnlp spec="6.0+" codebase="http://lt087/dev/TestValidation/" href="launch.jnlp">
<information>
<title>ValidationApp</title>
<vendor>Example Inc</vendor>
<homepage href="http://www.example.com"/>
<description>Application de test pour validation</description>
<description kind="short">Validation App for example purposes</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<update check="always" policy="always" />
<resources>
<java version="1.6+" href="http://java.sun.com/products/autodl/j2se" />
<jar href="TestValidation.jar" main="true"/>
<jar href="lib/appframework-1.0.3.jar"/>
<jar href="lib/swing-worker-1.1.jar"/>
<jar href="lib/sqljdbc4.jar"/>
</resources>
<application-desc main-class="validationApp.TestValidationApp" />
</jnlp>Ahh.. and now I see it formatted, I note you have raised the minimum Java to 1.6, yet still include the swing-worker-1.1.jar. It would seem unnecessary.
What is the output of ?..
prompt> jar -tf appframework-1.0.3.jar

Required the details of jar files which is loaded in the database

-0001-11-30

Hi We are having a 10g database which is running under Solaris machine. There are lot of .jar files which are loaded into the database. I would like to know how to find those .jar file details atlease the name of the files which are loaded in the dat

Big .jar File - need a loading/info screen

-0001-11-30

Hi, my problem is that my midlet takes too long to run, because the jar file is quite big (1,5mb) and has a lot of txt files (around 6.500). Now you might wonder why i have a lot of files in my jar. I have a book which is devided into verse. The user

Loading jars with same class loader

-0001-11-30

Hi all, I need to tell Weblogic to load various jars using same class loader. "various jars" means jars that belong to different web applications. (weblogic 10) Is that possible ? PS: I can not change jar location, e.g. put them in common direct

Add a jar file to Java load path at run time

2015-10-11

Hi I loaded my file successfully , but when I tried to use the driver to connect to the DB , I get java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver Here is my class import java.net.URL; import java.io.IOException; import java.net.URLClassL

Unsigned jacob.jar file causing forms loading slow

-0001-11-30

Dear All, Oracle version : 10.1.2.0.2 OS: Windows 2003 Client IE version : IE 8 JRE version : JRE 1.6 update 21 JRE security setting : Mixed code (sandboxed vs. trusted) security verification - Disabled We are getting the unsigned jar file error for

Extra JAR's for Apache Soap w/ JDK 1.4.1

-0001-11-30

Hi Folks, I've seen all kinds of confusing info about what additional packages you need to have available for the Soap JAR from apache.org to work with various JDK's. Does anyone know what's required beyond the basic JDK JAR's that are part of 1.4.1?

.jar applet doesn't load deppending on the webserver...

-0001-11-30

Hi all, I've got a little problem with an applet I'm trying to deploy... it's a signed applet I call from a HTML like this: <applet code="pack1.pack2.TheMain" width="975" height="575" archive="pack.jar" MAYSCRIPT

Jar file - trying to load audio from within it

-0001-11-30

I am writing a Game using NetBeans. All works fine when run from within NetBeans, but problems occur when run from a JAR executable. The Audio files are not loading. I had a Similar problem with the Images, but resolved it with getResources() etc. An

Applet that archieve jar file fail to load picture

2015-10-11

hello... i already can display my applet , but the ploblem is the applet canot display the picture... the class that i include in the jar file is can run and will display the picture... wat is the ploblem? thanks...This is my full code package dir.ye

Can a processor get the resource (jar) an element was loaded from?

-0001-11-30

I'm writing an Annotation Processor (JSR 269). Once process the annotations in the Compilation Unit, I need to look for resources in some of the classes referenced in the Compilation Unit. After I do that I need to look in the jar that encloses the r

Customer ClassLoader:  keeping JWS from loading jars

-0001-11-30

I really like the ability of JWS to be able to download jars required for my application to run, but there are several jars that I need the ability to load up via a custom ClassLoader. But because JWS includes all of these jars in the classpath upon

Unable to load database driver from my applet's jar file

2015-10-11

I'm trying to set up an applet that will talk to a MySQL database. I have no problem connecting to the database as I'm developing the code ("un-jarred"), but when I create a jar file of my code to test through a web browser, I cannot connect to

Jinit not loading webutil jar files

2015-10-11

Hello, Our Application Server has had webutil installed on it for quiet some time now. I am implementing a custom Banner Form that requires webutil functionality. Well the form is all set, but the webutil portion does not function correctly. I have b

Loading separate JAR files.

2015-10-11

Hello. I have an application that loads functionality from separate jar files so that the application has a "hot deploy" feature. This means that the application reloads a certain functionallity if a new jar is deployed to that folder. This also

Java Applet fails loading JAR files

2015-10-11

I'm using the OC4J setup with my Oracle forms (10g) install, this was working but no longer. I get the message below when running the test.fmx from the Oracle Forms Services test page for each of the JAR files attempting to load. I comment out the AR

Using loadjava utility to load a 3rd party jar file

2015-10-11

Hi Folks,     I need to validate if a java class, stored into an Oracle Database, is able to connect to a SQLite database.     In order to connect to SQLite I'm using the the jar file sqlite-jdbc-3.7.2.jar that I got from  https://bitbucket.org/xeria

Error while Loading Mail.jar in Database

2015-10-11

Hi, I am trying to load mail.jar in Oracle 8i Database(ver. 8.1.5.0.0). It is giving error insufficient previleges. Then I extracted mail.jar and tried to load class PasswordAuthentication of mail.jar in user scott. It gave me same error. But I could

Iweb/fetch/godaddy hosting-not loading

2015-10-11

Need help. I designed my website on iweb and bought hosting thru godaddy, used fetch for FTP--tried to load the site and it wouldn't appear when I went to my site. I asked godaddy support for help. Here's how they answered: Currently your index.html

ClassLoader in JAR file not loading config file properly

2015-10-11

Hi all, I have an application that I am going to deploy using JavaWS, and everything works fine except for one little hitch. I have a configuration file, nvacconfig, located at NVAC.jar/config/nvacconfig. I'm trying to load this file into my applicat