Oddly enough my problem is resolved but I do not understand its cause. I
had teh following dependencies in my wesbtart app:
| | +- org.springframework.ws:spring-ws-security:jar:1.5.8:compile
| | | +- org.springframework:spring-tx:jar:2.5.6:compile
| | | +- com.sun.xml.wss:xws-security:jar:3.0:compile (version
managed from 2.0-FCS)
| | | | \- javax.xml.crypto:xmldsig:jar:1.0:compile
| | | | \- com.sun.org.apache.xml.security:xmlsec:jar:2.0:runtime
| | | \- org.apache.ws.security:wss4j:jar:1.5.8:compile
| | | \- org.apache.santuario:xmlsec:jar:1.4.3:compile
The ClassNotFoundException was form a class in
org.apache.santuario:xmlsec:jar:1.4.3:compile. The
com.sun.org.apache.xml.security:xmlsec:jar:2.0:runtime dependency has a
classtree that was forked by Sun from the class tree in
org.apache.santuario:xmlsec:jar:1.4.3:compile albeit with different
package names (Sun added com.sun to package names).
Typically, one should not need both
com.sun.xml.wss:xws-security:jar:3.0:compile and
org.apache.ws.security:wss4j:jar:1.5.8:compile as a dependency as they
both provide support for the Web Services Security specification as
parrallel and independent libraries.
So I fixed my code to remove any dependency on
org.apache.ws.security:wss4j:jar:1.5.8:compile and excluded it from by
dependency on
org.springframework.ws:spring-ws-security:jar:1.5.8:compile as follows:
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-security</artifactId>
<version>${spring-ws.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Viola! Now my problem has gone away. But I still dont understand why it
was there in the first place since the package names did not clash in
the two xmlsec libraries.
Hope this help some other poor soul.
On 11/29/2010 12:07 PM, Farrukh Najmi wrote:
I have a swing app packaged as webstart app as part of my webapp using
the webstart-maven-plugin and its jnlp-download-servlet goal.:
My webapp is deployed within a Glassfish 3 container.
I can successfully launch my webstart app via the launch.jnl files's
URL (good)
However, during the execution of the startup code I get a
CklassNotFoundException.
The Class being reported is indeed present within a jar
(xmlsec-1.4.3.jar) in my webstart apps jar resources.
So this seems like a Classloader issue. I have tried debugging the
webstart app using NetBeans
but I cannot determine what the problem might be.
BTW, I also have a jnlp resource / dependency xmlsec-2.0.jar which a
similar class at com/sun/org/apache/xml/security/Init
Does any one have any ideas or have had a similar experience?
Here is my stack trace:
java.lang.NoClassDefFoundError: org/apache/xml/security/Init
java.net.URLClassLoader$1.run(URLClassLoader.java:202)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:332)
java.lang.ClassLoader.loadClass(ClassLoader.java:307)
java.lang.ClassLoader.loadClass(ClassLoader.java:248)
org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:279)
org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:304)
org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:313)
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:93)
org.springframework.ws.soap.security.wss4j.Wss4jHandler.doSenderAction(Wss4jHandler.java:166)
org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor.secureMessage(Wss4jSecurityInterceptor.java:471)
org.springframework.ws.soap.security.AbstractWsSecurityInterceptor.handleRequest(AbstractWsSecurityInterceptor.java:188)
org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:542)
BTW, when I use jnlp-inline goal in the swing app project I can
produce a webstart zip that can be manually deployed on the server and
works just fine without any ClassNotFoundException.
Please let me know if I can provide any additional info. Thanks for
your help.
--
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email