Increase ant output with jdk 1.4?

I have 2 java projects setup in TeamCity 4 to build using Ant. The first uses the latest 1.6 jdk and TeamCity seems to capture detailed output from Ant, showing each line of output in the log file with its own time stamp.

The second project overrides the jdk used to run Ant and uses the older 1.4.2 jdk required by the project. In this case, TeamCity only seems to capture Ant output under a single "Ant output:" entry in the log. There's a single timestamp for the output and the output seems to be capped at 30 lines. This makes debugging build problems nearly impossible if there's, for example, a long stacktrace being output from the ant build.

A few questions:

- Am I correct in my assumption about the difference in output behavior being related to jdk versions? Switching the 1.6 based project to build under 1.4 appeared to confirm the difference in output was jdk related.

- Is there away to increase the amount of output displayed when running ant in jdk 1.4.2 to more that 30 lines?

Thanks,
-jh

3 comments
Comment actions Permalink

There must not be any differences. Do you use the same Ant in both cases? Could you please submit an issue to our tracker: http://jetbrains.net/tracker and attach there logs from the agent as well as build log?

0
Comment actions Permalink

Thanks, I'll log an issue. Looks like the problem is that the TeamCity ant logger fails to initialize when ant is run under jdk 1.4:



[2009-01-20 10:27:03,258] err - UNABLE to initialize TeamCity logger. See exception below.
[2009-01-20 10:27:03,258] err - java.lang.UnsupportedClassVersionError: jetbrains/buildServer/xmlrpc/RemoteCallException (Unsupported major.minor version 49.0)
[2009-01-20 10:27:03,258] err -     at java.lang.ClassLoader.defineClass0(Native Method)
[2009-01-20 10:27:03,258] err -     at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
[2009-01-20 10:27:03,258] err -     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
[2009-01-20 10:27:03,258] err -     at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
[2009-01-20 10:27:03,258] err -     at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
[2009-01-20 10:27:03,258] err -     at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
[2009-01-20 10:27:03,258] err -     at java.security.AccessController.doPrivileged(Native Method)
[2009-01-20 10:27:03,258] err -     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.AgentClassLoader.loadClass(AgentClassLoader.java:44)
[2009-01-20 10:27:03,258] err -     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[2009-01-20 10:27:03,258] err -     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.impl.ServerLogger.getLoggerInstance(ServerLogger.java:41)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.impl.ServerLogger.getLoggerInstance(ServerLogger.java:36)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.ServerLoggerFacade.<init>(ServerLoggerFacade.java:28)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.ServerLoggerFacade.<init>(ServerLoggerFacade.java:22)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.ant.ServerLoggerFacade.<init>(ServerLoggerFacade.java:6)
[2009-01-20 10:27:03,258] err -     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[2009-01-20 10:27:03,258] err -     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[2009-01-20 10:27:03,258] err -     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[2009-01-20 10:27:03,258] err -     at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
[2009-01-20 10:27:03,258] err -     at java.lang.Class.newInstance0(Class.java:308)
[2009-01-20 10:27:03,258] err -     at java.lang.Class.newInstance(Class.java:261)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.LoggerFactory.loadAndInstantiateClass(LoggerFactory.java:55)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.LoggerFactory.createAgentObject(LoggerFactory.java:40)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.LoggerFactory.createLoggerFacade(LoggerFactory.java:25)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.LoggerFactory.createBuildProgressLogger(LoggerFactory.java:15)
[2009-01-20 10:27:03,258] err -     at jetbrains.buildServer.agent.ant.AgentBuildListener.<init>(AgentBuildListener.java:26)
[2009-01-20 10:27:03,258] err -     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[2009-01-20 10:27:03,258] err -     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[2009-01-20 10:27:03,258] err -     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[2009-01-20 10:27:03,258] err -     at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
[2009-01-20 10:27:03,258] err -     at java.lang.Class.newInstance0(Class.java:308)
[2009-01-20 10:27:03,258] err -     at java.lang.Class.newInstance(Class.java:261)
[2009-01-20 10:27:03,258] err -     at org.apache.tools.ant.util.ClasspathUtils.newInstance(ClasspathUtils.java:267)
[2009-01-20 10:27:03,258] err -     at org.apache.tools.ant.Main.addBuildListeners(Main.java:739)
[2009-01-20 10:27:03,258] err -     at org.apache.tools.ant.Main.runBuild(Main.java:621)
[2009-01-20 10:27:03,258] err -     at org.apache.tools.ant.Main.startAnt(Main.java:199)
[2009-01-20 10:27:03,258] err -     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[2009-01-20 10:27:03,258] err -     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

0
Comment actions Permalink

Issue is now logged: http://jetbrains.net/tracker/issue/TW-6783

There were some other similar jdk 1.4 errors already entered, but mostly around test adapters and not the RemoteCallException class.

-JH

0

Please sign in to leave a comment.