Invalid xml character in story description causes kunagi fail on restart

After restart of kunagi server the application didn't start. We got an exception in error log with information that an invalid character "&#x8" (backspace) was in the xml file. Somehow those characters appeared in story description (about 10 backspace characters), causing kunagi to fail after restart.
After manual removal of invalid characters in xml files, kunagi started successfully.

The error message:
Fri, 12. December 2014, 10:20 -> Fri Dec 12 10:20:02 CET 2014 
    FATAL ApplicationStarter   Starting application failed. Application startup failed. Data integrity check or repair failed. <- Loading object from C:\kunagi\entities\issue\2ed37689-a281-4cd3-a87d-a5bb4f31ac42-2.xml failed <- StreamException:  : Character reference "&#x8" is an invalid XML character. <- SAXParseException: Character reference "&#x8" is an invalid XML character.
java.lang.RuntimeException: Application startup failed. Data integrity check or repair failed.
    at ilarkesto.di.app.AApplication.start(AApplication.java:126)
    at ilarkesto.di.app.ApplicationStarter.startApplication(ApplicationStarter.java:58)
    at ilarkesto.di.app.WebApplicationStarter.startWebApplication(WebApplicationStarter.java:32)
    at scrum.server.ScrumWebApplication.get(ScrumWebApplication.java:387)
    at scrum.server.common.StartServlet.onPreInit(StartServlet.java:80)
    at ilarkesto.webapp.AServlet.init(AServlet.java:96)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Loading object from C:\kunagi\entities\issue\2ed37689-a281-4cd3-a87d-a5bb4f31ac42-2.xml failed
    at ilarkesto.persistence.FileEntityStore.load(FileEntityStore.java:240)
    at ilarkesto.persistence.DaoService.addDao(DaoService.java:52)
    at ilarkesto.persistence.DaoService.initialize(DaoService.java:174)
    at ilarkesto.di.app.AApplication.getDaoService(AApplication.java:423)
    at ilarkesto.di.app.AApplication.ensureIntegrity(AApplication.java:72)
    at scrum.server.ScrumWebApplication.ensureIntegrity(ScrumWebApplication.java:152)
    at ilarkesto.di.app.AApplication.start(AApplication.java:122)
    at ilarkesto.di.app.ApplicationStarter.startApplication(ApplicationStarter.java:58)
    at ilarkesto.di.app.WebApplicationStarter.startWebApplication(WebApplicationStarter.java:32)
    at scrum.server.ScrumWebApplication.get(ScrumWebApplication.java:387)
    at scrum.server.common.StartServlet.onPreInit(StartServlet.java:80)
    at ilarkesto.webapp.AServlet.init(AServlet.java:96)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.thoughtworks.xstream.io.StreamException:  : Character reference "&#x8" is an invalid XML character.
    at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:105)
    at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:77)
    at com.thoughtworks.xstream.XStream.fromXML(XStream.java:895)
    at ilarkesto.integration.xstream.XStreamSerializer.deserialize(XStreamSerializer.java:85)
    at ilarkesto.persistence.FileEntityStore.loadObject(FileEntityStore.java:282)
    at ilarkesto.persistence.FileEntityStore.load(FileEntityStore.java:238)
    at ilarkesto.persistence.DaoService.addDao(DaoService.java:52)
    at ilarkesto.persistence.DaoService.initialize(DaoService.java:174)
    at ilarkesto.di.app.AApplication.getDaoService(AApplication.java:423)
    at ilarkesto.di.app.AApplication.ensureIntegrity(AApplication.java:72)
    at scrum.server.ScrumWebApplication.ensureIntegrity(ScrumWebApplication.java:152)
    at ilarkesto.di.app.AApplication.start(AApplication.java:122)
    at ilarkesto.di.app.ApplicationStarter.startApplication(ApplicationStarter.java:58)
    at ilarkesto.di.app.WebApplicationStarter.startWebApplication(WebApplicationStarter.java:32)
    at scrum.server.ScrumWebApplication.get(ScrumWebApplication.java:387)
    at scrum.server.common.StartServlet.onPreInit(StartServlet.java:80)
    at ilarkesto.webapp.AServlet.init(AServlet.java:96)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; lineNumber: 16; columnNumber: 6; Character reference "&#x8" is an invalid XML character.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:98)
    at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:77)
    at com.thoughtworks.xstream.XStream.fromXML(XStream.java:895)
    at ilarkesto.integration.xstream.XStreamSerializer.deserialize(XStreamSerializer.java:85)
    at ilarkesto.persistence.FileEntityStore.loadObject(FileEntityStore.java:282)
    at ilarkesto.persistence.FileEntityStore.load(FileEntityStore.java:238)
    at ilarkesto.persistence.DaoService.addDao(DaoService.java:52)
    at ilarkesto.persistence.DaoService.initialize(DaoService.java:174)
    at ilarkesto.di.app.AApplication.getDaoService(AApplication.java:423)
    at ilarkesto.di.app.AApplication.ensureIntegrity(AApplication.java:72)
    at scrum.server.ScrumWebApplication.ensureIntegrity(ScrumWebApplication.java:152)
    at ilarkesto.di.app.AApplication.start(AApplication.java:122)
    at ilarkesto.di.app.ApplicationStarter.startApplication(ApplicationStarter.java:58)
    at ilarkesto.di.app.WebApplicationStarter.startWebApplication(WebApplicationStarter.java:32)
    at scrum.server.ScrumWebApplication.get(ScrumWebApplication.java:387)
    at scrum.server.common.StartServlet.onPreInit(StartServlet.java:80)
    at ilarkesto.webapp.AServlet.init(AServlet.java:96)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
 | app:kunagi

Status

Bug is fixed for Release 0.26.2. Needs to be tested.

Comments

Wed, Mar 18, 2015, 09:43 by artjom (PO,T)

Thanks for your report. To clarify: Multiple backspace characters appeared in a Story description by themselves, i.e. were not entered by a user?

Wed, Apr 22, 2015, 10:00 by Roman Koziolek

It is possible that the text was pasted into the description control.

Mon, Nov 13, 2017, 11:04 by kiralylj

I am facing with very similar parsing problem during restart:

[Fatal Error] :21:15: Character reference "&#x1b" is an invalid XML character.
Mon Nov 13 09:35:39 CET 2017.
FATAL ApplicationStarter Starting application failed. Application startup failed. Data integrity check or repair failed. <- Loading object from /var/lib/tomcat7/webapps/kuna..

The invalid character was in a comment, it was pasted by user by GUI. That should be prohibited in front-end.

Post a comment



optional
optional