Unable to load resource in weblogic using WAR file

Hi:

I deployed an application using WAR to weblogic 8.1. When WebStartI tries to download a jar from the server, I got the following error (see stack trace below).

Note if I explode the WAR archive and deploy to an exploded archive directory in ** weblogic**. Then WebStart downloads the missing jar with NO issue.

Also if I deploy the same WAR fie to websphere, I can also start the JNLP app with no issue.

Any idea how I can fix this deployment issue with weblogic using WAR file?

Thanks

-ken

Stack trace

com.sun.deploy.net.FailedDownloadException: Unable to load resource: (http://localhost:8001/Notepad/Notepad.jar?version-id=1.42%2B, 1.42+)

at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)

at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)

at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)

at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)

at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)

at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)

at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)

at com.sun.javaws.Launcher.downloadResources(Unknown Source)

at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)

at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)

at com.sun.javaws.Launcher.launch(Unknown Source)

at com.sun.javaws.Main.launchApp(Unknown Source)

at com.sun.javaws.Main.continueInSecureThread(Unknown Source)

at com.sun.javaws.Main$1.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Here's my web.xml and weblogic.xml.

web.xml

--

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app id="WebApp">

<display-name>

Notepad Applications

</display-name>

<description>

Notepad Applications

</description>

<mime-mapping>

<extension>jnlp</extension>

<mime-type>application/x-java-jnlp-file</mime-type>

</mime-mapping>

<servlet>

<servlet-name>JnlpDownloadServlet</servlet-name>

<servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>

<init-param>

<param-name> logLevel </param-name>

<param-value> DEBUG</param-value>

</init-param>

<init-param>

<param-name>logPath</param-name>

<param-value>C:\dev\portfolio\uif\dev\servlet\UIFJnlpLinkPropagation\build\jnlpdownloadservlet.log</param-value>

</init-param>

</servlet>

<servlet-mapping>

<servlet-name>JnlpDownloadServlet</servlet-name>

<url-pattern>*.jnlp</url-pattern>

</servlet-mapping>

<servlet-mapping>

<servlet-name>JnlpDownloadServlet</servlet-name>

<url-pattern>*.jar</url-pattern>

</servlet-mapping>

<servlet-mapping>

<servlet-name>JnlpDownloadServlet</servlet-name>

<url-pattern>*.jardiff</url-pattern>

</servlet-mapping>

</web-app>

weblogic.xml

--

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">

<weblogic-web-app>

<context-root>

/

</context-root>

</weblogic-web-app>

[3871 byte] By [wkt00_kentanga] at [2007-11-26 15:55:26]
# 1

Ken:

While I don't know much about WAR files or Weblogic, it looks suspicious to me that your URL for Notepad.jar specifies localhost rather than the real name of the server.

Assuming that your are trying to download this to a client machine that is different than your server, I'd think that the URL:

(http://localhost:8001/Notepad/Notepad.jar?version-id=1.42%2B, 1.42+)

is looking for Notepad.jar on your client machine rather than on the

Server.

It seems that whatever created your WAR file on the server needs to be properly configured so that the URL comes out like:

(http://your_server.com:8001/Notepad/Notepad.jar?version-id=1.42%2B, 1.42+)

At least that's where I'd look ...

Good luck,

John

John_Shotta at 2007-7-8 22:16:06 > top of Java-index,Desktop,Deploying...
# 2

John, thanks for the reply.

localhost is not the issue because I have the app server running on my local machine. Also, note ((using localhost) that I have no issue running with weblogic **if** I deploy to an exploded archive directory or if I deploy the war to websphere.

I only get the download error from Webstart issue if I deploy the war to weblogic.

Thanks

-ken

wkt00_kentanga at 2007-7-8 22:16:06 > top of Java-index,Desktop,Deploying...