4.5 - 6 upgrade errors org.jdom.input.JDOMParseException: Error on line -1: Premature end of file.

Hello everyone, and I thank you all for your help ahead of time. I hope this is a stupid mistake I'm making and not something crazy...

So I'm doign a testrun of upgrading from 4.5 to 6.0 on a separate server. I copied all the files over and made an exact copy of the 4.5 server. Logged in and made sure it was working...

Once that was all good I moved the 4.5 directory out of the way and extracted the 6.0 war into the same directory as 4.5. Added teh mysql connector in and then tried to start it. I keep getting this error now. I updated everything I could think of and increased the memory heap size to -Xms256m -Xmx512m as well as the permsize.

So I launch the tomcat server and it starts up teamcity. catalina.out gives me the code and I put it in to start the upgrade. The upgrade goes for a few moments then this is what I get..

I would appreciate any help and hope that I have just done something stupid that's simple to fix.

jetbrains.buildServer.serverSide.versioning.ConvertException: org.jdom.input.JDOMParseException: Error on line -1: Premature end of file.
   at jetbrains.buildServer.serverSide.versioning.converters.FreeMarkerNotificationsConverter.convert(FreeMarkerNotificationsConverter.java:52)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverterStepJavaClass(ConvertPerformer.java:168)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverterSteps(ConvertPerformer.java:138)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverter(ConvertPerformer.java:89)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverters(ConvertPerformer.java:78)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.upgradeIt(VersionManager.java:391)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.checkVersionsAndUpgradeSchemaIfNeeded(VersionManager.java:359)
   at jetbrains.buildServer.serverSide.versioning.VersionManager$2.run(VersionManager.java:415)
   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withDB(TeamCityDatabaseManager.java:568)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.ensureActualDatabase(VersionManager.java:411)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:437)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerSafe(TeamCityDispatcherServlet.java:23)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$400(TeamCityDispatcherServlet.java:191)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$5.run(TeamCityDispatcherServlet.java:2)
   at java.lang.Thread.run(Thread.java:662)
caused by: org.jdom.input.JDOMParseException: Error on line -1: Premature end of file.
   at org.jdom.input.SAXBuilder.build(SAXBuilder.java:504)
   at org.jdom.input.SAXBuilder.build(SAXBuilder.java:888)
   at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:332)
   at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:309)
   at jetbrains.buildServer.serverSide.versioning.converters.FreeMarkerNotificationsConverter.readAndProcess(FreeMarkerNotificationsConverter.java:60)
   at jetbrains.buildServer.serverSide.versioning.converters.FreeMarkerNotificationsConverter.convert(FreeMarkerNotificationsConverter.java:36)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverterStepJavaClass(ConvertPerformer.java:168)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverterSteps(ConvertPerformer.java:138)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverter(ConvertPerformer.java:89)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverters(ConvertPerformer.java:78)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.upgradeIt(VersionManager.java:391)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.checkVersionsAndUpgradeSchemaIfNeeded(VersionManager.java:359)
   at jetbrains.buildServer.serverSide.versioning.VersionManager$2.run(VersionManager.java:415)
   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withDB(TeamCityDatabaseManager.java:568)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.ensureActualDatabase(VersionManager.java:411)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:437)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerSafe(TeamCityDispatcherServlet.java:23)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$400(TeamCityDispatcherServlet.java:191)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$5.run(TeamCityDispatcherServlet.java:2)
   at java.lang.Thread.run(Thread.java:662)
caused by: org.xml.sax.SAXParseException: Premature end of file.
   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
   at org.jdom.input.SAXBuilder.build(SAXBuilder.java:489)
   at org.jdom.input.SAXBuilder.build(SAXBuilder.java:888)
   at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:332)
   at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:309)
   at jetbrains.buildServer.serverSide.versioning.converters.FreeMarkerNotificationsConverter.readAndProcess(FreeMarkerNotificationsConverter.java:60)
   at jetbrains.buildServer.serverSide.versioning.converters.FreeMarkerNotificationsConverter.convert(FreeMarkerNotificationsConverter.java:36)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverterStepJavaClass(ConvertPerformer.java:168)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverterSteps(ConvertPerformer.java:138)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverter(ConvertPerformer.java:89)
   at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverters(ConvertPerformer.java:78)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.upgradeIt(VersionManager.java:391)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.checkVersionsAndUpgradeSchemaIfNeeded(VersionManager.java:359)
   at jetbrains.buildServer.serverSide.versioning.VersionManager$2.run(VersionManager.java:415)
   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withDB(TeamCityDatabaseManager.java:568)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.ensureActualDatabase(VersionManager.java:411)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:437)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerSafe(TeamCityDispatcherServlet.java:23)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$400(TeamCityDispatcherServlet.java:191)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$5.run(TeamCityDispatcherServlet.java:2)
   at java.lang.Thread.run(Thread.java:662)

7 comments
Comment actions Permalink

It seems like the error occurrs when TeamCity tries to convert .BuildServer/config/jabber-config.xml file. This file is either empty or is not well formed xml. It is likely that it was modified by hand. Please try to rename this file and start server again.

0
Comment actions Permalink

Oh... Well it is empty. The jabber-config.dtd file has some stuff in it, Should I post that on here?

I'm the Sysadmin/Network Security guy. So I don't use TeamCity really. However, I'm 99.99% sure we don't use jabber. So is there a way I can remove it or is there somethin else I should do with it?

Thanks for the info though, it's really nice to at least know what's been stumping me.

0
Comment actions Permalink

Please try to rename this file or remove it from the .BuildServer/config directory and start TC 6.0 again.


0
Comment actions Permalink

Thanks a lot... Solved my problem. Upgrade is successful.

I really appreciate your help. I don't see how you knew that was the issue though... I don't see anything about jabber-config.xml in there at all.

0
Comment actions Permalink

Well, from the source code I can see that the problem occurred becuase of empty jabber-config.xml. Unfortunately the exception itself does not give a clue on the error cause.

0
Comment actions Permalink

I'm seeing a similar error with my prototype system. I took a backup of our production system which is running 6.0.1 and restored it to a different system running the same version. Then I did an upgrade to 6.5.3 of the prototype system.  I'm seeing this in the catalina.out logfile:

Aug 15, 2011 9:31:13 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Log4J configuration file /usr1/TeamCity/bin/../conf/teamcity-server-log4j.xml will be monitored with interval 10 seconds.
Aug 15, 2011 9:31:17 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8111
Aug 15, 2011 9:31:17 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3570 ms
[2011-08-15 09:31:32,033]   WARN -   jetbrains.buildServer.SERVER - Warning: insufficient space on disk where the following directory resides: /h/uxoslnxbld3/0/TeamCityData/system. Disk space available: 24884.31Mb. Please contact your system administrator.
[2011-08-15 09:31:36,008]   WARN - rver.plugins.PluginsCollection - Plugin xml-report-plugin[version: SNAPSHOT-201104281748, path: /h/uxoslnxbld3/0/TeamCityData/plugins/.unpacked/xml-report-plugin] will not be loaded because it is overridden by plugin: xml-report-plugin[version: 17985, path: /h/uxoslnxbld3/0/TeamCity/webapps/ROOT/WEB-INF/plugins/.unpacked/xml-report-plugin]
=======================================================================
TeamCity 6.5.3 (build 17985) initialized, OS: Linux, JRE: 1.6.0_20-b02
TeamCity is running in enterprise mode
[2011-08-15 09:31:51,719]   WARN - r.usageStatistics.util.XmlUtil - Error on line -1: Premature end of file.
org.jdom.input.JDOMParseException: Error on line -1: Premature end of file.
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:504)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:847)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:826)
at jetbrains.buildServer.usageStatistics.util.XmlUtil.loadXml(XmlUtil.java:69)
at jetbrains.buildServer.usageStatistics.util.BasePersistentStateComponent.loadState(BasePersistentStateComponent.java:73)
at jetbrains.buildServer.usageStatistics.util.BasePersistentStateComponent.serverStartup(BasePersistentStateComponent.java:39)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:112)
at jetbrains.buildServer.serverSide.ServerSideEventDispatcher.access$000(ServerSideEventDispatcher.java:6)
at jetbrains.buildServer.serverSide.ServerSideEventDispatcher$1$1.run(ServerSideEventDispatcher.java:1)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl$2.run(SecurityContextImpl.java:1)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:21)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:24)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:29)
at jetbrains.buildServer.serverSide.ServerSideEventDispatcher$1.invoke(ServerSideEventDispatcher.java:1)
at $Proxy8.serverStartup(Unknown Source)
at jetbrains.buildServer.serverSide.impl.BuildServerImpl.completeStartup(BuildServerImpl.java:290)
at jetbrains.buildServer.web.impl.BuildServerConfigurator.loadConfiguration(BuildServerConfigurator.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
at jetbrains.buildServer.rootDispatcher.spring.WebDispatcherServlet.createWebApplicationContext(WebDispatcherServlet.java:8)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.createServerServlet(TeamCityDispatcherServlet.java:147)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:423)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerSafe(TeamCityDispatcherServlet.java:4)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$400(TeamCityDispatcherServlet.java:210)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$6.run(TeamCityDispatcherServlet.java:2)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:489)
... 50 more
Caused by:


What's worse, is that it seems the error happens over and over again filling the entire disk (22GB+) worth of output.  So how do I determine which file is causing the issue?

0
Comment actions Permalink

Hi Bill

Could you please additionally send us teamcity-server.log.

Thanks

0

Please sign in to leave a comment.