[xmlbean] org.apache.tools.ant.BuildException: Listener attempted to access System.out - infinite loop terminated

We're using TC 5.1.5 and in all of our builds, we see this message repeated over and over in the build logfiles.  We use ant which invoke the Apache xmlbean task.  Is this an issue with TeamCity or is it an issue with xmlbean?  The problem also occurs with 6.0.1.  The error is not fatal but it pollutes the build log which makes it hard to read.

[xmlbean] org.apache.tools.ant.BuildException: Listener attempted to access System.out - infinite loop terminated
Listener attempted to access System.out - infinite loop terminated
at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:1934)
at org.apache.tools.ant.Project.fireMessageLogged(Project.java:1992)
at org.apache.tools.ant.Project.log(Project.java:399)
at org.apache.tools.ant.Task.log(Task.java:346)
at org.apache.tools.ant.taskdefs.Javac.getCompiler(Javac.java:854)
at jetbrains.buildServer.agent.ant.CompilerAntExtension.getOutputProcessor(CompilerAntExtension.java:34)
at jetbrains.buildServer.agent.ant.CompilerAntExtension.messageLogged(CompilerAntExtension.java:76)
at jetbrains.buildServer.agent.ant.AgentBuildListener$ExtensionsProcessor.messageLogged(AgentBuildListener.java:275)
at jetbrains.buildServer.agent.ant.AgentBuildListener.messageLogged(AgentBuildListener.java:201)
at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:1943)
at org.apache.tools.ant.Project.fireMessageLogged(Project.java:1992)
at org.apache.tools.ant.Project.log(Project.java:399)
at org.apache.tools.ant.Task.log(Task.java:346)
at org.apache.tools.ant.util.ResourceUtils.selectOutOfDateSources(ResourceUtils.java:106)
at org.apache.tools.ant.util.SourceFileScanner.restrict(SourceFileScanner.java:97)
at org.apache.tools.ant.util.SourceFileScanner.restrictAsFiles(SourceFileScanner.java:127)
at org.apache.tools.ant.util.SourceFileScanner.restrictAsFiles(SourceFileScanner.java:114)
at org.apache.tools.ant.taskdefs.Javac.scanDir(Javac.java:781)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:755)
at org.apache.xmlbeans.impl.tool.XMLBean.execute(XMLBean.java:272)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

3 comments
Comment actions Permalink

Hi Bill

If the issue is still actual, please post your build.xml - here or to teamcity-feedback[at]jetbrails.com.

Thanks
Michael

0
Comment actions Permalink

Yes, we still have this issue.  I will work on getting a testcase together.  I was also going to try using a newer version of Ant (we're using 1.6.2).  I'll reply to this thread when more info or a testcase is available.

0
Comment actions Permalink

I did some experimentation and it seems that this issue only shows up with Ant 1.6.2 and TeamCity.  I don't see the problem with 1.6.5 or 1.8.2.  So the solution is to use a newer version of Ant.  Oh, more thing. The problem only occurs with build.compiler set to modern.  If you don't have it set, it will use the classic version which does not have this problem.

I think I'm set now. Thanks.

0

Please sign in to leave a comment.