Re: Wsdeploy NullPointerException when compiling generated classes using Maven

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Thu, 25 Mar 2004 10:01:22 -0800

Does your system classpath have tools.jar in it from the jdk?

Ewan Harrow wrote:

>I am trying to migrate a jax-rpc project to maven from ant but have hit
>a brick wall when running wsdeploy. Specifically wsdeploy throws a
>NPE. I used to have the same problem running wscompile from maven but
>solved it by getting maven to use a different class loader.
>Unfortunatly the same trick does not work with wsdeploy. I have though
>found the problem and it is where it tries to uses javac to compile the
>generated classes but is getting the NPE as the following returns null
>in JavaCompilerHelper.internalCompile():
>ClassLoader cl = Thread.currentThread().getContextClassLoader();
>I patched the code (see attachment) to set cl to the system classloader
>if it is null so the NPE goes away but now I get a
>ClassNotFoundException for
>Yahoo! Messenger - Communicate instantly..."Ping"
>your friends today! Download Messenger Now
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Doug Kohlert
Sun Microsystems, Inc.            
NOTICE:  This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure or
distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and destroy
all copies of the original message.
To unsubscribe, e-mail:
For additional commands, e-mail: