Jars in Tomcat lib directory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Jars in Tomcat lib directory

Jonnalagadda, Swathi (External)
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: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jars in Tomcat lib directory

Mounika Reddy
It will provided if your application requires.

On Mon, Jan 18, 2021, 7:54 AM Jonnalagadda, Swathi (External) <
[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

RE: Jars in Tomcat lib directory

Jonnalagadda, Swathi (External)
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:[hidden email]]
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) < [hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jars in Tomcat lib directory

Mounika Reddy
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) <
[hidden email]> 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:[hidden email]]
> 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) <
> [hidden email]> 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
> >
>
Reply | Threaded
Open this post in threaded view
|

RE: Jars in Tomcat lib directory

Jonnalagadda, Swathi (External)
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:[hidden email]]
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) < [hidden email]> 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:[hidden email]]
> 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) <
> [hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jars in Tomcat lib directory

Mounika Reddy
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) <
[hidden email]> 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:[hidden email]]
> 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) <
> [hidden email]> 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:[hidden email]]
> > 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) <
> > [hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: Jars in Tomcat lib directory

Martin Grigorov
In reply to this post by Jonnalagadda, Swathi (External)
Hi,

On Mon, Jan 18, 2021 at 10:38 PM Jonnalagadda, Swathi (External) <
[hidden email]> 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:[hidden email]]
> 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) <
> [hidden email]> 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:[hidden email]]
> > 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) <
> > [hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>