users@glassfish.java.net

Re: 3.0.1Ear App Client starts when run from netbeans but not through web start

From: <glassfish_at_javadesktop.org>
Date: Thu, 02 Sep 2010 06:29:59 PDT

Hi everyone,

I'm experiencing a similar issue described in this thread, but the workarounds suggested here (deploying outside netbeans with asadmin or using GF3.1) don't seem to work for me, and I've been at this problem for a few days now installing and reinstalling GF/java/NB combinations... :(

Environment:
Java SE 6.0.21
Glassfish 3.0.1

I have an enterprise project which contains an ejb module and a app-client module:
The deployed EAR packages some jars needed for hibernate and swingx for client side.

On deployment the only exception is this but I understand from this blog post (http://blogs.sun.com/quinn/entry/why_the_warnings_about_glassfish ) that I shouln't worry too much, it's just GF being a little verbose:

- Before deploying and running I cleard JWS Cache from Control Panel
- I deployed the application useing asadmin deploy command

=========
WARNING: Invalid annotation symbol found for this type of class.
 symbol: FIELD
 location: private javax.persistence.EntityManager ejbs.DatabaseCacheEJB.em

INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Portable JNDI names for EJB DatabaseCacheEJB : [java:global/CountingSystem/CountingSystem-ejb/DatabaseCacheEJB, java:global/CountingSystem/CountingSystem-ejb/DatabaseCacheEJB!ejbs.DatabaseCacheEJBRemote]
INFO: Glassfish-specific (Non-portable) JNDI names for EJB DatabaseCacheEJB : [ejbs.DatabaseCacheEJBRemote, ejbs.DatabaseCacheEJBRemote#ejbs.DatabaseCacheEJBRemote]
WARNING: ACDEPL112: Error attempting to process extensions from the manifest of JAR file D:\java\glassfish-3.0.1\glassfish\domains\domain1\applications\CountingSystem\swingx-1.0.jar; ignoring it and continuing
java.io.FileNotFoundException: D:\java\glassfish-3.0.1\glassfish\domains\domain1\applications\CountingSystem\swingx-1.0.jar (The system cannot find the file specified)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:114)
        at java.util.jar.JarFile.<init>(JarFile.java:135)
        at java.util.jar.JarFile.<init>(JarFile.java:99)
        at org.glassfish.appclient.server.core.jws.ExtensionFileManager.findExtensionTransitiveClosure(ExtensionFileManager.java:264)
        at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.processExtensionReferences(JavaWebStartInfo.java:334)
        at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.startJWSServices(JavaWebStartInfo.java:311)
        at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.access$100(JavaWebStartInfo.java:96)
        at org.glassfish.appclient.server.core.jws.JavaWebStartInfo$1.run(JavaWebStartInfo.java:257)
        at org.glassfish.appclient.server.core.jws.JavaWebStartState.transition(JavaWebStartState.java:84)
        at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.start(JavaWebStartInfo.java:253)
        at org.glassfish.appclient.server.core.AppClientServerApplication.start(AppClientServerApplication.java:134)
        at org.glassfish.appclient.server.core.AppClientServerApplication.start(AppClientServerApplication.java:126)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        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)

INFO: ACDEPL103: Java Web Start services started for the app client CountingSystem/CountingSystem-app-client.jar (contextRoot: /CS)
INFO: CountingSystem was successfully deployed in 3,672 milliseconds.
===============

When I try to run JWS with "javaws http://..." I get another exception in GF:

============
SEVERE: Adapter[/___JWSappclient/___system] s1as/glassfish/modules/webservices-osgi.jar
java.io.IOException: An existing connection was forcibly closed by the remote host
        at sun.nio.ch.SocketDispatcher.write0(Native Method)
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:100)
        at sun.nio.ch.IOUtil.write(IOUtil.java:71)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
        at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:106)
        at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:74)
        at com.sun.grizzly.http.SocketChannelOutputBuffer.flushChannel(SocketChannelOutputBuffer.java:321)
        at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:392)
        at com.sun.grizzly.http.SocketChannelOutputBuffer.realWriteBytes(SocketChannelOutputBuffer.java:279)
        at com.sun.grizzly.tcp.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:884)
        at com.sun.grizzly.tcp.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:155)
        at com.sun.grizzly.tcp.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:640)
        at com.sun.grizzly.tcp.Response.doWrite(Response.java:676)
        at com.sun.grizzly.tcp.StaticResourcesAdapter.service(StaticResourcesAdapter.java:229)
        at org.glassfish.appclient.server.core.jws.RestrictedContentAdapter.processContent(RestrictedContentAdapter.java:266)
        at org.glassfish.appclient.server.core.jws.RestrictedContentAdapter.serviceContent(RestrictedContentAdapter.java:226)
        at org.glassfish.appclient.server.core.jws.AppClientHTTPAdapter.service(AppClientHTTPAdapter.java:151)
        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)
=================

The JWS downloading progress starts and after a while I get the dreaded unable to launch message:

exception
==========

com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: http://bftanaseit:8080/___JWSappclient/___app/CountingSystem/lib/hibernate3.jar
        at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source)
        at com.sun.javaws.security.SigningInfo.check(Unknown Source)
        at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
        at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
        at com.sun.javaws.Launcher.prepareResources(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$1.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
=============


Any help is greatly appreciated.
Thank you for your time!
[Message sent by forum member 'bftanase']

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