0

ZK9 internationalization java.lang.IllegalStateException

asked 2020-02-12 08:41:59 +0800

sa3a78 gravatar image sa3a78
30

I have issue when using internationalization. I'm using Netbeans8.2 with Tomcat9. I have tried the expression ${labels.login.label.title}, ${c:l('login.label.title')}, and Labels.getLabel("login.label.title"), they show error as below:

Exception

java.lang.IllegalStateException: The resources may not be accessed if they are not currently started
    org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:247)
    org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:213)
    org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:207)
    org.zkoss.web.util.resource.ServletLabelLocator.locate0(ServletLabelLocator.java:94)
    org.zkoss.web.util.resource.ServletLabelLocator.locate(ServletLabelLocator.java:77)
    org.zkoss.util.resource.impl.LabelLoaderImpl.loadLabels(LabelLoaderImpl.java:272)
    org.zkoss.util.resource.impl.LabelLoaderImpl.getLabel(LabelLoaderImpl.java:130)
    org.zkoss.util.resource.impl.LabelLoaderImpl.getLabel(LabelLoaderImpl.java:121)
    org.zkoss.util.resource.Labels.getLabel(Labels.java:61)
    org.zkoss.xel.fn.CommonFns.getLabel(CommonFns.java:134) 
        .....



zk.xml

<system-config>
   <label-location>/WEB-INF/labels/baseapp.properties</label-location>
</system-config>


baseapp.properties

login.label.title=Form Login
login.label.username=Username
login.label.password=Password
login.label.login=Login
login.msg.logout=Confirm Logout ?
login.error.emptydata=invalid data: username or password empty
login.error.notexist=username not exist or wrong password
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-02-12 15:01:22 +0800

MDuchemin gravatar image MDuchemin
1561 1 5
ZK Team

Hi there,

Does this always happen when you load the page? Or is it a "sometime" issue?

Does this only happen when you run the project from Netbeans in the tomcat container? If you package the project as a war file and deploy it to tomcat manually, do you get the same error?

It looks like this issue could be caused by the webapp trying to access some resources while still redeploying / restarting the container. If you have auto-deploy on change, it would be possible that the app tried to access some resource while being restarted / redeployed.

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
1 follower

RSS

Stats

Asked: 2020-02-12 08:41:59 +0800

Seen: 6 times

Last updated: Feb 12

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