0

Download broken zkoss version from 8.6.01 -> 9.6.0.2

asked 2022-07-28 23:39:34 +0800

vjulien gravatar image vjulien
1 1

Problems calling function 'z:outDeviceStyleSheets'

org.zkoss.zel.ELException: Problems calling function 'z:outDeviceStyleSheets' at org.zkoss.zel.impl.parser.AstFunction.getValue(AstFunction.java:204) at org.zkoss.zel.impl.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) at org.zkoss.xel.zel.ELXelExpression.evaluate(ELXelExpression.java:41) at org.zkoss.web.servlet.dsp.impl.XelNode.interpret(XelNode.java:44) at org.zkoss.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:52) at org.zkoss.web.servlet.dsp.impl.RootNode.interpret(RootNode.java:60) at org.zkoss.web.util.resource.DspExtendlet.service(DspExtendlet.java:95) at org.zkoss.web.util.resource.ClassWebResource.web0(ClassWebResource.java:615) at org.zkoss.web.util.resource.ClassWebResource.web(ClassWebResource.java:602) at org.zkoss.web.util.resource.ClassWebResource.service(ClassWebResource.java:282) at org.zkoss.zk.au.http.DHtmlResourceServlet.doGet0(DHtmlResourceServlet.java:117) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:397) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:459) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) at org.zkoss.web.servlet.Servlets.forward(Servlets.java:906) at org.zkoss.zk.au.http.AuUploader.service(AuUploader.java:212) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:419) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:459) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at io.prometheus.client.filter.MetricsFilter.doFilter(MetricsFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at org.zkoss.zk.ui.http.ExecutionImpl.encodeURL(ExecutionImpl.java:322) at org.zkoss.zk.ui.Executions.encodeURL(Executions.java:132) at org.zkoss.zk.ui.sys.HtmlPageRenders.outLangStyleSheets(HtmlPageRenders.java:412) at org.zkoss.zk.fn.JspFns.outDeviceStyleSheets(JspFns.java:116) at org.zkoss.zk.fn.DspFns.outDeviceStyleSheets(DspFns.java:80) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.zkoss.zel.impl.parser.AstFunction.getValue(AstFunction.java:192)

delete flag offensive retag edit

5 Answers

Sort by ยป oldest newest most voted
0

answered 2022-08-03 17:11:29 +0800

hawk gravatar image hawk
3023 1 5
http://hawkphoenix.blogsp... ZK Team

The only 1 place that calls z:outDeviceStyleSheets I found is at zul.jar/web/zul/html/fileupload-done.html.dsp. But it's used for uploading result, not for downloading.

Your stack trace show it call AuUploader:

org.zkoss.zk.au.http.AuUploader.service(AuUploader.java:212) at

ZK calls z:outDeviceStyleSheets when you run CE and upload a file. By default, calling that function should not produce an error. Do you customize fileupload-done.html.dsp?

There is no one who reported the same error before. Could provide more details like:

  1. a reproducible zul example
  2. steps to reproduce
link publish delete flag offensive edit
0

answered 2022-08-05 15:10:53 +0800

vjulien gravatar image vjulien
1 1

updated 2022-08-05 15:15:41 +0800

Hi,

You are right, i meant uploading* instead of downloading*.

We do not customize fileupload-done.html.dsp on our side. My zul looks like this: <button label="${i18n:tr('cours.bibiotheque.document.televerser')}" forward="onTeleverser()"/>

the Composer looks like this: public void onTeleverser() throws InterruptedException { media = Fileupload.get(true); if (media == null) {

we override the template of the Fileupload with the following file: https:// fossies.org / linux /zk/zul/src/archive/web/zul/html/fileuploaddlg.zul

Even if i disable to override of the template of FileUpload, it still aint working as well

link publish delete flag offensive edit
0

answered 2022-08-05 15:14:00 +0800

vjulien gravatar image vjulien
1 1

in my pom.xml i also include: zkplus-legacy

So that i'm able to still use AnnotateDataBinder

link publish delete flag offensive edit
0

answered 2022-08-08 14:32:09 +0800

hawk gravatar image hawk
3023 1 5
http://hawkphoenix.blogsp... ZK Team

Could you run the simple example below in your project to see if there is any error:

<zk xmlns:n="native">
    <n:h1>Use as a Component</n:h1>
    <fileupload label="Upload">
        <attribute name="onUpload">
            org.zkoss.util.media.Media media = event.getMedia();
            System.out.println(media.toString());
        </attribute>
    </fileupload>

    <n:h1>static method</n:h1>
    <div onUpload="processMedia(event.getMedias());">
        <zscript deferred="true"><![CDATA[
    import org.zkoss.util.media.Media;

    public void processMedia(Media[] media) {
        if (media != null) {
            for (int i = 0; i < media.length; i++) {
                if (media[i] instanceof org.zkoss.image.Image) {
                    image.setContent(media[i]);
                } else {
                    Messagebox.show("Not an image: " + media[i], "Error",
                            Messagebox.OK, Messagebox.ERROR);
                    break; //not to show too many errors
                }
            }
        }
    }
]]></zscript>
        <vbox>
            <button label="Upload" onClick="Fileupload.get(1);" />
            <image id="image" />
        </vbox>
    </div>
</zk>

Or could you simplify your page to narrow down the problem? For example, remove the business logic, replace values from a database with static strings, remove functions one by one, then finally you can produce a simple zul like mine to reproduce the problem.

link publish delete flag offensive edit
0

answered 2022-08-12 01:23:36 +0800

vjulien gravatar image vjulien
1 1

I'll be able to try the zul next week, I'll comeback to you once done

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

RSS

Stats

Asked: 2022-07-28 23:39:34 +0800

Seen: 14 times

Last updated: 2 days ago

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