You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Jonnalagadda, Swathi (External)" <Sw...@xerox.com> on 2021/01/18 12:53:26 UTC

Jars in Tomcat lib directory

Hi 

Doesn’t tomcat consider jar files under lib directory in classpath. Do we have to do any additional configuration for that?


Thanks
Swathi

Re: Jars in Tomcat lib directory

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Mon, Jan 18, 2021 at 10:38 PM Jonnalagadda, Swathi (External) <
Swathi.Jonnalagadda@xerox.com> wrote:

> The application was an age old application and was built using ant which
> means all required jars will be packaged.
>
> As part of testing the application after upgrading to Java 1.8 and
> deployed in tomcat 9, I realized that couple of additional jars are
> required during runtime.
>
> I then added these jars to Tomcat lib directory and observed that it is
> not picking up these unless I add it to classpath
>

Classes in jar files in $CATALINA_BASE/lib are available for all web
applications!
How do you "add to the classpath" ? I have the feeling you do something in
your bin/setenv.sh that breaks the default configuration.


>
> Regards
> Swathi
>
> -----Original Message-----
> From: Mounika Reddy [mailto:spidermain12@gmail.com]
> Sent: Monday, January 18, 2021 11:49 PM
> To: Tomcat Users List
> Subject: Re: Jars in Tomcat lib directory
>
> CAUTION:   This email originated from outside the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
> It means your tomcat setup is screwed up. You can actually package in your
> application as a dependency and see if it picks up. If not, then post the
> logs here to understand what's going on
>
> On Mon, Jan 18, 2021, 1:09 PM Jonnalagadda, Swathi (External) <
> Swathi.Jonnalagadda@xerox.com> wrote:
>
> > I am not sure if I am missing some configuration setting but what I
> > see is unless I add externally added jars under tomcat/lib to
> > classpath I don’t see them considerd by Tomcat irrespective of wether
> they are needed or not.
> >
> > For example I added ojdbc14.jar to Tomcat lib directory assuming that
> > it will consider it in classpath but until I specified the path of the
> > jar in classpath, the server wasn’t considering the jar.
> >
> > Please advise.
> >
> > -----Original Message-----
> > From: Mounika Reddy [mailto:spidermain12@gmail.com]
> > Sent: Monday, January 18, 2021 6:32 PM
> > To: Tomcat Users List
> > Subject: Re: Jars in Tomcat lib directory
> >
> > CAUTION:   This email originated from outside the organization. Do not
> > click links or open attachments unless you recognize the sender and
> > know the content is safe.
> >
> > It will provided if your application requires.
> >
> > On Mon, Jan 18, 2021, 7:54 AM Jonnalagadda, Swathi (External) <
> > Swathi.Jonnalagadda@xerox.com> wrote:
> >
> > > Hi
> > >
> > > Doesn’t tomcat consider jar files under lib directory in classpath.
> > > Do we have to do any additional configuration for that?
> > >
> > >
> > > Thanks
> > > Swathi
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

Re: Jars in Tomcat lib directory

Posted by Mounika Reddy <sp...@gmail.com>.
If you need more jars, ideally you should fix the ant build to include
additional dependencies. Anyways, can you post the logs here ? It's
possible there may be a conflicts etc

On Mon, Jan 18, 2021, 3:38 PM Jonnalagadda, Swathi (External) <
Swathi.Jonnalagadda@xerox.com> wrote:

> The application was an age old application and was built using ant which
> means all required jars will be packaged.
>
> As part of testing the application after upgrading to Java 1.8 and
> deployed in tomcat 9, I realized that couple of additional jars are
> required during runtime.
>
> I then added these jars to Tomcat lib directory and observed that it is
> not picking up these unless I add it to classpath
>
> Regards
> Swathi
>
> -----Original Message-----
> From: Mounika Reddy [mailto:spidermain12@gmail.com]
> Sent: Monday, January 18, 2021 11:49 PM
> To: Tomcat Users List
> Subject: Re: Jars in Tomcat lib directory
>
> CAUTION:   This email originated from outside the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
> It means your tomcat setup is screwed up. You can actually package in your
> application as a dependency and see if it picks up. If not, then post the
> logs here to understand what's going on
>
> On Mon, Jan 18, 2021, 1:09 PM Jonnalagadda, Swathi (External) <
> Swathi.Jonnalagadda@xerox.com> wrote:
>
> > I am not sure if I am missing some configuration setting but what I
> > see is unless I add externally added jars under tomcat/lib to
> > classpath I don’t see them considerd by Tomcat irrespective of wether
> they are needed or not.
> >
> > For example I added ojdbc14.jar to Tomcat lib directory assuming that
> > it will consider it in classpath but until I specified the path of the
> > jar in classpath, the server wasn’t considering the jar.
> >
> > Please advise.
> >
> > -----Original Message-----
> > From: Mounika Reddy [mailto:spidermain12@gmail.com]
> > Sent: Monday, January 18, 2021 6:32 PM
> > To: Tomcat Users List
> > Subject: Re: Jars in Tomcat lib directory
> >
> > CAUTION:   This email originated from outside the organization. Do not
> > click links or open attachments unless you recognize the sender and
> > know the content is safe.
> >
> > It will provided if your application requires.
> >
> > On Mon, Jan 18, 2021, 7:54 AM Jonnalagadda, Swathi (External) <
> > Swathi.Jonnalagadda@xerox.com> wrote:
> >
> > > Hi
> > >
> > > Doesn’t tomcat consider jar files under lib directory in classpath.
> > > Do we have to do any additional configuration for that?
> > >
> > >
> > > Thanks
> > > Swathi
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

RE: Jars in Tomcat lib directory

Posted by "Jonnalagadda, Swathi (External)" <Sw...@xerox.com>.
The application was an age old application and was built using ant which means all required jars will be packaged. 

As part of testing the application after upgrading to Java 1.8 and deployed in tomcat 9, I realized that couple of additional jars are required during runtime.

I then added these jars to Tomcat lib directory and observed that it is not picking up these unless I add it to classpath

Regards
Swathi

-----Original Message-----
From: Mounika Reddy [mailto:spidermain12@gmail.com] 
Sent: Monday, January 18, 2021 11:49 PM
To: Tomcat Users List
Subject: Re: Jars in Tomcat lib directory

CAUTION:   This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

It means your tomcat setup is screwed up. You can actually package in your application as a dependency and see if it picks up. If not, then post the logs here to understand what's going on

On Mon, Jan 18, 2021, 1:09 PM Jonnalagadda, Swathi (External) < Swathi.Jonnalagadda@xerox.com> wrote:

> I am not sure if I am missing some configuration setting but what I 
> see is unless I add externally added jars under tomcat/lib to 
> classpath I don’t see them considerd by Tomcat irrespective of wether they are needed or not.
>
> For example I added ojdbc14.jar to Tomcat lib directory assuming that 
> it will consider it in classpath but until I specified the path of the 
> jar in classpath, the server wasn’t considering the jar.
>
> Please advise.
>
> -----Original Message-----
> From: Mounika Reddy [mailto:spidermain12@gmail.com]
> Sent: Monday, January 18, 2021 6:32 PM
> To: Tomcat Users List
> Subject: Re: Jars in Tomcat lib directory
>
> CAUTION:   This email originated from outside the organization. Do not
> click links or open attachments unless you recognize the sender and 
> know the content is safe.
>
> It will provided if your application requires.
>
> On Mon, Jan 18, 2021, 7:54 AM Jonnalagadda, Swathi (External) < 
> Swathi.Jonnalagadda@xerox.com> wrote:
>
> > Hi
> >
> > Doesn’t tomcat consider jar files under lib directory in classpath. 
> > Do we have to do any additional configuration for that?
> >
> >
> > Thanks
> > Swathi
> >
>

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


Re: Jars in Tomcat lib directory

Posted by Mounika Reddy <sp...@gmail.com>.
It means your tomcat setup is screwed up. You can actually package in your
application as a dependency and see if it picks up. If not, then post the
logs here to understand what's going on

On Mon, Jan 18, 2021, 1:09 PM Jonnalagadda, Swathi (External) <
Swathi.Jonnalagadda@xerox.com> wrote:

> I am not sure if I am missing some configuration setting but what I see is
> unless I add externally added jars under tomcat/lib to classpath I don’t
> see them considerd by Tomcat irrespective of wether they are needed or not.
>
> For example I added ojdbc14.jar to Tomcat lib directory assuming that it
> will consider it in classpath but until I specified the path of the jar in
> classpath, the server wasn’t considering the jar.
>
> Please advise.
>
> -----Original Message-----
> From: Mounika Reddy [mailto:spidermain12@gmail.com]
> Sent: Monday, January 18, 2021 6:32 PM
> To: Tomcat Users List
> Subject: Re: Jars in Tomcat lib directory
>
> CAUTION:   This email originated from outside the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
> It will provided if your application requires.
>
> On Mon, Jan 18, 2021, 7:54 AM Jonnalagadda, Swathi (External) <
> Swathi.Jonnalagadda@xerox.com> wrote:
>
> > Hi
> >
> > Doesn’t tomcat consider jar files under lib directory in classpath. Do
> > we have to do any additional configuration for that?
> >
> >
> > Thanks
> > Swathi
> >
>

RE: Jars in Tomcat lib directory

Posted by "Jonnalagadda, Swathi (External)" <Sw...@xerox.com>.
I am not sure if I am missing some configuration setting but what I see is unless I add externally added jars under tomcat/lib to classpath I don’t see them considerd by Tomcat irrespective of wether they are needed or not. 

For example I added ojdbc14.jar to Tomcat lib directory assuming that it will consider it in classpath but until I specified the path of the jar in classpath, the server wasn’t considering the jar. 

Please advise.

-----Original Message-----
From: Mounika Reddy [mailto:spidermain12@gmail.com] 
Sent: Monday, January 18, 2021 6:32 PM
To: Tomcat Users List
Subject: Re: Jars in Tomcat lib directory

CAUTION:   This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

It will provided if your application requires.

On Mon, Jan 18, 2021, 7:54 AM Jonnalagadda, Swathi (External) < Swathi.Jonnalagadda@xerox.com> wrote:

> Hi
>
> Doesn’t tomcat consider jar files under lib directory in classpath. Do 
> we have to do any additional configuration for that?
>
>
> Thanks
> Swathi
>

Re: Jars in Tomcat lib directory

Posted by Mounika Reddy <sp...@gmail.com>.
It will provided if your application requires.

On Mon, Jan 18, 2021, 7:54 AM Jonnalagadda, Swathi (External) <
Swathi.Jonnalagadda@xerox.com> wrote:

> Hi
>
> Doesn’t tomcat consider jar files under lib directory in classpath. Do we
> have to do any additional configuration for that?
>
>
> Thanks
> Swathi
>