struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Pyeron" <jpye...@pdinc.us>
Subject RE: [struts-user] XML based configuration
Date Thu, 31 Jan 2019 02:53:16 GMT


> -----Original Message-----
> From: Jason Pyeron <jpyeron@pdinc.us>
> Sent: Wednesday, January 30, 2019 9:11 PM
> To: 'Struts Users Mailing List' <user@struts.apache.org>
> Subject: [struts-user] XML based configuration
> 
> It has been 10+ years since I used the XML configuration, so please bear
> with me.
> 
> I am attempting to deploy Apache Roller under a sub context
> (public#roller.war) so the url would be
> http://127.0.0.1:8080/public/roller/roller-ui/login.rol .
> 
> When I do so, I get an exception cannot find definition named .Login
> 
> <struts>
>     <package name="weblogger" namespace="/roller-ui"
> extends="struts-default">
>         <action name="login"
>                 class="org.apache.roller.weblogger.ui.struts2.core.Login">
>             <result type="tiles">.Login</result>
>         </action>
> 
> 
> 18:58:52.383 [http-bio-8092-exec-3] WARN
> org.apache.struts2.views.tiles.TilesResult - could not find @TilesDefinition
> for action: login
> org.apache.tiles.definition.NoSuchDefinitionException: Cannot find
> definition named '.Login'
>         at
> org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContaine
> r.java:123)
>         at
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161)
>         at
> org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.ja
> va:208)

Tracking this down further, it seems it could be related to https://issues.apache.org/jira/browse/WW-4624
.

It seems that tiles.xml is not found once I change the context path to have a / in it. I tested
by making the tiles.xml contain invalid XML content, and no errors were found. Once I moved
the context path back to /roller/ from /public/roller/ it found the XML errors.

21:36:30.902 [http-bio-8092-exec-1] WARN  org.apache.struts2.views.tiles.TilesResult - got
TilesException while checking if definiton exists, ignoring it
org.apache.tiles.definition.DefinitionsFactoryException: XML error reading definitions.
        at org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:328)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.loadDefinitionsFromResource(BaseLocaleUrlDefinitionDAO.java:150)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:239)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:230)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:230)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:208)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:197)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitions(ResolvingLocaleUrlDefinitionDAO.java:68)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.checkAndloadDefinitions(CachingLocaleUrlDefinitionDAO.java:179)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:131)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:105)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:49)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:89)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:286)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.impl.BasicTilesContainer.isValidDefinition(BasicTilesContainer.java:273)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.tiles.TilesContainerWrapper.isValidDefinition(TilesContainerWrapper.java:88)
~[tiles-api-3.0.7.jar:3.0.7]
        at org.apache.tiles.impl.mgmt.CachingTilesContainer.isValidDefinition(CachingTilesContainer.java:100)
~[tiles-core-3.0.7.jar:3.0.7]
        at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:136) [struts2-tiles-plugin-2.5.17.jar:2.5.17]
        at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:206)
[struts2-core-2.5.17.jar:2.5.17]
        at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:375)
[struts2-core-2.5.17.jar:2.5.17]
...
Caused by: org.xml.sax.SAXParseException: The entity name must immediately follow the '&'
in the entity reference.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown
Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ~[xercesImpl-2.10.0.jar:?]
        at org.apache.commons.digester.Digester.parse(Digester.java:1788) ~[commons-digester-1.8.1.jar:1.8.1]
        at org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:325)
~[tiles-core-3.0.7.jar:3.0.7]
        ... 162 more




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message