Hi,
You can't have the j2ee.jar as-is on the tomcat classpath: it's that
simple.  You have to hack out a ton of things, including the servlet,
JSP, and XML parsing APIs.  Obviously this is a kludge.

The right way to do this is to add two jars to your webapp's WEB-INF/lib
(assuming you're coding the JMS connection yourself): jms.jar (the API
definition, downloadable from java.sun.com) and the JMS client jar (and
dependent jars if any) for your JMS server.

For example, if your webapp wants to connect to a remote OpenJMS server
(an excellent product!), you get jms.jar, openjms-client-[version].jar,
and exolab-core-[version] (a dependency of openjms-client), and you're
all set.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Larry Isaacs [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 18, 2004 7:50 AM
>To: Tomcat Users List
>Subject: RE: Problem using JMS with Tomcat
>
>If you want to use JMS, add a jar that just contains JMS classes.
>Don't assume you can add any jar you want without side effects.
>If you look inside j2ee.jar, you will find a ton of additional
>classes besides those for JMS.  Among them you will find an
>older version of Tomcat which, not unexpectedly, corrupts your
>Tomcat installation when you add it to common\lib.
>
>Cheers,
>Larry
>
>> -----Original Message-----
>> From: Kawthar Bt M Sulaiman [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, May 18, 2004 4:47 AM
>> To: [EMAIL PROTECTED]
>> Subject: Problem using JMS with Tomcat
>>
>>
>>
>> Hello,
>>
>> I'm trying to use Sun Messaging Queue.  I use javax.jms package in
>> my code.  I got the j2ee.jar file and put under tomcat common\lib
>> but this causes a conflict.. my tomcat won't start.  If I don't put
>> the
>> jar file there, tomcat starts without any problem.  However, my code
>> won't run because cannot find javax.jms classes.
>>
>> Please advise how I can use javax.jms packages with tomcat.
>>
>> Thanks,
>> --Kawthar
>>
>> Confidential information may be contained in this e-mail and
>> any files transmitted with it ('Message'). If you are not the
>> addressee indicated in this Message (or responsible for
>> delivery of this Message to such person), you are hereby
>> notified that any dissemination, distribution, printing or
>> copying of this Message or any part thereof is strictly
>> prohibited. In such a case, you should delete this Message
>> immediately and advise the sender by return e-mail. Opinions,
>> conclusions and other information in this Message that do not
>> relate to the official business of Maxis shall be understood
>> as neither given nor endorsed by Maxis.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to