Spring ReloadableResourceBundleMessageSource works with Java 6, fails with Java 7 -
our declaration:
<bean id="messagesource" class="org.springframework.context.support.reloadableresourcebundlemessagesource"> <property name="basenames"> <list> <value>web-inf/classes/caasmessages</value> </list> </property> <property name="usecodeasdefaultmessage" value="true" /> <property name="defaultencoding" value="utf-8"/> </bean>
we've tried classpath:caasmessages, we've tried caasmessages. actual files in web-inf/classes , include caasmessages.properties, caasmessages_es.properties , on.
the error:
javax.servlet.jsp.jsptagexception: no message found under code 'screen.confirmloginstats.title' locale 'en_us'. @ org.springframework.web.servlet.tags.messagetag.dostarttaginternal(messagetag.java:184) @ org.springframework.web.servlet.tags.requestcontextawaretag.dostarttag(requestcontextawaretag.java:79) @ org.apache.jsp.web_002dinf.view.jsp.ssn.casloginview_jsp._jspx_meth_spring_005fmessage_005f0(casloginview_jsp.java:403) @ org.apache.jsp.web_002dinf.view.jsp.ssn.casloginview_jsp._jspservice(casloginview_jsp.java:105) @ org.apache.jasper.runtime.httpjspbase.service(httpjspbase.java:70) @ javax.servlet.http.httpservlet.service(httpservlet.java:717) @ org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:377) @ org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:313) @ org.apache.jasper.servlet.jspservlet.service(jspservlet.java:260) @ javax.servlet.http.httpservlet.service(httpservlet.java:717)
and on.
we're really, really, sure message in caasmessages.properties. and, said in title, works fine when tomcat run under jdk6, fails under jdk7 shown.
never mind. java 6 versus java 7 red herring. "hidden" context file defining second messagesource incorrectly. unknown reasons, correct bean preferred java 6 , incorrect 1 java 7.
Comments
Post a Comment