JDK_HOME path doesn't seem to work

We've been unable to get any of our projects to work successfully with TeamCity. In all projects, many unit tests fail.

The problem seems to be that all of the tasks in our Ant build scripts are run under JDK 1.5 (which is required by the Agent and Tomcat), while all of our projects require JDK 1.4.

Setting the "JDK home path" seems to have no effect - here's the console output when the agent is started:

INFO - nt.runner.GenericProgramRunner - C:\jdk1.5.0_07\bin\java.exe -DANT_HOME=bin\ant -Dagent.work.dir=C:\TeamCity\buildAgent\work -Dbuild.working.dir=C:\TeamCity\buildAgent\work\CCT -Dbuild.number=11 "-Demma.instrumentation.parameters=-ix -Test" -Dant.task.extensions=jetbrains.buildServer.agent.ant.EchoAntExtension,jetbrains.buildServer.agent.ant.CompilerAntExtension,jetbrains.buildServer.coverage.AntCoverageAdapter, -Dagent.classpath=C:/TeamCity/buildAgent/plugins/coveragePlugin/lib/emma.jar;C:/TeamCity/buildAgent/lib/utils.jar;C:/TeamCity/buildAgent/plugins/antPlugin/lib/buildServerAntServerLogging.jar;C:/TeamCity/buildAgent/lib/buildServerServerLogging.jar;C:/TeamCity/buildAgent/lib/xmlrpc-2.0.1.jar;C:/TeamCity/buildAgent/lib/xpp3_min-;C:/TeamCity/buildAgent/lib/junit-3.8.1.jar;C:/TeamCity/buildAgent/lib/buildServerXmlRpcWrapper.jar;C:/TeamCity/buildAgent/lib/nanocontainer-1.0-RC-1.jar;C:/TeamCity/buildAgent/lib/buildServerCommonRuntime.jar;C:/TeamCity/buildAgent/plugins/ant/lib/ant-launcher.jar;C:/TeamCity/buildAgent/lib/commons-codec-1.3.jar;C:/TeamCity/buildAgent/plugins/coveragePlugin/lib/buildServerCoverageAgent.jar;C:/TeamCity/buildAgent/lib/buildServerMessages.jar;C:/TeamCity/buildAgent/lib/xstream-1.1.2.jar -Dsuccessful.build.number=4 -Didea.build.agent.port=9090 -Didea.build.server.buildType.id=bt12 -Didea.build.server.build.id=44 -Dant.home=C:\TeamCity\buildAgent\bin\..\plugins\ant -classpath C:\TeamCity\buildAgent\plugins\ant\lib\ant-launcher.jar org.apache.tools.ant.launch.Launcher -lib C:/TeamCity/buildAgent/lib/buildServerRuntimeUtil.jar;C:/TeamCity/buildAgent/lib/junit-3.8.1.jar;C:/TeamCity/buildAgent/plugins/antPlugin/lib/buildServerAntRunntime.jar -listener jetbrains.buildServer.agent.ant.AgentBuildListener -buildfile C:\TeamCity\buildAgent\work\CCT\build\build.xml -Dtest.single=net.nike.cct.domain.bizrule.CctBizRuleProviderTest test-single

It's clearly running my unit test under JDK 1.5.

This is further supported by the type of errors I get - which are precisely duplicated when I run these tests under JDK 1.5 (this particular gremlin is XStream deserialization issues).

How much testing of this has been done in JDK 1.4 projects? I realize 1.5 is nice, but we're stuck with 1.4 until our application servers can be upgraded. As it is now, TeamCity will not be usable for us.

I really, really like TeamCity - I've been using it at home with great success. But, it's difficult to sell at work when none of the projects will work with it.

If I'm doing something wrong, please let me know. I'm assuming that simply setting the "JDK home path" in the build configuration screen should take care of this.

Thanks in advance for any help (and I'm supposed to give a pitch about this on Monday!!),

Douglas Bullard

Comment actions Permalink

I too have the same problem.
Our code needs to compile on jdk 1.4, but TeamCity is running on jdk 1.5.

I am not able to tell whether you need to identify the jdk on the server or the Build Agent, but I have set both to point to a jdk 1.4 with no luck.
Neither has it been possible to find somewhere to give the jvm paramter "-source 1.4"

So for now I have seen nothing build with TeamCity - and everything was going so well :'(


Comment actions Permalink

I've filed a bug in JIRA about this, and it's been fixed, should be out in the next beta (soon, I hope!)



Please sign in to leave a comment.