Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Maciej Opala
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also remove the servlet-api.jar file, you don't need that, JBoss AS provides it. Hopefully that will fix the error.
 
Maciej Opala
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely, JBoss AS 6 is already providing that functionality found in those JARs, whereas 4.2.3 didn't.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic