You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Neha Munjal <ne...@gmail.com> on 2014/02/27 12:36:29 UTC

Issue while deploying a war file using Tomcat 7.0.52

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

Re: Issue while deploying a war file using Tomcat 7.0.52

Posted by Neha Munjal <ne...@gmail.com>.
Hi Konstanti,

In my opinion, The Bootstrap classloader should be effective and since the
jar is present there, it should consider it and not throw this exception.

Thanks
Neha


On Thu, Feb 27, 2014 at 5:26 PM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2014-02-27 15:36 GMT+04:00 Neha Munjal <ne...@gmail.com>:
> > 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.
> >
>
> So, of the two copies of "jms-api.jar" what are your expectations on
> which one will be effective?
>
> Also,
> https://issues.apache.org/bugzilla/show_bug.cgi?id=56180#c2
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Issue while deploying a war file using Tomcat 7.0.52

Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-02-27 15:36 GMT+04:00 Neha Munjal <ne...@gmail.com>:
> 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.
>

So, of the two copies of "jms-api.jar" what are your expectations on
which one will be effective?

Also,
https://issues.apache.org/bugzilla/show_bug.cgi?id=56180#c2

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org