0
votes

Because this example of Creating and Running an Application Client on the GlassFish Server fails to launch, I filed bugs with Netbeans and Glassfish:

https://netbeans.org/bugzilla/show_bug.cgi?id=247484

https://java.net/jira/browse/GLASSFISH-21215

How do I run the appclient?

I followed the tutorial to build the EAR. It deploys as expected:

thufir@dur:~$ 
thufir@dur:~$ glassfish-4.1/glassfish/bin/asadmin list-applications
Nothing to list.
No applications are deployed to this target server.
Command list-applications executed successfully.
thufir@dur:~$       
thufir@dur:~$ glassfish-4.1/glassfish/bin/asadmin deploy NetBeansProjects/EntAppEJB/dist/EntAppEJB.ear 
Application deployed with name EntAppEJB.
Command deploy executed successfully.
thufir@dur:~$ 
thufir@dur:~$ glassfish-4.1/glassfish/bin/asadmin list-applications
EntAppEJB  <ear, appclient, ejb>  
Command list-applications executed successfully.
thufir@dur:~$  

The JNLP file for Java Web Start (JWS) launches and downloads as documented:

enter image description here

clicking "launch" downloads the JNLP:

thufir@dur:~$  
thufir@dur:~$ ll Downloads/EntAppClient 
-rw-r--r-- 1 thufir thufir 40314 Sep 26 10:20 Downloads/EntAppClient
thufir@dur:~$ 
thufir@dur:~$ mv Downloads/EntAppClient Downloads/EntAppClient.jnlp
thufir@dur:~$ 

as per the Glassfish documentation:

Java Web Start

Java Web Start allows your application client to be easily launched and automatically downloaded and updated. It is enabled for all application clients by default. For more information, see Using Java Web Start.

GlassFish Server Open Source Edition Application Development Guide Release 4.0 page 172

and

Downloading and Launching an Application Client

If Java Web Start is enabled for your deployed application client, you can launch it for testing. Simply click on the Launch button next to the application client or application's listing on the App Client Modules page in the Administration Console.

GlassFish Server Open Source Edition Application Development Guide Release 4.0 page 176

However, the JNLP fails to execute:

UserError: ACC007

error:

org.glassfish.appclient.client.acc.UserError: ACC007: The app client file /___JWSappclient/___app/EntAppEJB/EntAppEJBClient/EntAppClientClient.jar does not contain a manifest; the app client container cannot process it.  Embedded programs should pass URIs with scheme "jar:" for JAR files and scheme "file:" for directories.

Note that the error is in regards to EntAppClientClient.jar and not EntAppClient.jar.

What additional information can I provide in the bug reports? I'll, at a minimum, link to this question and add the JNLP and the log of javaws running it. What else would be useful?

The Glassfish log, or at least a portion:

[2014-09-26T10:25:29.424-0700] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.container.appclient] [tid: _ThreadID=27 _ThreadName=http-listener-1(4)] [timeMillis: 1411752329424] [levelValue: 1000] [[
  Adapter[/___JWSappclient/___app/EntAppEJB] EntAppEJBClient/EntAppClientClient.jar
java.lang.NullPointerException
    at org.glassfish.appclient.server.core.jws.servedcontent.StreamedAutoSignedStaticContent.process(StreamedAutoSignedStaticContent.java:119)
    at org.glassfish.appclient.server.core.jws.RestrictedContentAdapter.processContent(RestrictedContentAdapter.java:264)
    at org.glassfish.appclient.server.core.jws.RestrictedContentAdapter.serviceContent(RestrictedContentAdapter.java:228)
    at org.glassfish.appclient.server.core.jws.AppClientHTTPAdapter.service(AppClientHTTPAdapter.java:190)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:744)
]]

[2014-09-26T10:25:29.709-0700] [glassfish 4.1] [WARNING] [NCLS-CORE-00091] [javax.enterprise.system.core] [tid: _ThreadID=24 _ThreadName=http-listener-1(1)] [timeMillis: 1411752329709] [levelValue: 900] [[
  Unable to set customized error page
java.lang.NullPointerException
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:171)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:744)
]]
1

1 Answers

1
votes

I recommend using glassfish 3.1 and jdk 1.7_10 this does not need signed your applications. I recommend this or signing your applications to work in jdk 1.7 update 45 or later. greetings from Mexico