TC logger issues with IBM JDK
I am running TC Professional Version 4.5.4 and I specifically set JAVA_HOME so that TC runs on the SUN JDK, in this case:
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
I need to be able to compile my projects using the IBM JVM, so in the Ant Build Runner I set the JDK Home Path: to /usr/lib/jvm/java-6-ibm
which points to:
java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460sr5-20090529_04(SR5))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr5-20090519_35743 (JIT enabled, AOT enabled)
J9VM - 20090519_035743_LHdSMr
JIT - r9_20090518_2017
GC - 20090417_AA)
JCL - 20090529_01
The problem is that TC is not able to initialize the logger, the following error is from the buildAgent/logs/teamcity-build.log
[2009-09-28 17:38:38,710] err - UNABLE to initialize TeamCity logger. See exception below.
[2009-09-28 17:38:38,711] err - com.thoughtworks.xstream.XStream$InitializationException: Could not instatiate converter : com.thoughtworks.xstream.co
nverters.enums.EnumSetConverter : null
[2009-09-28 17:38:38,711] err - at com.thoughtworks.xstream.XStream.dynamicallyRegisterConverter(XStream.java:657)
[2009-09-28 17:38:38,711] err - at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:626)
[2009-09-28 17:38:38,712] err - at com.thoughtworks.xstream.XStream.<init>(XStream.java:373)
[2009-09-28 17:38:38,712] err - at com.thoughtworks.xstream.XStream.<init>(XStream.java:299)
[2009-09-28 17:38:38,712] err - at jetbrains.buildServer.agent.impl.ServerLogger.<init>(ServerLogger.java:28)
[2009-09-28 17:38:38,713] err - at jetbrains.buildServer.agent.impl.ServerLogger.getLoggerInstance(ServerLogger.java:41)
[2009-09-28 17:38:38,713] err - at jetbrains.buildServer.agent.impl.ServerLogger.getLoggerInstance(ServerLogger.java:36)
[2009-09-28 17:38:38,713] err - at jetbrains.buildServer.agent.impl.ServerLogger.getLoggerInstance(ServerLogger.java:32)
[2009-09-28 17:38:38,714] err - at jetbrains.buildServer.agent.ServerLoggerFacade.<init>(ServerLoggerFacade.java:27)
[2009-09-28 17:38:38,714] err - at jetbrains.buildServer.agent.ServerLoggerFacade.<init>(ServerLoggerFacade.java:22)
[2009-09-28 17:38:38,714] err - at jetbrains.buildServer.agent.ant.ServerLoggerFacade.<init>(ServerLoggerFacade.java:6)
[2009-09-28 17:38:38,715] err - at java.lang.J9VMInternals.newInstanceImpl(Native Method)
[2009-09-28 17:38:38,716] err - at java.lang.Class.newInstance(Class.java:1325)
[2009-09-28 17:38:38,716] err - at jetbrains.buildServer.agent.LoggerFactory.loadAndInstantiateClass(LoggerFactory.java:55)
[2009-09-28 17:38:38,716] err - at jetbrains.buildServer.agent.LoggerFactory.createAgentObject(LoggerFactory.java:40)
[2009-09-28 17:38:38,717] err - at jetbrains.buildServer.agent.LoggerFactory.createLoggerFacade(LoggerFactory.java:25)
[2009-09-28 17:38:38,717] err - at jetbrains.buildServer.agent.LoggerFactory.createBuildProgressLogger(LoggerFactory.java:15)
[2009-09-28 17:38:38,717] err - at jetbrains.buildServer.agent.ant.AgentBuildListener.<init>(AgentBuildListener.java:26)
[2009-09-28 17:38:38,718] err - at java.lang.J9VMInternals.newInstanceImpl(Native Method)
[2009-09-28 17:38:38,718] err - at java.lang.Class.newInstance(Class.java:1325)
[2009-09-28 17:38:38,718] err - at org.apache.tools.ant.util.ClasspathUtils.newInstance(ClasspathUtils.java:267)
[2009-09-28 17:38:38,718] err - at org.apache.tools.ant.Main.addBuildListeners(Main.java:799)
[2009-09-28 17:38:38,718] err - at org.apache.tools.ant.Main.runBuild(Main.java:681)
[2009-09-28 17:38:38,719] err - at org.apache.tools.ant.Main.startAnt(Main.java:217)
[2009-09-28 17:38:38,719] err - at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[2009-09-28 17:38:38,719] err - at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[2009-09-28 17:38:38,720] err - Caused by: java.lang.reflect.InvocationTargetException
[2009-09-28 17:38:38,720] err - at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[2009-09-28 17:38:38,720] err - at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:41)
[2009-09-28 17:38:38,721] err - at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
[2009-09-28 17:38:38,721] err - at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
[2009-09-28 17:38:38,721] err - at com.thoughtworks.xstream.XStream.dynamicallyRegisterConverter(XStream.java:650)
[2009-09-28 17:38:38,721] err - ... 25 more
[2009-09-28 17:38:38,721] err - Caused by: java.lang.RuntimeException: Could not access java.util.EnumSet.elementType field
[2009-09-28 17:38:38,722] err - at com.thoughtworks.xstream.core.util.Fields.find(Fields.java:18)
[2009-09-28 17:38:38,722] err - at com.thoughtworks.xstream.converters.enums.EnumSetConverter.<init>(EnumSetConverter.java:31)
[2009-09-28 17:38:38,722] err - ... 30 more
Any help or ideas would be greatly appreciated,
Thanks,
Mike
Please sign in to leave a comment.
Do you have any custom security policy defined for this Java?
Thanks Pavel,
JAVA_HOME/jre/lib/security/java.policy has not been changed, the default IBM policy seems to contain one extra element, "javax.realtime.version" see below:
grant codeBase "file:${java.home}/lib/ext/*" {
permission java.security.AllPermission;
};
grant {
permission java.lang.RuntimePermission "stopThread";
// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "localhost:1024-", "listen";
// "standard" properies that can be read by anyone
permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";
permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";
permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
permission java.util.PropertyPermission "javax.realtime.version", "read";
};
This appears to be the same issue as the one referenced here:
http://jira.codehaus.org/browse/XSTR-379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
I replaced
TC_HOME/buildAgent/plugins/idea/lib/xstream.jar
TC_HOME/buildAgent/lib/xstream-1.2.1.jar
TC_HOME/webapps/ROOT/WEB-INF/lib/xstream-1.2.1.jar
with xstream-1.3.1.jar downloaded from xstream http://xstream.codehaus.org/download.html
I may have introduced a whole new level of complexity but the TC logger is now working with the IBM JDK without visable errors.
Thank you for investigation! I submitted issue to our tracker: http://www.jetbrains.net/tracker/issue/TW-9663
Please watch it, I hope it will be fixed in 5.0
Did it get fixed in TC 5? I have the same problem on TC 4.5
Yes, it's fixed in 5.1 version.