Mantis - Resin
Viewing Issue Advanced Details
993 minor always 03-15-06 06:16 03-27-06 13:45
jrg745  
ferg  
normal  
closed 3.0.18  
fixed  
none    
none 3.0.19  
0000993: Namespace declaration not resolved correctly
The following is a excerpt from our resin.conf:

    <host-default>
      <web-app-deploy path="D:/Projects/webapps"/>
    </host-default>

    <host id="" root-directory="D:/Projects">
       <web-app id='/' document-directory='webapps/myapp'>

    ...
    </host>

In our jspx file we use a namespace declaration

xmlns:pf="http://www.ecofin.com/xxx" [^]

and an XML element <pf:username> which is interpreted by our XSLT transformation. It is not a tag name. This leads to a java RuntimeException with the message "bad scheme in http:". If we use a context other than /, for example /test, the message disappears.
When resin processes the pf:username element, the TagFileManager tries to load a tag "username" at location http://www.ecofin.com/xxx [^] (line 107). This path is interpreted as a file path in the context / thus becoming /http://www.ecofin.com/xxx/username.tag [^] in Application.getRealPath (line 2082). The WebAppExpandDeployGenerator then tries to load the tag from an archive /http:.war or a directory http: (line 265). This finally leads to an RuntimeException in HttpPath.schemeWalk at line 155 with the message "bad scheme in http:".


I think this is an error, because resin should not try to resolve the namespace prefix or it should find out that http: is not a directory.

This is the relevant stack trace:

[14:15:09.953] java.lang.RuntimeException: bad scheme in `http:'
[14:15:09.953] at com.caucho.vfs.HttpPath.schemeWalk(HttpPath.java:155)
[14:15:09.953] at com.caucho.vfs.Path.lookupImpl(Path.java:177)
[14:15:09.953] at com.caucho.vfs.Path.lookup(Path.java:121)
[14:15:09.953] at com.caucho.vfs.Path.lookup(Path.java:90)
[14:15:09.953] at com.caucho.server.webapp.WebAppExpandDeployGenerator.createController(WebAppExpandDeployGenerator.java:265)
[14:15:09.953] at com.caucho.server.webapp.WebAppExpandDeployGenerator.createController(WebAppExpandDeployGenerator.java:65)
[14:15:09.953] at com.caucho.server.deploy.ExpandDeployGenerator.generateController(ExpandDeployGenerator.java:462)
[14:15:09.953] at com.caucho.server.deploy.ExpandDeployGenerator.generateController(ExpandDeployGenerator.java:65)
[14:15:09.953] at com.caucho.server.deploy.DeployListGenerator.generateController(DeployListGenerator.java:137)
[14:15:09.953] at com.caucho.server.deploy.DeployContainer.generateController(DeployContainer.java:305)
[14:15:09.953] at com.caucho.server.deploy.DeployContainer.findController(DeployContainer.java:172)
[14:15:09.953] at com.caucho.server.webapp.ApplicationContainer.findByURIImpl(ApplicationContainer.java:961)
[14:15:09.953] at com.caucho.server.webapp.ApplicationContainer.findByURIImpl(ApplicationContainer.java:972)
[14:15:09.953] at com.caucho.server.webapp.ApplicationContainer.findByURIImpl(ApplicationContainer.java:972)
[14:15:09.953] at com.caucho.server.webapp.ApplicationContainer.findByURIImpl(ApplicationContainer.java:972)
[14:15:09.953] at com.caucho.server.webapp.ApplicationContainer.findByURIImpl(ApplicationContainer.java:972)
[14:15:09.953] at com.caucho.server.webapp.ApplicationContainer.findByURI(ApplicationContainer.java:947)
[14:15:09.953] at com.caucho.server.webapp.ApplicationContainer.findSubApplicationByURI(ApplicationContainer.java:931)
[14:15:09.953] at com.caucho.server.webapp.Application.getContext(Application.java:1692)
[14:15:09.953] at com.caucho.server.webapp.Application.getRealPath(Application.java:2090)
[14:15:09.953] at com.caucho.jsp.AppResourceManager.resolvePath(AppResourceManager.java:56)
[14:15:09.953] at com.caucho.jsp.TagFileManager.getTag(TagFileManager.java:107)
[14:15:09.953] at com.caucho.jsp.TagFileManager.getTag(TagFileManager.java:82)
[14:15:09.953] at com.caucho.jsp.ParseTagManager.getTagImpl(ParseTagManager.java:105)
[14:15:09.953] at com.caucho.jsp.ParseTagManager.getTag(ParseTagManager.java:86)
[14:15:09.953] at com.caucho.jsp.java.JavaJspGenerator.getTag(JavaJspGenerator.java:1769)
[14:15:09.953] at com.caucho.jsp.java.JavaJspBuilder.startElement(JavaJspBuilder.java)
[14:15:09.953] at

Notes
(0000948)
ferg   
03-27-06 13:45   
jsp/031g (only visible with logging enabled)