Thread: problem with the Tomcat

problem with the Tomcat

From
Tiago Leonardo Broilo
Date:
I have PostgreSQL 7.3,jdbc driver pg73jdbc2.jar
 (located in /usr/java/local/lib), J2SE 1.4.1 and jakarta-tomcat-4.1.18.
I'm using from a project.
I have a problem with the Tomcat, therefore any
application in servlet and jsp that I make it does not
find driver of the database and the one exception
that it appears is only this:
"Exception! java.lang.ClassNotFoundException: to org.postgresql.Driver at to org.apache.catalina.loader "
or Class.forName() throws ClassNotFoundException so you will need you catch and handle it.
Although to have made right everything that is necessary in the Tomcat when to the use of database.
 Since already I thank the aid of all.








Re: problem with the Tomcat

From
J M Okomba
Date:
The best place to place the driver is common/lib directory of tomcat or
WEB-INF/lib directory of your web application.

> -----Original Message-----
> From:    Tiago Leonardo Broilo [SMTP:broilo@em.pucrs.br]
> Sent:    04 February 2003 15:52
> To:    pgsql-jdbc@postgresql.org
> Subject:    [JDBC] problem with the Tomcat
>
> I have PostgreSQL 7.3,jdbc driver pg73jdbc2.jar
>  (located in /usr/java/local/lib), J2SE 1.4.1 and jakarta-tomcat-4.1.18.
> I'm using from a project.
> I have a problem with the Tomcat, therefore any
> application in servlet and jsp that I make it does not
> find driver of the database and the one exception
> that it appears is only this:
> "Exception! java.lang.ClassNotFoundException: to org.postgresql.Driver at
> to org.apache.catalina.loader "
> or Class.forName() throws ClassNotFoundException so you will need you
> catch and handle it.
> Although to have made right everything that is necessary in the Tomcat
> when to the use of database.
>  Since already I thank the aid of all.
>
>
>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

Re: problem with the Tomcat

From
Tiago Leonardo Broilo
Date:
But at the moment to install the Tomcat it already creates all the directories and places in this in case that jdbc2_0-stdext.jar in the directory/opt/jakarta-tomcat-4.1.18/common/lib and this driver to pg73jdbc2.jar (located in/usr/java/local/lib) is special for the use of data base with the Postgresql, that is used for any interface of local user (local computer) and in this case the data base is functioning 100%.

J M Okomba wrote:
The best place to place the driver is common/lib directory of tomcat or
WEB-INF/lib directory of your web application.

-----Original Message-----
From: Tiago Leonardo Broilo [SMTP:broilo@em.pucrs.br]
Sent: 04 February 2003 15:52
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] problem with the Tomcat

I have PostgreSQL 7.3,jdbc driver pg73jdbc2.jar
(located in /usr/java/local/lib), J2SE 1.4.1 and jakarta-tomcat-4.1.18.
I'm using from a project.
I have a problem with the Tomcat, therefore any
application in servlet and jsp that I make it does not
find driver of the database and the one exception
that it appears is only this:
"Exception! java.lang.ClassNotFoundException: to org.postgresql.Driver at
to org.apache.catalina.loader "
or Class.forName() throws ClassNotFoundException so you will need you
catch and handle it.
Although to have made right everything that is necessary in the Tomcat
when to the use of database.
Since already I thank the aid of all.








---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


-- 
--------------------------------------------------------------A/C Tiago Leonardo Broilo E-mail: broilo@em.pucrs.brPontifical Catholic University of Rio Grande do Sul - PUCRSDept. of Mechanical and Mechatronics Engineering - DEMAv. Ipiranga, 6681 - Prédio 30Prédio 30/Bloco 7CEP 90619-900 Porto Alegre/RSBrazilFone (51)3320-3500 ramal 4393http://www.em.pucrs.br/~labcim
----------------------------------------------------------------


Re: problem with the Tomcat

From
J M Okomba
Date:
If you want to use the driver universally the best place to put is
$JAVA_HOME/jre/lib/ext where $JAVA_HOME is where you have installed Java.

Alternatively put /usr/java/local/lib/pg73jdbc2.jar in your CLASSPATH,
something like

    CLASSPATH=$CLASSPATH:/usr/java/local/lib/pg73jdbc2.jar

Lastly you can tell tomcat to load your driver by adding it to TOMCAT_OPTS,
like
TOMCAT_OPTS=$TOMCAT_OPTS:/usr/java/local/lib/pg73jdbc2.jar
I am not very sure about the last option.

> -----Original Message-----
> From:    Tiago Leonardo Broilo [SMTP:broilo@em.pucrs.br]
> Sent:    04 February 2003 17:14
> To:    J M Okomba
> Cc:    pgsql-jdbc@postgresql.org
> Subject:    Re: [JDBC] problem with the Tomcat
>
> But at the moment to install the Tomcat it already creates all the
> directories and places in this in case that jdbc2_0-stdext.jar in the
> directory/opt/jakarta-tomcat-4.1.18/common/lib and this driver to
> pg73jdbc2.jar (located in/usr/java/local/lib) is special for the use of
> data base with the Postgresql, that is used for any interface of local
> user (local computer) and in this case the data base is functioning 100%.
>
> J M Okomba wrote:
>
>
>     The best place to place the driver is common/lib directory of tomcat
> or
>     WEB-INF/lib directory of your web application.
>
>
>         -----Original Message-----
>         From:    Tiago Leonardo Broilo [ SMTP:broilo@em.pucrs.br
> <mailto:SMTP:broilo@em.pucrs.br>]
>         Sent:    04 February 2003 15:52
>         To:     pgsql-jdbc@postgresql.org
> <mailto:pgsql-jdbc@postgresql.org>
>         Subject:    [JDBC] problem with the Tomcat
>
>         I have PostgreSQL 7.3,jdbc driver pg73jdbc2.jar
>          (located in /usr/java/local/lib), J2SE 1.4.1 and
> jakarta-tomcat-4.1.18.
>         I'm using from a project.
>         I have a problem with the Tomcat, therefore any
>         application in servlet and jsp that I make it does not
>         find driver of the database and the one exception
>         that it appears is only this:
>         "Exception! java.lang.ClassNotFoundException: to
> org.postgresql.Driver at
>         to org.apache.catalina.loader "
>         or Class.forName() throws ClassNotFoundException so you will
> need you
>         catch and handle it.
>         Although to have made right everything that is
>         necessary in the Tomcat
>         when to the use of database.
>          Since already I thank the aid of all.
>
>
>
>
>
>
>
>
>         ---------------------------(end of
> broadcast)---------------------------
>         TIP 5: Have you checked our extensive FAQ?
>
>         <http://www.postgresql.org/users-lounge/docs/faq.html>
>
>
>     ---------------------------(end of
> broadcast)---------------------------
>     TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org <mailto:majordomo@postgresql.org>
>
>
>
> --
> --------------------------------------------------------------
>  A/C Tiago Leonardo Broilo
>  E-mail:  broilo@em.pucrs.br <mailto:broilo@em.pucrs.br>
>  Pontifical Catholic University of Rio Grande do Sul - PUCRS
>  Dept. of Mechanical and Mechatronics Engineering - DEM
>  Av. Ipiranga, 6681 - Prédio 30
>  Prédio 30/Bloco 7
>  CEP 90619-900 Porto Alegre/RS
>  Brazil
>  Fone (51)3320-3500 ramal 4393
>   <http://www.em.pucrs.br/~labcim>
> ----------------------------------------------------------------
>
>