users@glassfish.java.net

Re: [Java Web Start] GFv3+Eclipse : Build problems

From: <glassfish_at_javadesktop.org>
Date: Tue, 18 May 2010 09:08:53 PDT

Hi Tim, thanks a lot for your reply !

Here's what's happening when I run http://localhost:8080/OnlyWebStart/OnlyWebStartClient :

Screen : Java 6 loading
Server.log :

INFO: Grizzly Framework 1.9.18-o started in: 5984ms listening on port 7676
INFO: Grizzly Framework 1.9.18-o started in: 6344ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 6094ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 6844ms listening on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 6360ms listening on port 8181

INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate

INFO: ACDEPL103: Java Web Start services started for the app client OnlyWebStart-2/OnlyWebStart-2-app-client.jar (contextRoot: /OnlyWebStart-2/OnlyWebStart-2-app-client)
INFO: Loading OnlyWebStart-2 Application done is 48859 ms
INFO: GlassFish Server Open Source Edition 3.0.1 (18) startup time : Felix(34469ms) startup services(83688ms) total(118157ms)

INFO: Binding RMI port to *:8686

INFO: ACDEPL103: Java Web Start services started for the app client OnlyWebStart/OnlyWebStartClient.jar (contextRoot: /OnlyWebStart/OnlyWebStartClient)

INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2

INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

GRAVE: Adapter[/___JWSappclient/___app/OnlyWebStart] glassfish/modules/gf-client-module.jar
java.io.IOException: Une connexion établie a été abandonnée par un logiciel de votre ordinateur hôte
        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:104)
        at sun.nio.ch.IOUtil.write(IOUtil.java:75)
        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:135)
        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: OnlyWebStart was successfully deployed in 9 063 milliseconds.

INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started

INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://OLIVIER:8686/jndi/rmi://OLIVIER:8686/jmxrmi
GRAVE: Apache Felix Remote Shell [142] Listener.Acceptor::activate()
GRAVE: java.net.BindException: Address already in use: JVM_Bind
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at org.apache.felix.shell.remote.Listener$Acceptor.run(Listener.java:131)
        at java.lang.Thread.run(Thread.java:619)

INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = D:\gf301b18\glassfishv3\glassfish\domains\domain1\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\DOCUME~1\Olivier\LOCALS~1\Temp\fileinstall-5792556471008886844, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = D:\gf301b18\glassfishv3\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\DOCUME~1\Olivier\LOCALS~1\Temp\fileinstall--6722403387641857318, felix.fileinstall.filter = null}

INFO: Started bundle: file:/D:/gf301b18/glassfishv3/glassfish/modules/autostart/osgi-web-container.jar

INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed D:\gf301b18\glassfishv3\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = D:\gf301b18\glassfishv3\glassfish\domains\domain1\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\DOCUME~1\Olivier\LOCALS~1\Temp\fileinstall--7266567682028260710, felix.fileinstall.filter = null}

Now Screen : Security Warning, I need to trust ""Application client OnlyWebStart", and click to "Run"

Next step, on screen too : Unable to launch application : Ok / Details
click on details : 3 tabs : "Run file" ; "Exception" ; "Console".

Run file :
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of either the GNU
 * General Public License Version 2 only ("GPL") or the Common Development
 * and Distribution License("CDDL") (collectively, the "License"). You
 * may not use this file except in compliance with the License. You can obtain
 * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
 * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
 * language governing permissions and limitations under the License.
 *
 * When distributing the software, include this License Header Notice in each
 * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
 * Sun designates this particular file as subject to the "Classpath" exception
 * as provided by Sun in the GPL Version 2 section of the License file that
 * accompanied this code. If applicable, add the following below the License
 * Header, with the fields enclosed by brackets [] replaced by your own
 * identifying information: "Portions Copyrighted [year]
 * [name of copyright owner]"
 *
 * Contributor(s):
 *
 * If you wish your version of this file to be governed by only the CDDL or
 * only the GPL Version 2, indicate your decision by adding "[Contributor]
 * elects to include this software in this distribution under the [CDDL or GPL
 * Version 2] license." If you don't indicate a single choice of license, a
 * recipient has the option to distribute your version of this file under
 * either the CDDL, the GPL Version 2 or to extend the choice of license to
 * its licensees as provided above. However, if you add GPL Version 2 code
 * and therefore, elected the GPL Version 2 license, then the option applies
 * only if the new code is made subject to such option by the copyright
 * holder.
-->
<jnlp
    spec="1.0+"
    codebase="http://localhost:8080/___JWSappclient/___app/OnlyWebStart"
    href="___dyn/OnlyWebStartClient.jarClient/___main.jnlp">
    <information>
        <title>Application Client OnlyWebStart</title>
        <vendor>Application Client</vendor>
        <homepage href="${appclient.information.homepage.filepath}"/>
        <description kind="one-line">Application Client OnlyWebStart</description>
        <description kind="short">Application Client OnlyWebStart</description>
        
    <offline-allowed/>
    </information>

    <security>
        <all-permissions/>
    </security>

    <resources>
        
<!-- <java version="1.6+"
             java-vm-args="-showversion -javaagent=glassfish/modules/gf-client.jar=mode=jws,${agent.args} " /> -->
        <java version="1.6+" java-vm-args="" />
        
        <!--
            In v3, run the client facade as the main JAR. Eventually Java Web
            Start might support the splash screen in the JAR.
        -->
        <jar href="OnlyWebStartClient/OnlyWebStartClientClient.jar" main="true" />
        
        <!--
            If the client is part of an EAR then there will be an EAR-level
            generated facade JAR file.
        -->
        <jar href="OnlyWebStartClient.jar"/>

        <!--
            These next JARs will have been signed using the
            deployer-specified alias, if specified, or the default domain alias.
            Note that even though these are fetched within the code base of the
            app, we do not sign these once for each app but reuse ones
            signed with the same alias.
        -->
        <jar href="glassfish/modules/gf-client.jar"/>
        <jar href="glassfish/modules/gf-client-module.jar"/>

        <!--
            Refer to extension JNLP documents which list other resources - JARs and JNLPs.

            The system extension lists the JARs that are common to all apps. The
            facade extension lists the generated facade JAR file for the client.
            The client extension lists the client JAR. The library extension
            lists JARs from the EAR application to which the client directly
            or indirectly refers.
        -->
        <extension name="___system" href="http://localhost:8080/___JWSappclient/___system/___dyn/___system.jnlp"/>
        <extension name="___client" href="___dyn/OnlyWebStartClient.jarClient/___client.jnlp"/>

        <extension name="libJars-s1as" href="___lib/client-libs-s1as.jnlp"/>

        <property name="appclient.system.codebase" value="http://localhost:8080/___JWSappclient/___system"/>
        <property name="appclient.is.jws" value="true"/>

        <property name="agent.args" value="mode=jws,client=url=http://localhost:8080/___JWSappclient/___app/OnlyWebStart/OnlyWebStartClient/OnlyWebStartClientClient.jar,arg=-targetserver,arg=localhost:3700"/>

        <property name="client.facade.jar.path" value="OnlyWebStartClient/OnlyWebStartClientClient.jar"/>
        <property name="full.app.codebase.path" value="http://localhost:8080/___JWSappclient/___app/OnlyWebStart"/>
        <!--
            Properties specified on the request as query parameters (if any)
        -->
        

        <!--
            Content normally read from files during an appclient script launch.
        -->
        <property name="sun-acc.xml.content" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;!--
   Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
   Use is subject to license terms.
--&gt;

&lt;!--
   Please remember to customize this file for your environment. The defaults for
   following fields may not be appropriate.
   - target-server name, address and port
   - Property security.config in message-security-config
--&gt;

&lt;!DOCTYPE client-container PUBLIC &quot;-//Sun Microsystems Inc.//DTD Application Server 8.0 Application Client Container//EN&quot; &quot;http://www.sun.com/software/appserver/dtds/sun-application-client-container_1_2.dtd&quot;&gt;

&lt;client-container&gt;
  &lt;target-server name=&quot;repine&quot; address=&quot;localhost&quot; port=&quot;3700&quot;/&gt;
  &lt;log-service file=&quot;&quot; level=&quot;WARNING&quot;/&gt;
  &lt;message-security-config auth-layer=&quot;SOAP&quot;&gt;
    &lt;!-- turned off by default --&gt;
    &lt;provider-config class-name=&quot;com.sun.xml.wss.provider.ClientSecurityAuthModule&quot; provider-id=&quot;XWS_ClientProvider&quot; provider-type=&quot;client&quot;&gt;
      &lt;request-policy auth-source=&quot;content&quot;/&gt;
      &lt;response-policy auth-source=&quot;content&quot;/&gt;
      &lt;property name=&quot;encryption.key.alias&quot; value=&quot;s1as&quot;/&gt;
      &lt;property name=&quot;signature.key.alias&quot; value=&quot;s1as&quot;/&gt;
      &lt;property name=&quot;dynamic.username.password&quot; value=&quot;false&quot;/&gt;
      &lt;property name=&quot;debug&quot; value=&quot;false&quot;/&gt;
    &lt;/provider-config&gt;
    &lt;provider-config class-name=&quot;com.sun.xml.wss.provider.ClientSecurityAuthModule&quot; provider-id=&quot;ClientProvider&quot; provider-type=&quot;client&quot;&gt;
      &lt;request-policy auth-source=&quot;content&quot;/&gt;
      &lt;response-policy auth-source=&quot;content&quot;/&gt;
      &lt;property name=&quot;encryption.key.alias&quot; value=&quot;s1as&quot;/&gt;
      &lt;property name=&quot;signature.key.alias&quot; value=&quot;s1as&quot;/&gt;
      &lt;property name=&quot;dynamic.username.password&quot; value=&quot;false&quot;/&gt;
      &lt;property name=&quot;debug&quot; value=&quot;false&quot;/&gt;
      &lt;property name=&quot;security.config&quot; value=&quot;${security.config.path}&quot;/&gt;
    &lt;/provider-config&gt;
  &lt;/message-security-config&gt;
&lt;/client-container&gt;
"/>
        <property name="appclient.login.conf.content" value="/* Copyright 2004 Sun Microsystems, Inc. All rights reserved. */
/* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */

default {
        com.sun.enterprise.security.auth.login.ClientPasswordLoginModule required debug=false;
};

certificate {
        com.sun.enterprise.security.auth.login.ClientCertificateLoginModule required debug=false;
};
"/>
        <property name="message.security.config.provider.security.config"
            value="&lt;!--
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
--&gt;
&lt;!--
 This client side config file pairs with wss-server-config-1.0.xml on the server
 and supports the following UseCases:
 Usecase 1: Authentication by Protected UsernameToken
 Usecase 3: Encrypted UsernameToken and MessageBody
 Usecase 4: Response Encryption Key Learnt from Incoming Message

 Certificate Alias Information :
 1. A certificateAlias under the &lt;xwss:Encrypt&gt; element signifies the certificate
    of the recipient of the message.
 2. A certificateAlias under the &lt;xwss:Sign&gt; element signifies the certificate of the
    sender.

 NOTE:

   1. the certificateAlias has the above meaning for all the Sign and Encrypt elements below
   2. there are several Sign and Encrypt elements below and similarly several RequireSignature and
      RequireEncryption elements. Which of them would be actually used at runtime will depend on
      the AuthPolicy passed to the module.

      For Example : if Auth-Source=Sender then only the &lt;xwss:UsernameToken&gt; elements will be used
      and none of the &lt;xwss:Sign&gt; elements will be used.
      If Auth-Source=Content then the &lt;xwss:Sign&gt; element will be used

   3. The different variations of &lt;xwss:Encrypt&gt; elements in this configuration file are to accomodate
       default encryption of the UsernameToken.

   4. The actual certificate alias to be used for any Signature operation can be modified during AuthModule
       initialization by setting the alias as the value of &quot;signature.key.alias&quot; property in the Module Options Map.
   5. The actual certificate alias to be used for any Encrypt operation can be modified during AuthModule
       initialization by settin
jnlp file truncated after 10K

----------
Exception :
com.sun.deploy.net.JARSigningException: Détection d'une entrée non signée dans la ressource : file:/D:/gf301b18/glassfishv3/glassfish/domains/domain1/generated/xml/OnlyWebStart/OnlyWebStartClient_jar/OnlyWebStartClient.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)


----------
Console :
#### Java Web Start Error:
#### Détection d'une entrée non signée dans la ressource : file:/D:/gf301b18/glassfishv3/glassfish/domains/domain1/generated/xml/OnlyWebStart/OnlyWebStartClient_jar/OnlyWebStartClient.jar

(translation : unsigned content)

So I'm absolutely unable to start the Main.

I've tried to clear javaws cache (javaws -uninstall), but nothing different occured.
[Message sent by forum member 'laps']

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