Mantis - Resin
Viewing Issue Advanced Details
2384 major always 01-30-08 03:11 02-10-08 19:08
hifish  
ferg  
normal  
closed 3.1.4  
fixed  
none    
none 3.1.5  
0002384: web.xml parser doesn't strip line-breaks in param-values
first I thought i had a classloader problem, but it is just a reproducable xml-parser bug...

WORKING EXAMPLE:
========
<filter>
<filter-name>wicket.mdb-war-wicket</filter-name>
<filter-class>
   org.apache.wicket.protocol.http.WicketFilter
</filter-class>
<init-param>
<param-name>applicationFactoryClassName</param-name>
<param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
</init-param>
</filter>

NON-WORKING EXAMPLE:
========
<filter>
<filter-name>wicket.mdb-war-wicket</filter-name>
<filter-class>
   org.apache.wicket.protocol.http.WicketFilter
</filter-class>
<init-param>
<param-name>applicationFactoryClassName</param-name>
<param-value>
   org.apache.wicket.spring.SpringWebApplicationFactory
</param-value>
</init-param>
</filter>

(note the formatting/indent of the <param-value> element!)

the param-name element seems to strip the linebreaks, param-value not.
[11:36:53.133] {main} javax.servlet.ServletException: org.apache.wicket.protocol.http.WebApplicationFactoryCreationException: Unable to create application factory of class
[11:36:53.133] {main} org.apache.wicket.spring.SpringWebApplicationFactory
[11:36:53.133] {main}
[11:36:53.133] {main} at com.caucho.server.dispatch.FilterManager.createFilter(FilterManager.java:168)
[11:36:53.133] {main} at com.caucho.server.dispatch.FilterManager.init(FilterManager.java:87)
[11:36:53.133] {main} at com.caucho.server.webapp.WebApp.start(WebApp.java:1817)
[11:36:53.133] {main} at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:646)
[11:36:53.133] {main} at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[11:36:53.133] {main} at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:528)
[11:36:53.133] {main} at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:163)
[11:36:53.133] {main} at com.caucho.server.webapp.WebAppContainer.start(WebAppContainer.java:675)
[11:36:53.133] {main} at com.caucho.server.host.Host.start(Host.java:437)
[11:36:53.133] {main} at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:646)
[11:36:53.133] {main} at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[11:36:53.133] {main} at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:528)
[11:36:53.133] {main} at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:163)
[11:36:53.133] {main} at com.caucho.server.host.HostContainer.start(HostContainer.java:479)
[11:36:53.133] {main} at com.caucho.server.cluster.Server.start(Server.java:1171)
[11:36:53.133] {main} at com.caucho.server.cluster.Cluster.startServer(Cluster.java:708)
[11:36:53.133] {main} at com.caucho.server.cluster.ClusterServer.startServer(ClusterServer.java:522)
[11:36:53.133] {main} at com.caucho.server.resin.Resin.start(Resin.java:692)
[11:36:53.133] {main} at com.caucho.server.resin.Resin.initMain(Resin.java:1113)
[11:36:53.133] {main} at com.caucho.server.resin.Resin.main(Resin.java:1314)
[11:36:53.133] {main} Caused by: org.apache.wicket.protocol.http.WebApplicationFactoryCreationException: Unable to create application factory of class
[11:36:53.133] {main} org.apache.wicket.spring.SpringWebApplicationFactory
[11:36:53.133] {main}
[11:36:53.133] {main} at org.apache.wicket.protocol.http.WicketFilter.getApplicationFactory(WicketFilter.java:804)
[11:36:53.133] {main} at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:493)
[11:36:53.133] {main} at com.caucho.server.dispatch.FilterManager.createFilter(FilterManager.java:138)
[11:36:53.133] {main} ... 19 more
[11:36:53.133] {main} Caused by: java.lang.ClassNotFoundException:
[11:36:53.133] {main} org.apache.wicket.spring.SpringWebApplicationFactory
[11:36:53.133] {main} in EnvironmentClassLoader$12082199[web-app:http://localhost:8080/medienkatalog-0.0.1-de] [^]
[11:36:53.133] {main} at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1169)
[11:36:53.133] {main} at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1149)
[11:36:53.133] {main} at org.apache.wicket.protocol.http.WicketFilter.getApplicationFactory(WicketFilter.java:790)
[11:36:53.133] {main} ... 21 more

Notes
(0002700)
hifish   
01-30-08 05:56   
FYI:
i tried also:
<system-property javax.xml.parsers.DocumentBuilderFactory="com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>
<system-property javax.xml.parsers.SAXParserFactory="com.caucho.xml.parsers.XmlSAXParserFactory"/>

but it didnt help

(0002744)
ferg   
02-10-08 18:59   
server/2384
(0002745)
ferg   
02-10-08 19:08   
Also, see http://wiki.caucho.com/Wicket [^] for Wicket integration information and http://wiki.caucho.com/Spring [^] for Spring integration.