0

Content is not allowed in prolog. - Exception [closed]

asked 2013-02-26 13:17:44 +0800

ML2012 gravatar image ML2012
17 2

updated 2013-02-26 13:25:10 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Hi,

I am using ZK spreadsheet and have recently added a file type to my application, to allow users to download a PDF, with a link to download the webpage. However when running my application on the server I get this error:

HTTP Status 500 - org.xml.sax.SAXParseException: Content is not allowed in prolog.

type Exception report

message org.xml.sax.SAXParseException: Content is not allowed in prolog.

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.zkoss.lang.SystemException: org.xml.sax.SAXParseException: Content is not allowed in prolog. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) org.zkoss.lang.Classes.newInstance(Classes.java:73) org.zkoss.lang.Exceptions.wrap(Exceptions.java:161) org.zkoss.lang.SystemException$Aide.wrap(SystemException.java:42) org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:157) org.zkoss.web.util.resource.ResourceCaches.get(ResourceCaches.java:100) org.zkoss.zk.ui.metainfo.PageDefinitions.getPageDefinition(PageDefinitions.java:140) org.zkoss.zk.ui.impl.AbstractUiFactory.getPageDefinition(AbstractUiFactory.java:165) org.zkoss.zk.ui.http.ExecutionImpl.getPageDefinition(ExecutionImpl.java:368) org.zkoss.zk.ui.impl.AbstractExecution.createComponents0(AbstractExecution.java:246) org.zkoss.zk.ui.impl.AbstractExecution.createComponents(AbstractExecution.java:238) org.zkoss.zk.ui.Executions.createComponents(Executions.java:179) org.zkoss.zss.app.zul.Zssapp.<init>(Zssapp.java:53) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) java.lang.Class.newInstance0(Class.java:357) java.lang.Class.newInstance(Class.java:310) org.zkoss.zk.ui.metainfo.impl.ComponentDefinitionImpl.newInstance(ComponentDefinitionImpl.java:312) org.zkoss.zk.ui.metainfo.impl.ComponentDefinitionImpl.newInstance(ComponentDefinitionImpl.java:299) org.zkoss.zk.ui.metainfo.ComponentInfo.newInstance(ComponentInfo.java:624) org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:96) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:802) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:771) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:680) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:644) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:817) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:771) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:680) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:644) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:817) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:771) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:680) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:742) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:702) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:644) org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:394) org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:316) org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215) org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:135) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) root cause

org.xml.sax.SAXParseException: Content is not allowed in prolog. com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174) com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388) com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1427) com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1036) com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647) com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) javax.xml.parsers.SAXParser.parse(SAXParser.java:395) javax.xml.parsers.SAXParser.parse(SAXParser.java:277) org.zkoss.idom.input.SAXBuilder.build(SAXBuilder.java:334) org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:112) org.zkoss.zk.ui.metainfo.PageDefinitions$MyLoader.parse(PageDefinitions.java:215) org.zkoss.zk.ui.metainfo.PageDefinitions$MyLoader.parse(PageDefinitions.java:198) org.zkoss.web.util.resource.ResourceLoader.load(ResourceLoader.java:77) org.zkoss.web.util.resource.ResourceLoader.load(ResourceLoader.java:32) org.zkoss.util.resource.ResourceCache$Info.load(ResourceCache.java:227) org.zkoss.util.resource.ResourceCache$Info.<init>(ResourceCache.java:202) org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:134) org.zkoss.web.util.resource.ResourceCaches.get(ResourceCaches.java:100) org.zkoss.zk.ui.metainfo.PageDefinitions.getPageDefinition(PageDefinitions.java:140) org.zkoss.zk.ui.impl.AbstractUiFactory.getPageDefinition(AbstractUiFactory.java:165) org.zkoss.zk.ui.http.ExecutionImpl.getPageDefinition(ExecutionImpl.java:368) org.zkoss.zk.ui.impl.AbstractExecution.createComponents0(AbstractExecution.java:246) org.zkoss.zk.ui.impl.AbstractExecution.createComponents(AbstractExecution.java:238) org.zkoss.zk.ui.Executions.createComponents(Executions.java:179) org.zkoss.zss.app.zul.Zssapp.<init>(Zssapp.java:53) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) java.lang.Class.newInstance0(Class.java:357) java.lang.Class.newInstance(Class.java:310) org.zkoss.zk.ui.metainfo.impl.ComponentDefinitionImpl.newInstance(ComponentDefinitionImpl.java:312) org.zkoss.zk.ui.metainfo.impl.ComponentDefinitionImpl.newInstance(ComponentDefinitionImpl.java:299) org.zkoss.zk.ui.metainfo.ComponentInfo.newInstance(ComponentInfo.java:624) org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:96) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:802) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:771) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:680) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:644) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:817) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:771) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:680) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:644) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:817) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:771) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:680) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:742) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:702) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:644) org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:394) org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:316) org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215) org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:135) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.35 logs.

I have removed the file, and the link in my index.zul file however I am still getting the exception error, after restarting the server. When I remove Individual elements out of my .ZUL file I have narrowed it down to being caused by the <zssapp> spreadsheet component which is breaking the system. Could this change have possibly caused this error to appear?

Many Thanks

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by sjoshi
close date 2013-02-28 05:17:13

Comments

Hi, thanks for your reply, I replaced the files in the WebContent folder with a backup and that fixed it. Most likely it was caused by either a missing closing tag or whitespace. Thanks

ML2012 ( 2013-02-27 09:13:24 +0800 )edit

Please accept the answer and closed the question

sjoshi ( 2013-02-27 13:19:41 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-02-26 13:24:02 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

updated 2013-02-26 13:25:55 +0800

Please check your ZUL page some tag not closed thats why you are getting issue. Did you added the Calendar Jar?

link publish delete flag offensive edit

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-02-26 13:17:44 +0800

Seen: 41 times

Last updated: Feb 27 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More