NullPointerException while parsing page spec. ---------------------------------------------
Key: TAPESTRY-560 URL: http://issues.apache.org/jira/browse/TAPESTRY-560 Project: Tapestry Type: Bug Components: Framework Versions: 4.0 Environment: winxp, Java5, Jboss 4.0.2/Tomcat Reporter: Koen Serry Priority: Critical stacktrace * org.apache.tapestry.util.xml.DocumentParseException.<init>(DocumentParseException.java:45) * org.apache.tapestry.parse.SpecificationParser.parseDocument(SpecificationParser.java:1676) * org.apache.tapestry.parse.SpecificationParser.parsePageSpecification(SpecificationParser.java:1736 Looking at the code (and running it through the debugger), I found out that the url was null even though the resouce is not. URL resourceURL = resource.getResourceURL(); if (resourceURL == null) throw new DocumentParseException(ParseMessages.missingResource(resource), resource,null); I'm using Tap 4.0, my application file contains the following : <page name="Home" specification-path="/test/web/pages/Home.page"/> and the Home.page looks like <?xml version="1.0"?> <!DOCTYPE page-specification PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN" "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> <page-specification class="org.apache.tapestry.html.BasePage"/> the problem is . according to the DTD the specification-path attribute in the page element is the "resource classpath". So this should be something like /my/package/name, alas the ContextResource class of Hivemind obtains the URL of the Resource via the ServletContext, which is NOT by classpath but by path in the servletcontext so like /WEB-INF/classes/my/package/name. Prefixing it with classpath or context don't seem to work. <!-- ======================================================= Element: page Contained by: application, library-specification Defines a single page within the application. Each application will contain at least one of these, to define the Home page. Attributes: name: A unique name for the application. specification-path: The resource classpath of the component specification for the page. --> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]