I have built an Enteprise Application in Netbeans 6.8 and deployed it onto my Glassfish Server (v3) as part of my project's EAR file.
I have added a "sun-application-client.xml" file to the app with the following
<java-web-start-access>
<context-root>TestAAC</context-root>
<eligible>true</eligible>
</java-web-start-access>
I have also signed the jar file after build. The app runs fine within the Netbeans IDE.
If I select that I want the app made available for Webstart (using the Glassfish admin site) I can then try and launch the app via the glassfish admin page, but his results in an exception:
Here's the launch file and exception, any ideas how what I'm doing wrong as its very close to sending me nuts
<?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/StDavidEEA"
href="___dyn/TestACC.jarClient/___main.jnlp">
<information>
<title>TestACC</title>
<vendor>SWB Systems</vendor>
<homepage href="${appclient.information.homepage.filepath}"/>
<description kind="one-line">TestACC</description>
<description kind="short">TestACC</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="StDavidEEAClient/TestACCClient.jar" main="true" />
<!--
If the client is part of an EAR then there will be an EAR-level
generated facade JAR file.
-->
<jar href="StDavidEEAClient.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/TestACC.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/StDavidEEA/StDavidEEAClient/TestACCClient.jar,arg=-targetserver,arg=localhost:3700"/>
<property name="client.facade.jar.path" value="StDavidEEAClient/TestACCClient.jar"/>
<property name="full.app.codebase.path" value="
http://localhost:8080/___JWSappclient/___app/StDavidEEA"/>
<!--
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="<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
-->
<!--
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
-->
<!DOCTYPE client-container PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 8.0 Application Client Container//EN" "
http://www.sun.com/software/appserver/dtds/sun-application-client-container_1_2.dtd">
<client-container>
<target-server name="localhost" address="localhost" port="3700"/>
<log-service file="" level="WARNING"/>
<message-security-config auth-layer="SOAP">
<!-- turned off by default -->
<provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="XWS_ClientProvider" provider-type="client">
<request-policy auth-source="content"/>
<response-policy auth-source="content"/>
<property name="encryption.key.alias" value="s1as"/>
<property name="signature.key.alias" value="s1as"/>
<property name="dynamic.username.password" value="false"/>
<property name="debug" value="false"/>
</provider-config>
<provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="ClientProvider" provider-type="client">
<request-policy auth-source="content"/>
<response-policy auth-source="content"/>
<property name="encryption.key.alias" value="s1as"/>
<property name="signature.key.alias" value="s1as"/>
<property name="dynamic.username.password" value="false"/>
<property name="debug" value="false"/>
<property name="security.config" value="${security.config.path}"/>
</provider-config>
</message-security-config>
</client-container>
"/>
<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="<!--
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->
<!--
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 <xwss:Encrypt> element signifies the certificate
of the recipient of the message.
2. A certificateAlias under the <xwss:Sign> 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 <xwss:UsernameToken> elements will be used
and none of the <xwss:Sign> elements will be used.
If Auth-Source=Content then the <xwss:Sign> element will be used
3. The different variations of <xwss:Encrypt> 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 "signature.key.alias" 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 setting the alias as the value of "encryption.key.alias" property in the Module Options Map.
6. D
jnlp file truncated after 10K
Here's the exception
java.io.FileNotFoundException:
http://localhost:8080/___JWSappclient/___system/___dyn/___system.jnlp
at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.net.DownloadEngine.isUpdateAvailable(Unknown Source)
at com.sun.deploy.net.DownloadEngine.isUpdateAvailable(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCachedFile(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadExtensionsHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadExtensions(Unknown Source)
at com.sun.javaws.Launcher.downloadResources(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(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)
Caused by: java.io.FileNotFoundException:
http://localhost:8080/___JWSappclient/___system/___dyn/___system.jnlp
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 17 more
[Message sent by forum member 'jaredkrull' (java_at_robjford.com)]
http://forums.java.net/jive/thread.jspa?messageID=377596