IntelliJ Java IDE
The moose likes JBoss and the fly likes JBoss 6.1.0 - java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory cannot be cast to jav Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » JBoss
Reply Bookmark "JBoss 6.1.0 - java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory cannot be cast to jav" Watch "JBoss 6.1.0 - java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory cannot be cast to jav" New topic
Author

JBoss 6.1.0 - java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory cannot be cast to jav

Maciej Opala
Greenhorn

Joined: Jul 18, 2011
Posts: 23
Hi,

When I deploy in JBoss 6.1.0 my web application packed in an ear archive I obtain the following error in logs:


I do some xml processing just after the context of application gets initialized. I guess that this error has something in common with the content of WEB-INF/lib directory of the ear which is:

I was trying removing both stax-api-1.0.1.jar and geronimo-stax-api_1.0_spec-1.0.jar but then new exception occurred:

Really no idea what to do. Any help would be greatly appreciated..
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 4875

Also remove the servlet-api.jar file, you don't need that, JBoss AS provides it. Hopefully that will fix the error.


JBoss In Action
Maciej Opala
Greenhorn

Joined: Jul 18, 2011
Posts: 23
I've removed the following libs:

which solved the problem finally. It seems strange because same war with mentioned libs was deployed well on JBoss 4.2.3GA. Any explanation? I agree with servlet api, will also remove it.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 4875

Most likely, JBoss AS 6 is already providing that functionality found in those JARs, whereas 4.2.3 didn't.
 
jQuery in Action, 2nd edition
 
subject: JBoss 6.1.0 - java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory cannot be cast to jav
 
Threads others viewed
Tomcat and Axis2
OpenEJB + JUnit + Ant
Java API for MS Excel 2010
How to copy generated wsdl file to WAR file?
Help! Wsdl2Java Can't parse a Coldfusion WSDL?
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture