0

The encoding declaration is required in the..

asked 2006-10-24 22:14:12 +0000

admin gravatar image admin
18681 1 9 118
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3978411

By: nobody

I'm just migrating my application form testmachine to production, and I'm getting the folowing error when accessing a zul page (worked perfectly fine on the testmachine):

org.zkoss.lang.SystemException: org.xml.sax.SAXParseException: The encoding declaration is required in the text declaration.
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor
Impl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor
AccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
org.zkoss.lang.Classes.newInstance(Classes.java:79)
org.zkoss.lang.Exceptions.wrap(Exceptions.java:162)
org.zkoss.lang.SystemException$Aide.wrap(SystemException.java:47)
org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:151)
org.zkoss.web.util.resource.ResourceCaches.get(ResourceCaches.java:135)
org.zkoss.zk.ui.metainfo.PageDefinitions.getPageDefinition(PageDefinitions.java
:133)
org.zkoss.zk.ui.impl.AbstractUiFactory.getPageDefinition(AbstractUiFactory.java
:65)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:130)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:105)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

This happens on Apache Tomcat/5.0.28

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2006-10-25 01:09:15 +0000

admin gravatar image admin
18681 1 9 118
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3978563

By: henrichen

It seems the XML parser complains that you did not put "encoding" in XML
declaration:

Something

<?xml version="1.0" ?>

that has to be

<?xml version="1.0" encoding="UTF-8"?>

/henri

link publish delete flag offensive edit

answered 2006-10-25 05:50:06 +0000

admin gravatar image admin
18681 1 9 118
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3978726

By: nobody

That's not the problem, since the encoding parameter was already present...

link publish delete flag offensive edit

answered 2006-10-25 06:23:46 +0000

admin gravatar image admin
18681 1 9 118
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3978744

By: nobody

And besides, this worked fine on the test machine, why not now?

link publish delete flag offensive edit

answered 2006-10-25 07:35:43 +0000

admin gravatar image admin
18681 1 9 118
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3978805

By: henrichen

Well, it is hard to say. It could be the configuration or the environment difference.
However, the stacktrace shows that the XML parser complains that. You can try search on the internet the same message and see why this could happen?

/henri

link publish delete flag offensive edit

answered 2006-10-25 07:54:57 +0000

admin gravatar image admin
18681 1 9 118
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3978821

By: nobody

I already did, but that didn't bring a lot of help.

I also tried adding 'standalone="yes"', but then I get:
org.zkoss.lang.SystemException: org.xml.sax.SAXParseException: No more pseudo attributes are allowed.

My orriginal line:

<?xml version="1.0" encoding="UTF-8" xmlns:h="http://www.w3.org/1999/xhtml"?>

But when I delete the xmlns:h stuff

<?xml version="1.0" encoding="UTF-8"?>

It works, but I cannot use standard html stuff anymore... Is there any other way of doing this?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2006-10-24 22:14:12 +0000

Seen: 2,791 times

Last updated: Oct 25 '06

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