You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by tdakanalisw <td...@gmail.com> on 2008/06/22 23:49:12 UTC
NullPointerException during build file (1.7.1beta)
Hi,
I have a problem when I try to run a xslt transformation with with saxon via
an ant build (version 1.7.1beta). I attach the logfile for examination (
http://www.nabble.com/file/p18059372/logfile.rtf logfile.rtf ).
Thanks a lot for your help!
--
View this message in context: http://www.nabble.com/NullPointerException-during-build-file-%281.7.1beta%29-tp18059372p18059372.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: NullPointerException during build file (1.7.1beta)
Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 24 Jun 2008, tdakanalisw <td...@gmail.com> wrote:
> unfortunately I cannot run the task outside of a J2EE container. Is
> there any way to use the fixed class ?
You can manually patch Ant (see
<http://svn.apache.org/viewvc?view=rev&revision=671018>) or build Ant
from trunk - no other way.
> Important: The problem is that when I run the ant build in the
> eclipse platform everything are ok but when I run the same come as
> part of an application in the geronimo application server I get a
> NullPointerExeption error.
Yes. Something inside your huge stack of software involved -
Geronimo, Jetty, Axis2 or your custom Ant task - adds something to the
system properties that has not a String value (i.e. they abuse the
methods Properies inherits from Hashtable and in a way violate the
contract of the Properties classe). Ant is not (has not been)
prepared for this abuse and thus fails.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: NullPointerException during build file (1.7.1beta)
Posted by tdakanalisw <td...@gmail.com>.
Hi,
unfortunately I cannot run the task outside of a J2EE container. Is there
any way to use the fixed class ? I have to present a demo of my work in two
days and i try to find a solution.
Important: The problem is that when I run the ant build in the eclipse
platform everything are ok but when I run the same come as part of an
application in the geronimo application server I get a NullPointerExeption
error.
Stefan Bodewig wrote:
>
> On Sun, 22 Jun 2008, tdakanalisw <td...@gmail.com> wrote:
>
>> I have a problem when I try to run a xslt transformation with with
>> saxon via an ant build (version 1.7.1beta).
>
> You seem to be running a custom Ant task that in turn invokes the
> <java> task nested into multiple levels of <antcall> tasks internally
> which makes debugging this quite a bit more complex.
>
>> I attach the logfile for examination (
>> http://www.nabble.com/file/p18059372/logfile.rtf logfile.rtf ).
>
> For the benefit of those who don't want to install OpenOffice just to
> see the logfile ...
>
> [java] java.lang.NullPointerException
> [java] at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
> [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:764)
>
> <snip reflection stuff/>
>
> [java] at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
>
>
> <snip reflection stuff/>
>
> [java] at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
>
> <snip reflection stuff/>
>
> [java] at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
>
> <snip reflection stuff/>
>
> [java] at
> converter.core.DITAConverter.DITATopdf(DITAConverter.java:105)
> [java] at
> converter.core.WordConverter.ditatoPDF(WordConverter.java:350)
> [java] at
> org.atlantis_group.www.webservices.documenttransformationws.DocumentTransformationWSSkeleton.ditatoPDF(DocumentTransformationWSSkeleton.java:50)
> [java] at
> org.atlantis_group.www.webservices.documenttransformationws.DocumentTransformationWSMessageReceiverInOut.invokeBusinessLogic(DocumentTransformationWSMessageReceiverInOut.java:48)
> [java] at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:42)
> [java] at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
> [java] at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> [java] at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
> [java] at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
> [java] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> [java] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> [java] at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>
> <snip Jetty inside Geronimo stack trace />
>
> [java] at java.lang.Thread.run(Unknown Source)
> [java] Caused by: java.lang.NullPointerException
> [java] at java.util.Hashtable.put(Unknown Source)
> [java] at
> org.apache.tools.ant.types.CommandlineJava$SysProperties.setSystem(CommandlineJava.java:143)
> [java] at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:121)
> [java] ... 115 more
>
> The line in question is the put invocation in
>
> Properties p = new Properties();
> for (Enumeration e = sys.propertyNames();
> e.hasMoreElements();) {
> String name = (String) e.nextElement();
> p.put(name, sys.getProperty(name));
> }
>
> I think this is the same problem we've already seen in a different
> place <https://issues.apache.org/bugzilla/show_bug.cgi?id=42334>.
> I'll fix it in trunk, but it may be too late for 1.7.1.
>
> Could you run your task outside of a JEE container?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/NullPointerException-during-build-file-%281.7.1beta%29-tp18059372p18086833.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: NullPointerException during build file (1.7.1beta)
Posted by Stefan Bodewig <bo...@apache.org>.
On Sun, 22 Jun 2008, tdakanalisw <td...@gmail.com> wrote:
> I have a problem when I try to run a xslt transformation with with
> saxon via an ant build (version 1.7.1beta).
You seem to be running a custom Ant task that in turn invokes the
<java> task nested into multiple levels of <antcall> tasks internally
which makes debugging this quite a bit more complex.
> I attach the logfile for examination (
> http://www.nabble.com/file/p18059372/logfile.rtf logfile.rtf ).
For the benefit of those who don't want to install OpenOffice just to
see the logfile ...
[java] java.lang.NullPointerException
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:764)
<snip reflection stuff/>
[java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
<snip reflection stuff/>
[java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
<snip reflection stuff/>
[java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
<snip reflection stuff/>
[java] at converter.core.DITAConverter.DITATopdf(DITAConverter.java:105)
[java] at converter.core.WordConverter.ditatoPDF(WordConverter.java:350)
[java] at org.atlantis_group.www.webservices.documenttransformationws.DocumentTransformationWSSkeleton.ditatoPDF(DocumentTransformationWSSkeleton.java:50)
[java] at org.atlantis_group.www.webservices.documenttransformationws.DocumentTransformationWSMessageReceiverInOut.invokeBusinessLogic(DocumentTransformationWSMessageReceiverInOut.java:48)
[java] at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:42)
[java] at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
[java] at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
[java] at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
[java] at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
[java] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
<snip Jetty inside Geronimo stack trace />
[java] at java.lang.Thread.run(Unknown Source)
[java] Caused by: java.lang.NullPointerException
[java] at java.util.Hashtable.put(Unknown Source)
[java] at org.apache.tools.ant.types.CommandlineJava$SysProperties.setSystem(CommandlineJava.java:143)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:121)
[java] ... 115 more
The line in question is the put invocation in
Properties p = new Properties();
for (Enumeration e = sys.propertyNames(); e.hasMoreElements();) {
String name = (String) e.nextElement();
p.put(name, sys.getProperty(name));
}
I think this is the same problem we've already seen in a different
place <https://issues.apache.org/bugzilla/show_bug.cgi?id=42334>.
I'll fix it in trunk, but it may be too late for 1.7.1.
Could you run your task outside of a JEE container?
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org