ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wood" <>
Subject java exception when task executed with ant but not manually
Date Wed, 16 May 2007 01:26:00 GMT
Hello users,

I am getting different results when executing a java program with ant than
when I execute it manually.

When ant is used the program throws a null pointer exception eg:

[d.wood@home]$ ant testApp
Buildfile: build.xml



     [java] getting frontpage
     [java] Got 30 frontpage entries
     [java] java.lang.NullPointerException
     [java]     at GetReactomeData.main(Unknown Source)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
     [java]     at
     [java]     at
     [java]     at java.lang.reflect.Method.invoke(
     [java]     at
     [java]     at
     [java]     at
     [java]     at
     [java]     at
     [java]     at
     [java]     at
     [java]     at

But when I launch the application manually it does not crash and completes
[d.wood@qfab-srs build]$ java RunApp
getting frontpage
Got 30 frontpage entries
109581  (Pathway)       Apoptosis (parent = null)
69620   (Pathway)       Cell Cycle Checkpoints (parent = null)
69278   (Pathway)       Cell Cycle, Mitotic (parent = null)
73894   (Pathway)       DNA Repair (parent = null)
69306   (Pathway)       DNA Replication (parent = null)
163200  (Pathway)       Electron Transport Chain (parent = null)

In both cases the CLASSPATH is set the same (I have compared these by
outputting it within the script before it crashes).  The application is
attempting to access data stored within deserialised java beans from a web
services server, might this be breaking the ant VM?

My testApp task is:
<!-- testApp -->
 <target name="testApp" depends="compile" 
	  description="run a direct test of the java app">    
    <java classname="RunApp">
	<pathelement path="${env.CLASSPATH}:${build}"/>
	<fileset dir="${build}">
	  <include name="RunApp"/>

Thanks for any help!


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message