This usually happens when you have some strange (very likely
non-printable) character in the file.
>From my experience, this char is always first, before <?xml   as you
already found on the google.

You should try opening the file with other editors, I use UltraEdit
and always catch this kind of chars

Regards,
Stojan


On Thu, Jun 19, 2008 at 11:52 AM, Alexander Arnopolin
<[email protected]> wrote:
> Dear all,
>
> I have the following problem with Magnolia (v3.5.8):
> After some templating work with magnolia it is not possible to start it again
> at the next day.
> I get following error in the tomcat log file:
>
> .......................
> [Fatal Error] :1:1: Content is not allowed in prolog.
> ERROR
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/magnolia]
> StandardContext.java(listenerStart:3768) 19.06.2008 09:53:12  Exception
> sending context initialized event to listener instance of class
> info.magnolia.cms.servlets.MgnlServletContextListener
> java.lang.RuntimeException: javax.jcr.RepositoryException: Content is not
> allowed in prolog.: Content is not allowed in prolog.: Content is not allowed
> in prolog.
> .......................
>
> I attach the exception with complete stack trace at the bottom of this mail.
>
> After some googling i found that "Content is not allowed in prolog" -error
> means mostly that some .xml file has spacer or empty lines before its <?xml
> ... tag. Therefore, I checked all .xml files in /webapps/magnolia/, but they
> all seems to be OK.
>
> I suppose it can be associated with the Data repository, where I tried to
> configure my own data type, but I'm not sure.
>
> I would be very grateful for Your help.
>
> Cheers,
> Alex
>
>
> .......................
> INFO   info.magnolia.module.ModuleManagerImpl
> ModuleManagerImpl.java(startModule:376) 19.06.2008 09:53:12  starting module
> scheduler
> INFO   info.magnolia.module.ModuleManagerImpl
> ModuleManagerImpl.java(startModule:376) 19.06.2008 09:53:12  starting module
> data
> [Fatal Error] :1:1: Content is not allowed in prolog.
> ERROR
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/magnolia]
> StandardContext.java(listenerStart:3768) 19.06.2008 09:53:12  Exception
> sending context initialized event to listener instance of class
> info.magnolia.cms.servlets.MgnlServletContextListener
> java.lang.RuntimeException: javax.jcr.RepositoryException: Content is not
> allowed in prolog.: Content is not allowed in prolog.: Content is not allowed
> in prolog.
>        at
> info.magnolia.module.data.DataModule.registerNodeType(DataModule.java:236)
>        at info.magnolia.module.data.DataModule.initType(DataModule.java:164)
>        at info.magnolia.module.data.DataModule.start(DataModule.java:117)
>        at
> info.magnolia.module.ModuleManagerImpl.startModule(ModuleManagerImpl.java:377
> )
>        at
> info.magnolia.module.ModuleManagerImpl.startModules(ModuleManagerImpl.java:31
> 5)
>        at
> info.magnolia.module.ui.ModuleManagerWebUI.onStartup(ModuleManagerWebUI.java:
> 80)
>        at
> info.magnolia.cms.beans.config.ConfigLoader.load(ConfigLoader.java:150)
>        at
> info.magnolia.cms.beans.config.ConfigLoader.<init>(ConfigLoader.java:119)
>        at
> info.magnolia.cms.servlets.MgnlServletContextListener$1.exec(MgnlServletConte
> xtListener.java:227)
>        at
> info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:411)
>        at
> info.magnolia.cms.servlets.MgnlServletContextListener.contextInitialized(Mgnl
> ServletContextListener.java:225)
>        at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3
> 764)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>        at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:76
> 0)
>        at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
>        at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
>        at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
>        at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
>        at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
>        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
>        at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
>        at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport
> .java:120)
>        at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
>        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>        at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>        at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>        at
> org.apache.catalina.core.StandardService.start(StandardService.java:448)
>        at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> Caused by: javax.jcr.RepositoryException: Content is not allowed in prolog.:
> Content is not allowed in prolog.: Content is not allowed in prolog.
>        at
> info.magnolia.jackrabbit.ProviderImpl.registerNodeTypes(ProviderImpl.java:329
> )
>        at
> info.magnolia.module.data.DataModule.registerNodeType(DataModule.java:232)
>        ... 34 more
> Caused by: java.io.IOException: Content is not allowed in prolog.
>        at
> org.apache.jackrabbit.core.util.DOMWalker.<init>(DOMWalker.java:65)
>        at
> org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.<init>(NodeTypeReader.
> java:90)
>        at
> org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.read(NodeTypeReader.ja
> va:66)
>        at
> info.magnolia.jackrabbit.ProviderImpl.registerNodeTypes(ProviderImpl.java:323
> )
>        ... 35 more
> Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
>        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>        at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
>        at
> org.apache.jackrabbit.core.util.DOMWalker.<init>(DOMWalker.java:60)
>        ... 38 more
> .......................
>
> ----------------------------------------------------------------
> for list details see
> http://documentation.magnolia.info/
> ----------------------------------------------------------------
>

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------

Reply via email to