Jar file corrupt error in JNLP

Hello there,

I am developing a java swing application which i wanted to make it available on our corporate network for demo purpose.

The java application uses oracle 10g database which i made it to run with web start i.e converted to jnlp.now the jnlp works fine on my computer i mean using

<jnlp spec="1.0+" codebase="file:///C:/Project/jnlp/">

but when i try to run it from my apache server

<jnlp spec="1.0+" codebase="http://192.168.205.81" href="testJdbc.jnlp">

,i get jar corrupt error.i also tried to open the jar file from my apache webroot.but i get the same error.but when i tested a simple jnlp application from apache it works fine.but the difference between the two test is the simple jnlp has only jar fine which is the application.the other apllication has two jar files one for the application and another for oracle jdbc driver.please help. one thing to mention is

when i clcik on the jnlp file in the browser,i get to see the java web start which shows the progress bar and mentioning downloading ojdbc14.jar which starts loading,then it says reading ojdbc14.jar which goes to 100 % and then it displays a box requested http://123.122.22.11/ojdbc14.jar and error saying corrupted ojdbc14.jar(which is the name of the jdbc jar file) .

please help i have been stuck on this for the past one week.

[1380 byte] By [zolfja] at [2007-10-3 4:45:14]
# 1
Hi! Maybe the jar file is really corrupted. Try deleting that jar and creating a new one. You can also check if the jar is corrupted by trying to open it with a zip program like winzip.
stevehaggaipersonala at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 2
i can open the jar file with winzip.but cannot open the jar file from the browser.please help.i have reached a dead end with this problem.
zolfja at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 3
the jar file works fine from the cmd promptjava -jar file.jarit also works with jnlp from specifying the folder name and the application runs.but when i try to run the application from my apache server.i get this error.
zolfja at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 4
Can you try these..1. Try opening the webpage in Firefox instead of IE. 2. Check your jnlp file. By chance you might have specified a wrong file instead of the actual file.If you don't mind can you show the contents of the jnlp file itself?
stevehaggaipersonala at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 5

<?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+"

codebase="http://127.0.0.1/" href="TestDSL.jnlp"

>

<information>

<title>Check</title>

<vendor>Developer Connection</vendor>

<description>Demonstration</description>

</information>

<offline-allowed/>

<security>

<all-permissions/>

</security>

<resources>

<j2se version="1.2+" />

<jar href="dedslam.jar"/>

<jar href="ojdbc14.jar"/>

<jar href="sqljdbc.jar"/>

</resources>

<application-desc main-class="src.com.victa.Login" />

</jnlp>

zolfja at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 6
Hi!I am not able to find an error but could you just visit this link http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4991229Maybe you have the same problem. Are you using JDK 1.4.2? Try getting the latest JDK.
stevehaggaipersonala at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 7
I checked it with firefox.but no use
zolfja at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 8
so according to you i need to update my java from j2sdk 1.4.2_7 to 1.5
zolfja at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 9
Yes, why don't you give it a try.
stevehaggaipersonala at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 10
ok i will give a try. by the way do i only update JRE or update SDK too?
zolfja at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 11
ok i will give a try. by the way do i only update JRE or update SDK too?
zolfja at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 12
Try1. Clearing the webstart cache http://www.elluminate.com/support/faqs/jws_clear_cache.jsp2. Look at the last entry in this link. I am sure that might be the problem. Hope this helps. http://discussion.forum.nokia.com/forum/archive/index.php/t-37603.html
stevehaggaipersonala at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 13

this is my virtual host i set up in my apache server

NameVirtualHost *:80

<VirtualHost *:80>

ServerName jnlp

DocumentRoot "C:/Project/jnlp"

<Directory "C:/Project/jnlp">

Options Indexes FollowSymLinks

AllowOverride All

Order allow,deny

Allow from all

</Directory>

</VirtualHost>

and this is my jnlp file

<?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+"

codebase="http://jnlp/" href="TestDSL.jnlp"

>

<information>

<title>Check</title>

<vendor>Developer Connection</vendor>

<description>Demonstration</description>

</information>

<offline-allowed/>

<security>

<all-permissions/>

</security>

<resources>

<j2se version="1.2+" />

<jar href="dedslam.jar"/>

<jar href="ojdbc14.jar"/>

<jar href="sqljdbc.jar"/>

</resources>

<application-desc main-class="src.com.victa.Login" />

</jnlp>

and i call this from the browser http://jnlp/TestDSL.jnlp

but still i get the error.

zolfja at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 14
one thing to mention is i have an ip address 192.168.205.81 assigned to my computer.do i need to use this.because for my oracle db i use this ip address.
zolfja at 2007-7-14 22:49:31 > top of Java-index,Desktop,Deploying...
# 15
my application works perfect with Apache Tomcat/5.0.28.but not with Apache server.please help me sort this out with apache server.
zolfja at 2007-7-21 10:42:58 > top of Java-index,Desktop,Deploying...
# 16
my application works perfect with Apache Tomcat/5.0.28.but not with Apache server.please help me sort this out with apache server.
zolfja at 2007-7-21 10:42:58 > top of Java-index,Desktop,Deploying...
# 17

Hi! I do not know much about Apache virtual hosting. But try these links I think they will help you.

http://httpd.apache.org/docs/2.0/vhosts/

http://httpd.apache.org/docs/2.0/vhosts/examples.html

http://apptools.com/phptools/virtualhost.php

I am curious to know where it went wrong. So please let me know.

stevehaggaipersonala at 2007-7-21 10:42:58 > top of Java-index,Desktop,Deploying...
# 18
Try using your ip address.
stevehaggaipersonala at 2007-7-21 10:42:58 > top of Java-index,Desktop,Deploying...
# 19
thanks for your help.for now i am working woth tomcat.
zolfja at 2007-7-21 10:42:58 > top of Java-index,Desktop,Deploying...