Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNLP Error: Bad MIME type returned from server when accessing resource:

 
iyappan sankaran
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I encounterd an error . i provided all the details .
please help me.

General:

An error occurred while launching/running the application.



Category: Download Error

Bad MIME type returned from server when accessing resource: http://localhost/Sample.jnlp - text/html

Lanuch File :
<?xml version="1.0" encoding="iso-8859-1"?>
<jnlp
spec="1.0+"
codebase="http://localhost/"
href="Sample.jnlp">
<information>
<title>Manager</title>
<vendor>Iyappan</vendor>
<description>Sample Application</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+" />
<jar href= "Iyappan.jar" />
</resources>
<application-desc main-class="Sample">
<argument>-UserName</argument>
<argument>Administrator</argument>
<argument>-UserRole</argument>
<argument>Administrator</argument>
</application-desc>
</jnlp>


Exception:

JNLPException[category: Download Error : Exception: null : LaunchDesc: null ]

at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)

at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)

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

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

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

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

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

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




Remedy I followed:

Configured the Web server to use the Java Web Start MIME type by adding Mime entry in mime.types file in conf folder in apache server.

The entry is “application/x-java-jnlp-file jnlp”.

Still I got the same error.


Thanks
Iyappan
 
Jared Cope
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've had a problem like this before. Steps that worked for me were:

1. Make that mime type addition and restart webserver
2. Clear file cache in the browser that downloaded the .jnlp file (it will still have a copy with the mine type set as text/html)
3. Try downloading again.

Hope that works for you.

Cheers, Jared.
 
iyappan sankaran
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jared. Now it works fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic