I'm using ZK 8.0.1 and Tomcat 8.0.30.
I have several applications which are deployed to Tomcat. I put all zk jars to $CATALINA_BASE/lib
because I want use one version of zk for all my applications.
My applications start and work fine except one thing. After some time of work I noticed that instead of all standard labels (e.g. label of buttons like 'yes', 'no') I see message in format Unknown message code : *code*. It happens in all zk applications. Right after start of server all labels is displayed correctly.
I detected a moment when I think it starts:
After executing steps above all standard labels in all applications isn't displayed correctly.
A cause this problem is exception:
java.lang.IllegalStateException: The resources may not be accessed if they are not currently started
.
StackTrace:
org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:245),
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:212),
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:206),
org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:554),
org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:199),
org.zkoss.web.util.resource.ServletLabelLocator.locate0(ServletLabelLocator.java:90),
org.zkoss.web.util.resource.ServletLabelLocator.locate(ServletLabelLocator.java:75),
org.zkoss.util.resource.impl.LabelLoaderImpl.loadLabels(LabelLoaderImpl.java:260),
org.zkoss.util.resource.impl.LabelLoaderImpl.getLabel(LabelLoaderImpl.java:118),
org.zkoss.util.resource.impl.LabelLoaderImpl.getLabel(LabelLoaderImpl.java:109),
org.zkoss.util.resource.Labels.getLabel(Labels.java:61),
org.zkoss.mesg.Messages.getFromBundle(Messages.java:81),
org.zkoss.mesg.Messages.getNotFound(Messages.java:105),
org.zkoss.mesg.Messages.get(Messages.java:157),
org.zkoss.mesg.Messages.get(Messages.java:52)....
Maybe somebody knows how to resolve this problem and what I do wrong.
答案 0 :(得分:1)
可能有关系:
我遇到了“未知的消息代码' zk-oss也有错误。当框架试图找到标准对话框按钮的本地化标签时出现这些标签,例如OK,CANCEL,YES,NO等,但无法找到适当的资源。
在debian上,以下内容为我解决了这个问题: