I'm struck with a problem in jboss. When I try to deploy my .war into the server, I get this following error,
from which, it is quite evident that there is a clash of libraries. So, I removed the jar file which contains xerces, which happened to by jaxp-ri-1.4.1.jar. Now, when I try to re-deploy, I get this new error,
where it is complaining that it can't find the xml parsers.
So, now my questions is that does anybody know what can be a solution. Any jaxp jar file that doesn't contain the xerces package?
Oops, my bad. I should've mentioned it. Its Jboss 4.2.3 GA
Joined: Jun 05, 2010
In the meanwhile, what I thought was, there was problem casting SaxParserFactoryImpl to an instance of SaxParserFactory. So, I thought may be there are two versions of SaxParserFactory and so I looked up the jars having this class. And it turned out to be jaxp-api.jar. I removed both of them and try to deploy again, but then I got this error,
Its strange in a way, because jaxp is not at all needed as all classes needed for xml parsing are already included in jre. Maven, which I use to build my project, somehow includes them. And I can't get away without them
Is this com.mondeca.itm.ws.endpoint.ConnectionDOMEndPoint your application's class? If yes, can you post the code that's present in its com.mondeca.itm.ws.endpoint.ConnectionDOMEndPoint.invokeInternal method?
Joined: Jun 05, 2010
Hi, yes that our class. This is the entry point for webservices(war) into the ear. This class gets the session id for other webservices to use.
Here is the code
We used spring-ws framework to build the webservices.
I still have problem. Here is the stack trace of the new exception. Interestingly, when I try to connect for the first time, I get the error I posted above, stating that I get it when I deploy after deleting jaxp-ri and jaxp-api jars. I get the same error. But when I repeatedly try to connect, I get this new error,
This is only putting me further down the confusion lane.
I managed to solve it, but as far as I understood it was not a one-stop solution. It was a workaround because it was a known bug in jboss and I guess its not fixed till 6.0.2 release(this is not a stable release). This occurs if your application uses xml parsers. So, in this case, you need to do the proper class loading isolation.
In my case we were trying to do class loading isolation and it was not being done properly and hence there's a conflict b'n application libraries and jboss libraries. So, we had two options, completely remove the isolation or do global isolation.
PS 1: You may need to change your class loading isolation configuration in jboss-web.xml if you are using jboss 4.2.3 (refer to the above doc)
PS 2: Doing global class loading isolation by changing ear-deployer.xml file may effect the performance of the server, because now all the EJB calls are serialized!
Joined: Jun 29, 2002
for migrating to jboss-5.1.0 to remove this error: