tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken McWilliams <ken.mcwilli...@gmail.com>
Subject Getting OGNL working tiles 2.2.2
Date Sun, 08 Apr 2012 21:59:04 GMT
Issue getting tiles working in Tiles 2.2.2 : "PWC1223: Path
classpath*:META-INF/**/tiles*.xml does not start with '/'"

Maven is used for the build.

Here is the stack trace:

SEVERE: java.net.MalformedURLException: PWC1223: Path
classpath*:META-INF/**/tiles*.xml does not start with '/'
    at
org.apache.catalina.core.StandardContext.getResource(StandardContext.java:6922)
    at
org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:382)
    at
org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:260)
    at
org.apache.tiles.servlet.context.ServletTilesApplicationContext.getResource(ServletTilesApplicationContext.java:100)
    at
org.apache.tiles.servlet.context.ServletTilesApplicationContext.getResources(ServletTilesApplicationContext.java:106)
    at
com.kenmcwilliams.tiles.extras.complete.CompleteAutoloadTilesContainerFactory.getSourceURLs(CompleteAutoloadTilesContainerFactory.java:223)
    at
org.apache.tiles.factory.BasicTilesContainerFactory.createLocaleDefinitionDao(BasicTilesContainerFactory.java:298)
    at
org.apache.tiles.factory.BasicTilesContainerFactory.createDefinitionsFactory(BasicTilesContainerFactory.java:242)
    at
org.apache.tiles.factory.BasicTilesContainerFactory.createContainer(BasicTilesContainerFactory.java:104)
    at
org.apache.tiles.startup.AbstractTilesInitializer.createContainer(AbstractTilesInitializer.java:124)
    at
org.apache.tiles.startup.AbstractTilesInitializer.initialize(AbstractTilesInitializer.java:70)
    at
org.apache.tiles.web.startup.AbstractTilesListener.contextInitialized(AbstractTilesListener.java:62)
    at
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)

Here is the Web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <listener>

<listener-class>com.kenmcwilliams.tiles.web.startup.TilesListener</listener-class>
    </listener>
    <filter>
        <filter-name>struts2</filter-name>

<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
</web-app>

>From the above here is my

    package com.kenmcwilliams.tiles.web.startup;

    import
com.kenmcwilliams.tiles.extras.complete.CompleteAutoloadTilesContainerFactory;
    import org.apache.tiles.TilesApplicationContext;
    import org.apache.tiles.factory.AbstractTilesContainerFactory;
    import org.apache.tiles.startup.AbstractTilesInitializer;
    import org.apache.tiles.startup.TilesInitializer;
    import org.apache.tiles.web.startup.AbstractTilesListener;

    /**
    * Listener for the initialization of the Tiles container.
    */
    public class TilesListener extends AbstractTilesListener {
        @Override
        protected TilesInitializer createTilesInitializer() {
            return new AbstractTilesInitializer() {

                @Override
                protected AbstractTilesContainerFactory
createContainerFactory(TilesApplicationContext context) {
                    return new CompleteAutoloadTilesContainerFactory();
                }
            };
        }
    }


Note: I am using my own CompleteAutoloadTilesContainerFactory to try and
get around this issue, I did this after reading:
https://issues.apache.org/jira/browse/TILES-493 (but I am using tiles 2.2.2
so that shouldn't affect me, but I took the advice there and had the
container check if those collections were null and if so initialised
them).  if I use
org.apache.tiles.extras.complete.CompleteAutoloadTilesContainerFactory
then: I still get the same error...

Caused by: org.apache.tiles.definition.DefinitionsFactoryException: Cannot
load definition URLs
    at
org.apache.tiles.extras.complete.CompleteAutoloadTilesContainerFactory.getSourceURLs(CompleteAutoloadTilesContainerFactory.java:244)
    at
org.apache.tiles.factory.BasicTilesContainerFactory.createLocaleDefinitionDao(BasicTilesContainerFactory.java:298)
    at
org.apache.tiles.factory.BasicTilesContainerFactory.createDefinitionsFactory(BasicTilesContainerFactory.java:242)
    at
org.apache.tiles.factory.BasicTilesContainerFactory.createContainer(BasicTilesContainerFactory.java:104)
    at
org.apache.tiles.startup.AbstractTilesInitializer.createContainer(AbstractTilesInitializer.java:124)
    at
org.apache.tiles.startup.AbstractTilesInitializer.initialize(AbstractTilesInitializer.java:70)
    at
org.apache.tiles.web.startup.AbstractTilesListener.contextInitialized(AbstractTilesListener.java:62)
    at
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
    at
com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
    ... 39 more
Caused by: java.net.MalformedURLException: PWC1223: Path
classpath*:META-INF/**/tiles*.xml does not start with '/'
    at
org.apache.catalina.core.StandardContext.getResource(StandardContext.java:6922)
    at
org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:382)
    at
org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:260)
    at
org.apache.tiles.servlet.context.ServletTilesApplicationContext.getResource(ServletTilesApplicationContext.java:100)
    at
org.apache.tiles.servlet.context.ServletTilesApplicationContext.getResources(ServletTilesApplicationContext.java:106)
    at
org.apache.tiles.extras.complete.CompleteAutoloadTilesContainerFactory.getSourceURLs(CompleteAutoloadTilesContainerFactory.java:233)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message