ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: Ant 1.7 NullPointerException AbstractFileSet
Date Mon, 17 Apr 2006 12:13:24 GMT
Hello Kev,

the question is which piece of code creates the filesets which are added
here to the delete task.
this piece of code is probably creating the filesets in such a way that
the project field is not set.
I imagine this happens in the org.codehaus.cargo.container codebase.

Changing in Delete.java this line :
553                  fs.getDirectoryScanner().getIncludedDirectories()));

to

                 
fs.getDirectoryScanner(getProject()).getIncludedDirectories()));

would fix (or mask) the problem.

Regards,

Antoine




Kev Jackson wrote:
> Hi,
>
> During the course of trying to debug this memory problem with
> AppFuse/Ant, I've come across a NullPointerException in
> AbstractFileSet.setupDirectoryScanner : 462
>
> It seems as if the project variable is null so the method p.log fails
>
> Running the same test on Ant 1.6.5 works fine and I can't see any
> changes to AbstractFileSet since 1.6.5 was released (June 2005).
>
> Anyone have any idea why the project isn't set?
>
> works
> JDK1.5
> Ant 1.6.5
>
> fails
> JDK1.5
> Ant 1.7 (trunk) compiled today against JDK1.5
>
> Windows XP SP2
>
> Stack trace:
> org.codehaus.cargo.container.ContainerException: Failed to create a
> Tomcat 5.5.9
> standalone configuration
>        at
> org.codehaus.cargo.container.spi.configuration.AbstractLocalConfigura
> tion.configure(AbstractLocalConfiguration.java:167)
>        at
> org.codehaus.cargo.container.tomcat.internal.AbstractTomcatLocalConta
> iner.doStart(AbstractTomcatLocalContainer.java:74)
>        at
> org.codehaus.cargo.container.spi.AbstractLocalContainer.start(Abstrac
> tLocalContainer.java:303)
>        at
> org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:408)
>        at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:389)
>        at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>        at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
> a:104)
>        at org.apache.tools.ant.Task.perform(Task.java:369)
>        at org.apache.tools.ant.Target.execute(Target.java:356)
>        at org.apache.tools.ant.Target.performTasks(Target.java:384)
>        at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1265)
>        at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
> CheckExecutor.java:37)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1117)
>        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:389)
>        at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>        at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
> a:104)
>        at org.apache.tools.ant.Task.perform(Task.java:369)
>        at org.apache.tools.ant.Target.execute(Target.java:356)
>        at org.apache.tools.ant.Target.performTasks(Target.java:384)
>        at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1265)
>        at org.apache.tools.ant.Project.executeTarget(Project.java:1234)
>        at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
> cutor.java:40)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1117)
>        at org.apache.tools.ant.Main.runBuild(Main.java:675)
>        at org.apache.tools.ant.Main.startAnt(Main.java:195)
>        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:278)
>        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:99)
> Caused by: java.lang.NullPointerException
>        at
> org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(Abst
> ractFileSet.java:462)
>        at
> org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(Abstra
> ctFileSet.java:428)
>        at
> org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(Abstra
> ctFileSet.java:398)
>        at org.apache.tools.ant.taskdefs.Delete.execute(Delete.java:552)
>        at
> org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLoca
> lConfiguration.cleanConfigurationDirectory(AbstractStandaloneLocalConfiguration.
>
> java:121)
>        at
> org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLoca
> lConfiguration.createConfigurationDir(AbstractStandaloneLocalConfiguration.java:
>
> 89)
>        at
> org.codehaus.cargo.container.tomcat.internal.AbstractCatalinaStandalo
> neLocalConfiguration.doConfigure(AbstractCatalinaStandaloneLocalConfiguration.ja
>
> va:64)
>        at
> org.codehaus.cargo.container.spi.configuration.AbstractLocalConfigura
> tion.configure(AbstractLocalConfiguration.java:163)
>        ... 32 more
> java.lang.NullPointerException
>        at
> org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(Abst
> ractFileSet.java:462)
>        at
> org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(Abstra
> ctFileSet.java:428)
>        at
> org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(Abstra
> ctFileSet.java:398)
>        at org.apache.tools.ant.taskdefs.Delete.execute(Delete.java:552)
>        at
> org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLoca
> lConfiguration.cleanConfigurationDirectory(AbstractStandaloneLocalConfiguration.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message