• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jared. Now it works fine.
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic