0

Error ZK8: BaseURI must not be null when load zhtml from classpath /zkau/web/..

asked 2017-03-07 16:44:04 +0800

Marioko gravatar image Marioko
36 1

I am testing ZK 8 using some project with ZK7, i have some templates writed in zhtml and loaded from classpath using /zkau/web/mypath/template.zhtml. In Zk 7 works perfect but in ZK 8 i'm getting this exception:

java.lang.IllegalArgumentException: BaseURI must not be null
at org.zkoss.zsoup.helper.Validate.notNull(Validate.java:26)
at org.zkoss.zsoup.parser.TreeBuilder.initialiseParse(TreeBuilder.java:25)
at org.zkoss.zsoup.parser.TreeBuilder.parse(TreeBuilder.java:40)
at org.zkoss.zsoup.parser.HtmlTreeBuilder.parse(HtmlTreeBuilder.java:55)
at org.zkoss.zsoup.parser.Parser.parseInput(Parser.java:30)
at org.zkoss.zsoup.helper.DataUtil.parseByteData(DataUtil.java:115)
at org.zkoss.zsoup.helper.DataUtil.load(DataUtil.java:63)
at org.zkoss.zsoup.Zsoup.parse(Zsoup.java:135)
at org.zkoss.zhtml.impl.HtmlTreeBuilder.parse(HtmlTreeBuilder.java:328)
at org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:148)
at org.zkoss.zk.ui.metainfo.PageDefinitions.getPageDefinitionDirectly(PageDefinitions.java:96)
at org.zkoss.zk.ui.http.ZumlExtendlet$ZumlLoader.parse(ZumlExtendlet.java:200)
at org.zkoss.zk.ui.http.ZumlExtendlet$ZumlLoader.parse(ZumlExtendlet.java:193)
at org.zkoss.web.util.resource.ExtendletLoader.load(ExtendletLoader.java:112)
at org.zkoss.web.util.resource.ExtendletLoader.load(ExtendletLoader.java:41)
at org.zkoss.util.resource.ResourceCache$Info.load(ResourceCache.java:227)
at org.zkoss.util.resource.ResourceCache$Info.<init>(ResourceCache.java:202)
at org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:134)
at org.zkoss.zk.ui.http.ZumlExtendlet.service(ZumlExtendlet.java:97)
at org.zkoss.web.util.resource.ClassWebResource.web0(ClassWebResource.java:605)
at org.zkoss.web.util.resource.ClassWebResource.web(ClassWebResource.java:592)
at org.zkoss.web.util.resource.ClassWebResource.service(ClassWebResource.java:272)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:424)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)

Tracking the exception i found this in org.zkoss.zhtml.impl.HtmlTreeBuilder line 328:

return convertToIDOM(Zsoup.parse(inputStream, "UTF-8", null, Parser.xhtmlParser()));

The third parameter of Zsoup.parse() is the BaseURI and must not be null. I testing recompiling ZK 8.0.2.2 from source and replacing that null for an empty string "" and the exception is gone and works fine. But i cant use my compiled version because i get the error message "Your ZK binary is being altered and may not work as expected.. call potix bla bla" I dont know why this message if ZK is opensource and LGPL or there is a way to turn off this message :(

delete flag offensive retag edit

Comments

if you just compile the zhtml.jar there should be no such message

cor3000 ( 2017-03-23 01:30:28 +0800 )edit

thanks for reply i will test it

Marioko ( 2017-04-05 14:43:33 +0800 )edit

reading your question again, I am more and more puzzled about your usage scenario. It sounds very uncommon to load a .zhtml as a resource to the client side(<templates> in ZK are handled at server side and don't exist at all at client side) are you trying to insert the contents manually using JS?

cor3000 ( 2017-04-06 03:15:42 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-03-22 14:49:57 +0800

Marioko gravatar image Marioko
36 1

nothing to do here?? i need help with this. How can i submit a issue?

link publish delete flag offensive edit
0

answered 2017-03-22 17:22:23 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

you could create a tracker : http://tracker.zkoss.org/secure/Dashboard.jspa

Or, if you have paid support you could send an email to ZK itself.

Chill.

link publish delete flag offensive edit
Your answer
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
2 followers

RSS

Stats

Asked: 2017-03-07 16:44:04 +0800

Seen: 57 times

Last updated: Mar 22 '17

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