-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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 :(
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.
Asked: 2017-03-07 16:44:04 +0800
Seen: 57 times
Last updated: Mar 22 '17
zkspringmvc jar licence is GPL ?
Build web application without any zul files
Custom component that extends Textbox does not fire onChange event
java.lang.NullPointerException to update to zk 8.0.1
"Spring Session" + ZK + "Spring core" @Listen method refresh the screen
zk8 client side binding to a viewmodel command seems not to work
upload event dialog do not open in browser
Notification is not shown inside sticky block
Where can I find documentation (like ZK Developer's Reference) for ZK 8.0.2.2 ?
if you just compile the zhtml.jar there should be no such message
cor3000 ( 2017-03-23 01:30:28 +0800 )editthanks for reply i will test it
Marioko ( 2017-04-05 14:43:33 +0800 )editreading 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