users@glassfish.java.net

Re: Can't enable Java Web Start

From: Tim Quinn <tim.quinn_at_oracle.com>
Date: Tue, 17 Jan 2012 16:43:52 -0600

Olivier,

This is indeed puzzling.

First, when you deploy an EAR using the asadmin command or using IDEs,
Java Web Start should be enabled by default for all clients in that
EAR. There have been issues in the past with the console and its
display of whether Java Web Start is or is not enabled. If Java Web
Start support is actually turned off for a client you will see, in the
domain's domain.xml file, a setting of the property "java-web-start-
enabled" to "false" for that client. If you do not see such a
property, then that app client is enabled for Java Web Start access.

Next, adding the explicit descriptor for the client will not make any
difference. GlassFish should correctly recognize that your client is
a client if it has a Main-Class entry in the app client JAR's manifest.

The URL from the error message is one that GlassFish should generate
and should list the various GlassFish JARs that are needed. It would
not list any of the JARs from your application. It's not clear at all
why you are getting the errors. Is 8080 in fact the correct "normal"
http port for your GlassFish installation?

One thing that might be worth trying is to have Eclipse build the EAR
file for your app, then deploy the app using the GlassFish command
line tool:

asadmin --force=true deploy MyApp.ear

(the --force=true setting will allow you to redeploy after you have
already done so from Eclipse)

Then try launching the app client again using

javaws "http://localhost:8080/MyApp/MyAppClient"

and let us know what happens then.

The fact that there is nothing logged in the GlassFish server.log file
means that either GlassFish is not even receiving the request or it is
receiving it and acting on it successfully.

Sorry I cannot be of more immediate help.

- Tim




On Jan 15, 2012, at 2:19 PM, Olivier Chorier wrote:

> Hello,
>
> I'm on Windows 7 (64bits) with GF 3.1.1 and Eclipse Indigo (Eclipse
> Platform 3.7.1.M20110909-1335).
> java -version :
> java version "1.7.0_01"
> Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
> Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
>
> I'm trying to build and deploy a EAR containing the following :
> - An EAR Project
> - Client Project (JWS App.)
> - Commons Project (Shared library between JWS and server)
> - EJB Project (EJBs)
> - EJBRemote Project (Remote Interfaces from EJB Project, for Client
> Project)
> - JPA Project (for Entity beans).
>
> The deployment doesn't fail. I can run my Application Client from
> Eclipse without mistakes. Understand : I can reach EJBs and Entities.
>
> When I try to launch from Web Start using javaws
> http://localhost:8080/MyApp/MyAppClient I get some JNLP error :
> java.io.FileNotFoundException:
> http://localhost:8080/___JWSappclient/___system/___dyn/___system_s1as.jnlp
> at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown
> Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
> at java.lang.reflect.Constructor.newInstance(Unknown Source)
> ......
> Caused by: java.io.FileNotFoundException:
> http://localhost:8080/___JWSappclient/___system/___dyn/___system_s1as.jnlp
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
> Source)
> at java.net.HttpURLConnection.getResponseCode(Unknown Source)
> ... 18 more
>
>
> When I go to the admin interface, I can't see a link to launch the Web
> Start Application (but it is detected).
> If I clic on my App in order to edit properties, I can see an
> unchecked box "Java Web Start". It is disabled so I can change its
> selection.
> It is told to redeploy the application to change the Java Web Start
> Support.
> I Tried to undeploy and redeploy using the admin interface, but the
> problem remains the same.
>
> I got the JNLP file to make some tests :
> - Addresses like
> http://localhost:8080/___JWSappclient/___app/MyAppName are reachable
> - This address http://localhost:8080/___JWSappclient/___system/s1as/glassfish/lib/gf-client.jar
> is unreachable (Error 404).
> - This one is unreachable too :
> http://localhost:8080/___JWSappclient/___system/___dyn/___system_s1as.jnlp
>
> I tried to "force" activation of Java Web Start with making a
> sun-application-client.xml and a glassfish-application-client.xml file
> with eligible set to true. With no effect.
>
> I have no error in server.log during deployment.
>
> I don't know if I should do, but I've no directory named
> "java-web-start" in my glassfish directory.
>
> Thanks for any help or suggestion you could have.
> Olivier.