[ https://issues.apache.org/jira/browse/TREQ-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14004339#comment-14004339 ]
Vladimir Orlic commented on TREQ-19: ------------------------------------ I believe that this change has broken the compatibility with Java SE 6 as this change introduces dependency on java.util.IllformedLocaleException that is first implemented in Java SE 7. https://mail-archives.apache.org/mod_mbox/tiles-commits/201403.mbox/%3c20140330135748.3ad842388...@eris.apache.org%3E I have discovered this because I had to switch my JRE form 7 to 6 because of the environment on the target production server. As I switch to Java 6 I get the following error: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: java/util/IllformedLocaleException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NoClassDefFoundError: java/util/IllformedLocaleException at org.springframework.web.servlet.view.tiles3.SpringWildcardServletTilesApplicationContext.getResources(SpringWildcardServletTilesApplicationContext.java:88) at org.springframework.web.servlet.view.tiles3.TilesConfigurer$SpringTilesContainerFactory.getSources(TilesConfigurer.java:288) at org.apache.tiles.factory.BasicTilesContainerFactory.createLocaleDefinitionDao(BasicTilesContainerFactory.java:182) at org.apache.tiles.factory.BasicTilesContainerFactory.createDefinitionsFactory(BasicTilesContainerFactory.java:137) at org.springframework.web.servlet.view.tiles3.TilesConfigurer$SpringTilesContainerFactory.createDefinitionsFactory(TilesConfigurer.java:333) at org.apache.tiles.factory.BasicTilesContainerFactory.createContainer(BasicTilesContainerFactory.java:86) at org.springframework.web.servlet.view.tiles3.TilesConfigurer$SpringTilesContainerFactory.createContainer(TilesConfigurer.java:279) at org.apache.tiles.startup.AbstractTilesInitializer.createContainer(AbstractTilesInitializer.java:114) at org.apache.tiles.startup.AbstractTilesInitializer.initialize(AbstractTilesInitializer.java:64) at org.springframework.web.servlet.view.tiles3.TilesConfigurer.afterPropertiesSet(TilesConfigurer.java:254) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509) ... 22 more Workaround is to switch back my pom dependency to 3.0.3 Please let me know if you need more detail in order to take this issue on. > Please make the significance of underscore (_) in tiles definition filename > more obvious > ---------------------------------------------------------------------------------------- > > Key: TREQ-19 > URL: https://issues.apache.org/jira/browse/TREQ-19 > Project: Tiles Request > Issue Type: Task > Environment: Apache Tomcat 7.0.42, JSE 1.7.0_45, Windows > Reporter: Eric E > Assignee: Mck SembWever > Priority: Minor > Fix For: 1.0.4 > > > In reading the Tiles documentation, it was not obvious to me that including > an underscore (_) in my tiles definition filename would cause Tiles to > interpret whatever follows the underscore as a locale. > For example, in my TilesConfigurer configuration, I had the following: > {code} > <bean id="tilesConfigurer" > class="org.springframework.web.servlet.view.tiles3.TilesConfigurer"> > <property name="definitions"> > <list> > <value>/WEB-INF/templates/layouts.xml</value> > <value>/WEB-INF/views/base_views.xml</value> > </list> > </property> > </bean> > {code} > This caused Tiles, apparently, to assign the Locale "views" to the second > definition. This was clearly not what I intended, and the side effect of > this was that Tiles discarded the second definition, and my view contained in > that definition could not be resolved. > Only after spending some time with a debugger did I discover the code in > org.apache.tiles.request.locale.PostfixedApplicationResource that causes this > behaviour. > It would be nice if the documentation more clearly warns developers about > this so that others do not have to go through the same trouble. -- This message was sent by Atlassian JIRA (v6.2#6252)