Hi All,

I am using Tomcat7.0.52 on Windows 7 64 Bit.

The issue I am facing is that when I try to deploy a war file, I receive
the following exception:
*Caused by: java.lang.ClassCastException:
org.hornetq.jms.client.HornetQJMSConnectionFactory cannot be cast to
javax.jms.ConnectionFactory*

The set up is as follows:

We have an implementation of HornetQServer that basically starts up some
JMS threads for application specific tasks. The client side implementation
has a class org.hornetq.jms.client.HornetQJMSConnectionFactory that
implements the interface javax.jms.ConnectionFactory. (jms-api.jar).


As part of our customized ant target that we run to start the Tomcat, we
have set the classpath that points to the location where we have
jms-api.jar, which implies that these would be taken care of by the
Bootstrap Loader.
Additionally, we have added a location to common.loader setting in
catalina.properties that contains some HornetQspecific jars that should be
available to all deployables of our application.
These would be taken care of by Common classloader.

At the same time, we have jms-api.jar file in the /WEB-INF/lib directory of
our deployable as well.

Now when we deploy this war file, we get the above mentioned exception.

I tried the same set up on Tomcat7.0.50 as well and there, no such
exception is encountered.

I would like to know the probable cause of this issue and why this is
working fine on Tomcat7.0.50 and not 7.0.52. Any feedback wold be greatly
appreciated.

Thanks

Reply via email to