AS 7.0.10.Final... java.lang.ClassCastException: __redirected.__SAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory
naeem.ally Feb 29, 2012 11:34 AMI get the error java.lang.ClassCastException: __redirected.__SAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory when my page is loading.
This is the modules/org/apache/tiles/main/module.xml
{code:xml}
<module xmlns="urn:jboss:module:1.1" name="org.apache.tiles">
<resources>
<resource-root path="tiles-api-2.2.2.jar"/>
<resource-root path="tiles-core-2.2.2.jar"/>
<resource-root path="tiles-jsp-2.2.2.jar"/>
<resource-root path="tiles-servlet-2.2.2.jar"/>
<resource-root path="tiles-template-2.2.2.jar"/>
<resource-root path="commons-digester-2.0.jar"/>
</resources>
<dependencies>
<module name="org.slf4j"/>
<module name="org.apache.commons.logging"/>
<module name="org.apache.commons.beanutils"/>
<module name="org.slf4j.jcl-over-slf4j"/>
<module name="javax.servlet.api"/>
<module name="javax.xml.parsers"/>
</dependencies>
</module>
{code}
and i created a modules/javax/xml/parsers/main/module.xml
{code:xml}
<module xmlns="urn:jboss:module:1.1" name="javax.xml.parsers">
<resources>
<resource-root path="xml-apis-1.0.b2.jar"/>
</resources>
<dependencies>
<module name="javax.xml.parsers"/>
</dependencies>
</module>
{code}
Part of my error log
{quote}
18:14:00,710 ERROR [org.apache.commons.digester.Digester] (http--0.0.0.0-8080-4) Digester.getParser: : java.lang.ClassCastException: __redirected.__SAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) [rt.jar:1.6.0_29]
at org.apache.commons.digester.Digester.getFactory(Digester.java:532)
at org.apache.commons.digester.Digester.getParser(Digester.java:786)
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058)
at org.apache.commons.digester.Digester.parse(Digester.java:1887)
at org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:329)
at org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL(BaseLocaleUrlDefinitionDAO.java:276)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:251)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:58)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:239)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:58)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:239)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:222)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.checkAndloadDefinitions(CachingLocaleUrlDefinitionDAO.java:204)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:154)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:123)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:54)
at org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:105)
at org.springframework.web.servlet.view.tiles2.TilesView.checkResource(TilesView.java:92) [spring-webmvc.jar:3.0.6.RELEASE]
at org.springframework.web.servlet.view.UrlBasedViewResolver.loadView(UrlBasedViewResolver.java:421) [spring-webmvc.jar:3.0.6.RELEASE]
{quote}
I've added javax.xml.parsers to the MANIFEST and to the jboss-deployment-structure.xml
Thread {thread:id=719288} seems like a similar problem but no resolutions found there either.