2

I've created Enterprise Application and Enterprise Application Client using this tutorial. Both are deployed to remote GlassFish server placed in my local network. When I try to run Application Client with Java Web Start javaws http://192.168.0.234:8080/ApplicationClient1

, I see an error in JWS window:

java.io.IOException: Invalid Http response
at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getJreResource(Unknown Source)
at com.sun.javaws.LaunchDownload._downloadExtensionsHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadExtensionsHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadExtensions(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(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.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Invalid Http response
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 19 more

JaNeLA JNLP analyzer shows one error:

Illegal character in path at index 50:
http://192.168.0.234:8080/___JWSappclient/___app/${appclient.information.homepage.filepath}

Java version on client is 7u40, GlassFish version is 4 and Java version on server is 7u10.

Any help will be appreciated

barteksch
  • 51
  • 1
  • 5
  • *"JaNeLA JNLP analyzer shows one error:"* What is the content of the JNLP? Does any of the field information contain 'unusual characters'? – Andrew Thompson Oct 05 '13 at 21:05
  • JNLP is auto-generated and has more than 800 lines of code, but there is only one line where this variable is used: `` – barteksch Oct 06 '13 at 09:41
  • Oh my bad! I did not notice the 'unresolved' nature of that variable. It should not still be like that once 'generated', that variable should be resolved to a value. In case there is any confusion, make sure to point JaNeLA at the final, 'resolved' JNLP as it is seen by the (JWS) client, not the template that makes it. Given the JNLP is 800 lines (!?! - very long), it might take JaNeLA a while to check everything.. – Andrew Thompson Oct 06 '13 at 12:07

1 Answers1

0

@andrew-thompson Thank you for help, but I've finally figured it out.

I've lost 3 days of my life to get it - Netbeans generates beans.xml file in src/conf. When I remove this file and create it again with same content (through Netbeans of course), it works! Tested with few new projects.

barteksch
  • 51
  • 1
  • 5
  • you were using the tutorial at https://netbeans.org/kb/docs/javaee/entappclient.html ? so your example is exactly like that? you deployed an EAR to GF? – Thufir Sep 23 '14 at 23:22