users@glassfish.java.net

Re: Unable to launch Glassfish v3 app client via Java Web Start

From: <glassfish_at_javadesktop.org>
Date: Fri, 09 Apr 2010 07:22:09 PDT

Hi,

just confirming I have exactly the same problem. I use netbeans 6.8 Glassfish 3.0.1b12 or b9.
When I create any simple Enterprise application with client and try to run it I get error 500 from glassfish HTTP for Client file.

I found why this happend but I don't know hot to aboid it

Let's say my application is called TestEA (one bean with hello world method) + client calling this method. This is structure of generated/xml/testEa application:

myserver:/opt/glassfish-3.0.1-b12/glassfish/domains/domain1/generated/xml/TestEA# find *
TestEA-app-client_jar
TestEA-app-client_jar/signed
TestEA-app-client_jar/TestEA-app-clientClient.jar
TestEAClient.jar
TestEA-ejb_jar

After launching application via webstart in Administration console I get following error:
Server returned HTTP response code: 500 for URL: http://business2.anderlippin.cz:80/___JWSappclient/___app/TestEA/TestEAClient.jar

This is in glassfish log:

[#|2010-04-09T16:04:37.771+0200|INFO|glassfish3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=32;_ThreadName=Thread-1;|jarsigner: unable to open jar file: /opt/glassfish-3.0.1-b12/glassfish
/domains/domain1/generated/xml/TestEA/TestEA-app-client_jar/TestEAClient.jar|#]

[#|2010-04-09T16:04:37.772+0200|INFO|glassfish3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=32;_ThreadName=Thread-1;|jarsigner error: java.security.AccessControlException: System.exit|#]

[#|2010-04-09T16:04:37.773+0200|SEVERE|glassfish3.0|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=32;_ThreadName=Thread-1;|service exception
java.lang.RuntimeException: java.io.IOException: java.lang.Exception: Error attempting to create signed jar /opt/glassfish-3.0.1-b12/glassfish/domains/domain1/generated/xml/TestEA/TestEA-app-client_jar/signed/TestEAClie
nt.jar with alias s1as
        at org.glassfish.appclient.server.core.jws.AppClientHTTPAdapter.service(AppClientHTTPAdapter.java:139)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: java.lang.Exception: Error attempting to create signed jar /opt/glassfish-3.0.1-b12/glassfish/domains/domain1/generated/xml/TestEA/TestEA-app-client_jar/signed/TestEAClient.jar with alias
 s1as
        at org.glassfish.appclient.server.core.jws.servedcontent.AutoSignedContent.isAvailable(AutoSignedContent.java:93)
        at org.glassfish.appclient.server.core.jws.RestrictedContentAdapter.serviceContent(RestrictedContentAdapter.java:225)
        at org.glassfish.appclient.server.core.jws.AppClientHTTPAdapter.service(AppClientHTTPAdapter.java:135)
        ... 17 more
Caused by: java.lang.Exception: Error attempting to create signed jar /opt/glassfish-3.0.1-b12/glassfish/domains/domain1/generated/xml/TestEA/TestEA-app-client_jar/signed/TestEAClient.jar with alias s1as
        at org.glassfish.appclient.server.core.jws.servedcontent.ASJarSigner.signJar(ASJarSigner.java:170)
        at org.glassfish.appclient.server.core.jws.servedcontent.AutoSignedContent.createSignedFile(AutoSignedContent.java:112)
        at org.glassfish.appclient.server.core.jws.servedcontent.AutoSignedContent.isAvailable(AutoSignedContent.java:91)
        ... 19 more
Caused by: java.security.AccessControlException: System.exit
        at org.glassfish.appclient.server.core.jws.servedcontent.ASJarSigner$NoExitSecurityManager.checkExit(ASJarSigner.java:577)
        at java.lang.Runtime.exit(Runtime.java:88)
        at java.lang.System.exit(System.java:904)


I THINK PROBLEM IS THIS:
jarsigner: unable to open jar file: /opt/glassfish-3.0.1-b12/glassfish
/domains/domain1/generated/xml/TestEA/TestEA-app-client_jar/TestEAClient.jar|#]

because TestEAClient.jar is located in different directory!
After moving TestEAClient.jar to TestEA-app-client_jar/TestEAClient.jar I can launch the application.

This is how generated/xml/TestEA looks after launch:
myserver:/opt/glassfish-3.0.1-b12/glassfish/domains/domain1/generated/xml/TestEA# find *
TestEA-app-client_jar
TestEA-app-client_jar/signed
TestEA-app-client_jar/signed/TestEA-app-client.jar
TestEA-app-client_jar/signed/TestEAClient.jar
TestEA-app-client_jar/signed/TestEA-app-clientClient.jar
TestEA-app-client_jar/signed/TestEA-ejb.jar
TestEA-app-client_jar/TestEAClient.jar
TestEA-app-client_jar/TestEA-app-clientClient.jar
TestEAClient.jar
TestEA-ejb_jar


So I guess the problem is that glassfish looks to wrong directory when signing client jar. And the question is what can I do about this? Because I don't want to copy client.jar each time i do deploy.

Thanks for help
[Message sent by forum member 'vasekt']

http://forums.java.net/jive/thread.jspa?messageID=396102