You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Andrew Jaquith (JIRA)" <ji...@apache.org> on 2007/12/18 07:22:43 UTC

[jira] Resolved: (JSPWIKI-92) web.xml seems to not work in Resin 3.0.18

     [ https://issues.apache.org/jira/browse/JSPWIKI-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Jaquith resolved JSPWIKI-92.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.6.0
         Assignee: Andrew Jaquith

Fixed in 2.6.0-RC3.

I took a look at this. I could not get my hands on 3.0.18; however, I have implemented a fix that works with 3.0.24. My advice to you: upgrade to a newer version of Resin. :)

As for the root cause, a little investigation surfaced three bugs:

1) web.xml's <description> and <display-name> elements were in the wrong order

2) An unneeded SAX parser feature was being set in WebContainerAuthorizer (what Janne noticed). I have removed that line.

and (most egregiously):

3)  TabTag overrode a superclass method, setId(), when it should not have. The result of this was to cause Resin's JSP compiler to barf.

Bugs like #3 make me crazy.

Anyway, TabTag's implementation has been "pulled up" to WikiTagBase, and it now delegates properly to the TagSupport superclass. In addition, as a bonus, by virtue of the method pull-up, all "id" attributes for custom JSPWiki tags are now immunized from cross-site scripting injection.

> web.xml seems to not work in Resin 3.0.18
> -----------------------------------------
>
>                 Key: JSPWIKI-92
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-92
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>         Environment: JSPWiki v2.5.162-cvs  and Resin 3.0.18 Windows 2003 server
>            Reporter: Brian Nettles
>            Assignee: Andrew Jaquith
>             Fix For: 2.6.0
>
>
> After modifying jspwiki.properties to use the windows file system, I start resin and the wiki will not start.
> At first I get an error because of the Description tag in the web.xml file.  The page displays as follows:
> WEB-INF/web.xml:9: <description> is an unexpected tag (parent <web-app>
> starts at 6). Check for duplicate and out-of-order tags.
> <web-app> syntax: (@id?, @version, @xsi:schemaLocation?,
>                    (<context-param>*
>                    & (<description>*, <display-name>?, <icon>?)
>                    & <distributable>?
>                    & (<env-entry>*, <ejb-ref>*, <ejb-local-ref>*, <service-ref>*, <resource-ref>*, <resource-env-ref>*, <message-destination-ref>*)
>                    & <error-page>*
>                    & <filter>*
>                    & <filter-mapping>*
>                    & <jsp-config>?
>                    & <listener>*
>                    & <locale-encoding-mapping-list>?
>                    & <login-config>?
>                    & <message-destination>*
>                    & <mime-mapping>*
>                    & <security-constraint>*
>                    & <security-role>*
>                    & <servlet>*
>                    & <servlet-mapping>*
>                    & <session-config>?
>                    & <welcome-file-list>?))
>  
> After removing the Description tag, I get the following in the browser:
> com.ecyrd.jspwiki.InternalWikiException: No wiki engine, check logs.
> 	at com.ecyrd.jspwiki.WikiEngine.getInstance(WikiEngine.java:340)
> 	at com.ecyrd.jspwiki.WikiEngine.getInstance(WikiEngine.java:280)
> 	at com.ecyrd.jspwiki.WikiServlet.init(WikiServlet.java:54)
> 	at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:600)
> 	at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
> 	at com.caucho.server.webapp.Application.start(Application.java:1604)
> 	at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
> 	at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
> 	at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
> 	at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:158)
> 	at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:652)
> 	at com.caucho.server.host.Host.start(Host.java:385)
> 	at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
> 	at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
> 	at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
> 	at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:158)
> 	at com.caucho.server.host.HostContainer.start(HostContainer.java:501)
> 	at com.caucho.server.resin.ServletServer.start(ServletServer.java:977)
> 	at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
> 	at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
> 	at com.caucho.server.deploy.DeployController.start(DeployController.java:517)
> 	at com.caucho.server.resin.ResinServer.start(ResinServer.java:485)
> 	at com.caucho.server.resin.Resin.init(Resin.java)
> 	at com.caucho.server.resin.Resin.main(Resin.java:624)
> Log shows this:
> 2007-12-04 16:01:25,884 [resin-282] INFO com.ecyrd.jspwiki.auth.AuthenticationManager  - JAAS already configured by some other application (leaving it alone...)
> 2007-12-04 16:01:25,900 [resin-282] INFO com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer  - Examining file:/C:/resin-pro-3.0.18/webapps/wiki/WEB-INF/web.xml
> 2007-12-04 16:01:25,900 [resin-282] ERROR com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer  - Malformed XML in web.xml
> org.jdom.JDOMException: http://apache.org/xml/features/validation/schema feature not supported for SAX driver com.caucho.xml.Xml
> 	at org.jdom.input.SAXBuilder.internalSetFeature(SAXBuilder.java:729)
> 	at org.jdom.input.SAXBuilder.setFeaturesAndProperties(SAXBuilder.java:671)
> 	at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:553)
> 	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:424)
> 	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:810)
> 	at com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer.getWebXml(WebContainerAuthorizer.java:390)
> 	at com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer.initialize(WebContainerAuthorizer.java:98)
> 	at com.ecyrd.jspwiki.auth.AuthorizationManager.initialize(AuthorizationManager.java:402)
> 	at com.ecyrd.jspwiki.WikiEngine.initialize(WikiEngine.java:532)
> 	at com.ecyrd.jspwiki.WikiEngine.<init>(WikiEngine.java:386)
> 	at com.ecyrd.jspwiki.WikiEngine.getInstance(WikiEngine.java:334)
> 	at com.ecyrd.jspwiki.WikiEngine.getInstance(WikiEngine.java:280)
> 	at com.ecyrd.jspwiki.WikiServlet.init(WikiServlet.java:54)
> 	at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:600)
> 	at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
> 	at com.caucho.server.webapp.Application.start(Application.java:1604)
> 	at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
> 	at com.caucho.server.deploy.DeployController.restartImpl(DeployController.java:584)
> 	at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.alarm(StartAutoRedeployAutoStrategy.java:176)
> 	at com.caucho.server.deploy.DeployController.handleAlarm(DeployController.java:742)
> 	at com.caucho.util.Alarm.handleAlarm(Alarm.java:350)
> 	at com.caucho.util.Alarm.run(Alarm.java:320)
> 	at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
> 	at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
> 	at java.lang.Thread.run(Thread.java:595)
> 2007-12-04 16:01:25,900 [resin-282] FATAL com.ecyrd.jspwiki.WikiEngine  - Failed to start managers.
> com.ecyrd.jspwiki.InternalWikiException: org.jdom.JDOMException: http://apache.org/xml/features/validation/schema feature not supported for SAX driver com.caucho.xml.Xml
> 	at com.ecyrd.jspwiki.auth.authorize.WebContainerAuthorizer.initialize(WebContainerAuthorizer.java:125)
> 	at com.ecyrd.jspwiki.auth.AuthorizationManager.initialize(AuthorizationManager.java:402)
> 	at com.ecyrd.jspwiki.WikiEngine.initialize(WikiEngine.java:532)
> 	at com.ecyrd.jspwiki.WikiEngine.<init>(WikiEngine.java:386)
> 	at com.ecyrd.jspwiki.WikiEngine.getInstance(WikiEngine.java:334)
> 	at com.ecyrd.jspwiki.WikiEngine.getInstance(WikiEngine.java:280)
> 	at com.ecyrd.jspwiki.WikiServlet.init(WikiServlet.java:54)
> 	at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:600)
> 	at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
> 	at com.caucho.server.webapp.Application.start(Application.java:1604)
> 	at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
> 	at com.caucho.server.deploy.DeployController.restartImpl(DeployController.java:584)
> 	at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.alarm(StartAutoRedeployAutoStrategy.java:176)
> 	at com.caucho.server.deploy.DeployController.handleAlarm(DeployController.java:742)
> 	at com.caucho.util.Alarm.handleAlarm(Alarm.java:350)
> 	at com.caucho.util.Alarm.run(Alarm.java:320)
> 	at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
> 	at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
> 	at java.lang.Thread.run(Thread.java:595)
> 2007-12-04 16:01:25,900 [JSPWiki Lucene Indexer] INFO com.ecyrd.jspwiki.search.LuceneSearchProvider  - Files found in Lucene directory, not reindexing.
> I suspect something not being compatible in Resin.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.