File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNLPException ConnectException

 
Dhana Sen
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,,

java.net.ConnectException: Connection refused: connect : LaunchDesc: null ]

java.net.ConnectException: Connection refused: connect

if am calling my application in my clientsystem ... am getting this Error..

Pls.. help me..

by
dhana
 
Dhana Sen
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,
it's woking in server Because code base = http://localhost:808/...
if am calling the same application in client/ end User .. Error Connection Refuse..
clear about the Error message:

An error occurred while launching/running the application.

Title: My Pirate!
Vendor: me
Category: Download Error

Unable to load resource: http://localhost:8080/mypirate.jnlp


<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://localhost:8080" href="mypirate.jnlp">
<information>
<title>My Pirate!</title>
<vendor>me</vendor>
<icon href="icon.png"/>
<icon href="splash.png" kind="splash"/>
</information>
<security>
<all-permission/>
</security>
<resources>
<j2se version="1.4+"/>
<jar href="myclasses.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="Startup"/>
</jnlp>


JNLPException[category: Download Error : Exception: java.net.ConnectException: Connection refused: connect : 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)


java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at com.sun.javaws.net.BasicNetworkLayer.doRequest(Unknown Source) at com.sun.javaws.net.BasicNetworkLayer.doHeadRequest(Unknown Source) 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)


i think because of only then codebase ...

Pls help me...
by
dhana

 
James Ridley
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded the sample you were using from java.net, http://today.java.net/pub/a/today/2005/08/11/webstart.html and got it to work locally on tomcat 5.5. Under webapps I placed a directory called mypirate. In that directory I have the mypirate.jnlp, mypirate.jar, icon.png, and splash.png files from the download. My jnlp looks like this and ran without error when I access it via a web browser at http://localhost:8080/mypirate/mypirate.jnlp.

HTH,
James
 
Dhana Sen
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi James,

am also using the Same what U have done ... it's working in my local host.. (Sucessfully)am getting the Jframe... (as in the code)
Have U call the same mypirate.jnlp from client Mechine..
like (http://remoteserver Name:8080/mypirate.jnlp) with in LAN ..

am getting Error )

java.net.ConnectException: Connection refused: connect

in my client..

Thanks,
Dhana
 
James Ridley
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As long as your codebase is the url to the remote server rather than localhost you should have no problems. So if the tomcat instance was hosted on serverA, I would use http://serverA:8080/mypirate/mypirate.jnlp to invoke it. The codebase path then should be http://serverA:8080/mypirate/.
 
Dhana Sen
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi james,,

till am getting Error..

now my codeBase = http://dhana-2660:8080 href="mypirate.jnlp"

dhana-2660 is my system name(Computer Name)

Error message:
An error occurred while launching/running the application.
Title: My Pirate!
Vendor: me
Category: Download Error
Unable to load resource: http://dhana-2660:8080/mypirate.jnlp

JNLPException[category: Download Error : Exception: java.io.IOException : LaunchDesc: null ]
at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
at com.sun.javaws.cache.DownloadProtocol.getLaunchFile(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)

java.io.IOException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.javaws.net.BasicNetworkLayer.doRequest(Unknown Source)
at com.sun.javaws.net.BasicNetworkLayer.doGetRequest(Unknown Source)at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
at com.sun.javaws.cache.DownloadProtocol.getLaunchFile(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)
Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://shr-dhana-2663:8080/mypirate.jnlp
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 10 more


by
dhana
 
Dhana Sen
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have solve the problem..
i have changed 2 things:
1#
code Base: http://120.3.23.13:8080 href="mypirate.jnlp"
ip address of U'r Server like :120:3:23:13

2#
self certifIcate jarsign :
see this link : http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/development.html

if U have sign the Jar.. remove the signed jar ..
To remove signed Jar ..
i ) extract your jar file.
ii) delete U'r manifest file

then re-create u'r jar file and self certifiate jarsign

any query Reg. to this send the message...


by dhana
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic