You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bikash Paul <bi...@yahoo.com> on 2004/03/04 10:25:09 UTC

Driver class not found

Hi,

Iam using Tomcat5.0 and iam trying to connect oracle8i
Data base through Datasource and I have created one
Datasource using administrator tool of Tomcat using
oracle driver and I have kept my driver classes12.jar
file in common\lib folder and also in server\lib
folder but still it giving me error that
"java.lang.ClassNotFoundException
:oracle.jdbc.driver.OracleDriver".Can any one please
tell me is there any class path setting require for
that if it is require then in which file.Eagerly
waiting for reply.

Thanks & Regards
Bikash

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com

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


RE: customized error page

Posted by Mathew <ma...@punnachalil.com>.
I am still trying to fix error page problem. This is my server.xml

<Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
         <Context path="/myapp" docBase="myapp"
              debug="0" crossContext="true"  reloadable="true">
           <Resource name="jdbc/myoracle" auth="Container"
                 type="javax.sql.DataSource"/>
               .......
               .......
         </Context>
</Host>

I have a directory "$TOMCAT_HOME/webbapps/myapp" in my system. I created
"error/404.html"  in   $TOMCAT_HOME/webbapps/myapp.  But I am not able to
see 404.html if get 404 error, but I get page not found.



> It should he under your  root directory of the application or the
> directory in which your web-inf is present. Say c:\app\root\error
>
> Software Engineer
> Adamshand Inc
> www.interviewexchange.com
>
>
> -----Original Message-----
> From: Mathew [mailto:mathew@punnachalil.com]
> Sent: Thursday, March 04, 2004 10:31 AM
> To: Tomcat Users List
> Subject: customized error page
>
>
> I have following code in my web.xml to redirect when ever I get 404
> error.
> But I don't know where I have to create error folder (relative path) and
> put 404.html. Is it under /WEB-INF of application ?
>
> <error-page>
>       <error-code>404</error-code>
>       <location>/error/404.html</location>
> </error-page>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>


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


RE: customized error page

Posted by shyam <sh...@interviewexchange.com>.
It should he under your  root directory of the application or the
directory in which your web-inf is present. Say c:\app\root\error

Software Engineer
Adamshand Inc
www.interviewexchange.com


-----Original Message-----
From: Mathew [mailto:mathew@punnachalil.com] 
Sent: Thursday, March 04, 2004 10:31 AM
To: Tomcat Users List
Subject: customized error page


I have following code in my web.xml to redirect when ever I get 404
error.
But I don't know where I have to create error folder (relative path) and
put 404.html. Is it under /WEB-INF of application ?

<error-page>
      <error-code>404</error-code>
      <location>/error/404.html</location>
</error-page>




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




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


customized error page

Posted by Mathew <ma...@punnachalil.com>.
I have following code in my web.xml to redirect when ever I get 404 error.
But I don't know where I have to create error folder (relative path) and
put 404.html. Is it under /WEB-INF of application ?

<error-page>
      <error-code>404</error-code>
      <location>/error/404.html</location>
</error-page>




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


Re: Driver class not found

Posted by Harry Mantheakis <ha...@mantheakis.freeserve.co.uk>.
> If you name it *.zip, it will definitely NOT be found in common/lib,
> shared/lib, or anywhere else. Tomcat only loads *.jar files.

Yes, you are right (!) I'm sorry, but my memory let me down there: it used
to be that Oracle supplied its driver as a '.zip' file and you simply had to
re-name the file to '.jar'.

I really slipped out of gear there :-)

Harry


> If you name it *.zip, it will definitely NOT be found in common/lib,
> shared/lib, or anywhere else. Tomcat only loads *.jar files.
> 
>> For some strange reason
> 
> It's not strange if you're trying to make a container configured
> DataSource. 
> 
>> -----Original Message-----
>> From: Harry Mantheakis [mailto:harry@mantheakis.freeserve.co.uk]
>> Sent: Thursday, March 04, 2004 8:05 AM
>> To: Tomcat Users List
>> Subject: Re: Driver class not found
>> 
>> 
>> Hello
>> 
>>> After adding class12.jar in setclasspath.bat file I am
>> 
>> I would undo that - that should not be necessary.
>> 
>> Try re-naming 'Clasess12.jar' to 'Clasess12.zip' and place
>> the 'zip'  file in the $CATALINA_HOME/common/lib directory.
>> 
>> Make sure you do NOT have another copy of this 'zip' file (at
>> the same time) in your application's WEB-INF/lib directory.
>> 
>> For some strange reason I found that with the Oracle drivers
>> I HAD to keep them in  $CATALINA_HOME/common/lib - and NOT in
>> my application's WEB-INF/lib directory.
>> 
>> You might also want to consider downloading one of the more
>> recent Oracle drivers, which are now correctly named as
>> '.jar' files. The '*14' driver (I cannot remember the exact
>> name) relates to Java 1.4 and is compatible with Oracle 8i.
>> 
>> Good luck.
>> 
>> Harry Mantheakis
>> London, UK
>> 
>> 
>>> Hi
>>> After adding class12.jar in setclasspath.bat file I am
>> getting below 
>>> error. I have copied Clasess12.jar in Common\lib directory.
>>> 
>>> DBConnection - getConnection()namingexception caught:
>>> Name jdbc is not bound in
>>> this Context
>>> com.ge.voc.util.SqlBean.executeQuery() outer caught:
>>> No suitable driver. SQL sta
>>> te = 08001, error code = 0
>>> java.sql.SQLException: No suitable driver
>>>       at
>>> java.sql.DriverManager.getConnection(DriverManager.java:532)
>>>       at
>>> java.sql.DriverManager.getConnection(DriverManager.java:171)
>>>       at
>>> com.ge.voc.util.DBConnection.getConnection(DBConnection.java:53)
>>> DBConnection - getConnection()namingexception caught:
>>> Name jdbc is not bound in
>>> this Context
>>> com.ge.voc.util.SqlBean.executeQuery() outer caught:
>>> No suitable driver. SQL sta
>>> te = 08001, error code = 0
>>> 
>>> Can anyone pls help me to solve this problem
>>> 
>>> Thanks
>>> Bikash
>>> 
>>> 
>>> --- Bikash Paul <bi...@yahoo.com> wrote:
>>>> Hi,
>>>> 
>>>> Iam using Tomcat5.0 and iam trying to connect
>>>> oracle8i
>>>> Data base through Datasource and I have created one
>> Datasource using
>>>> administrator tool of Tomcat using oracle driver and I
>> have kept my 
>>>> driver classes12.jar
>>>> file in common\lib folder and also in server\lib
>>>> folder but still it giving me error that
>>>> "java.lang.ClassNotFoundException
>>>> :oracle.jdbc.driver.OracleDriver".Can any one please
>>>> tell me is there any class path setting require for
>>>> that if it is require then in which file.Eagerly
>>>> waiting for reply.
>>>> 
>>>> Thanks & Regards
>>>> Bikash
>>>> 
>>>> __________________________________
>>>> Do you Yahoo!?
>>>> Yahoo! Search - Find what you?re looking for faster
>>>> http://search.yahoo.com
>>>> 
>>>> 
>>> 
>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> tomcat-user-help@jakarta.apache.org
>>>> 
>>> 
>>> 
>>> __________________________________
>>> Do you Yahoo!?
>>> Yahoo! Search - Find what you?re looking for faster
>>> http://search.yahoo.com
>>> 
>>> 
>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


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


RE: Driver class not found

Posted by Mike Curwen <gb...@gb-im.com>.
If you name it *.zip, it will definitely NOT be found in common/lib,
shared/lib, or anywhere else. Tomcat only loads *.jar files.  
 
> For some strange reason

It's not strange if you're trying to make a container configured
DataSource. 

> -----Original Message-----
> From: Harry Mantheakis [mailto:harry@mantheakis.freeserve.co.uk] 
> Sent: Thursday, March 04, 2004 8:05 AM
> To: Tomcat Users List
> Subject: Re: Driver class not found
> 
> 
> Hello
> 
> > After adding class12.jar in setclasspath.bat file I am
> 
> I would undo that - that should not be necessary.
> 
> Try re-naming 'Clasess12.jar' to 'Clasess12.zip' and place 
> the 'zip'  file in the $CATALINA_HOME/common/lib directory.
> 
> Make sure you do NOT have another copy of this 'zip' file (at 
> the same time) in your application's WEB-INF/lib directory.
> 
> For some strange reason I found that with the Oracle drivers 
> I HAD to keep them in  $CATALINA_HOME/common/lib - and NOT in 
> my application's WEB-INF/lib directory.
> 
> You might also want to consider downloading one of the more 
> recent Oracle drivers, which are now correctly named as 
> '.jar' files. The '*14' driver (I cannot remember the exact 
> name) relates to Java 1.4 and is compatible with Oracle 8i.
> 
> Good luck.
> 
> Harry Mantheakis
> London, UK
> 
> 
> > Hi
> > After adding class12.jar in setclasspath.bat file I am 
> getting below 
> > error. I have copied Clasess12.jar in Common\lib directory.
> > 
> > DBConnection - getConnection()namingexception caught:
> > Name jdbc is not bound in
> > this Context
> > com.ge.voc.util.SqlBean.executeQuery() outer caught:
> > No suitable driver. SQL sta
> > te = 08001, error code = 0
> > java.sql.SQLException: No suitable driver
> >       at
> > java.sql.DriverManager.getConnection(DriverManager.java:532)
> >       at
> > java.sql.DriverManager.getConnection(DriverManager.java:171)
> >       at
> > com.ge.voc.util.DBConnection.getConnection(DBConnection.java:53)
> > DBConnection - getConnection()namingexception caught:
> > Name jdbc is not bound in
> > this Context
> > com.ge.voc.util.SqlBean.executeQuery() outer caught:
> > No suitable driver. SQL sta
> > te = 08001, error code = 0
> > 
> > Can anyone pls help me to solve this problem
> > 
> > Thanks
> > Bikash
> > 
> > 
> > --- Bikash Paul <bi...@yahoo.com> wrote:
> >> Hi,
> >> 
> >> Iam using Tomcat5.0 and iam trying to connect
> >> oracle8i
> >> Data base through Datasource and I have created one 
> Datasource using 
> >> administrator tool of Tomcat using oracle driver and I 
> have kept my 
> >> driver classes12.jar
> >> file in common\lib folder and also in server\lib
> >> folder but still it giving me error that
> >> "java.lang.ClassNotFoundException
> >> :oracle.jdbc.driver.OracleDriver".Can any one please
> >> tell me is there any class path setting require for
> >> that if it is require then in which file.Eagerly
> >> waiting for reply.
> >> 
> >> Thanks & Regards
> >> Bikash
> >> 
> >> __________________________________
> >> Do you Yahoo!?
> >> Yahoo! Search - Find what you?re looking for faster 
> >> http://search.yahoo.com
> >> 
> >> 
> > 
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail:
> >> tomcat-user-help@jakarta.apache.org
> >> 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Search - Find what you?re looking for faster
> > http://search.yahoo.com
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


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


Re: Driver class not found

Posted by Harry Mantheakis <ha...@mantheakis.freeserve.co.uk>.
Hello

> After adding class12.jar in setclasspath.bat file I am

I would undo that - that should not be necessary.

Try re-naming 'Clasess12.jar' to 'Clasess12.zip' and place the 'zip'  file
in the $CATALINA_HOME/common/lib directory.

Make sure you do NOT have another copy of this 'zip' file (at the same time)
in your application's WEB-INF/lib directory.

For some strange reason I found that with the Oracle drivers I HAD to keep
them in  $CATALINA_HOME/common/lib - and NOT in my application's WEB-INF/lib
directory.

You might also want to consider downloading one of the more recent Oracle
drivers, which are now correctly named as '.jar' files. The '*14' driver (I
cannot remember the exact name) relates to Java 1.4 and is compatible with
Oracle 8i.

Good luck.

Harry Mantheakis
London, UK


> Hi
> After adding class12.jar in setclasspath.bat file I am
> getting below error. I have copied Clasess12.jar in
> Common\lib directory.
> 
> DBConnection - getConnection()namingexception caught:
> Name jdbc is not bound in
> this Context
> com.ge.voc.util.SqlBean.executeQuery() outer caught:
> No suitable driver. SQL sta
> te = 08001, error code = 0
> java.sql.SQLException: No suitable driver
>       at
> java.sql.DriverManager.getConnection(DriverManager.java:532)
>       at
> java.sql.DriverManager.getConnection(DriverManager.java:171)
>       at
> com.ge.voc.util.DBConnection.getConnection(DBConnection.java:53)
> DBConnection - getConnection()namingexception caught:
> Name jdbc is not bound in
> this Context
> com.ge.voc.util.SqlBean.executeQuery() outer caught:
> No suitable driver. SQL sta
> te = 08001, error code = 0
> 
> Can anyone pls help me to solve this problem
> 
> Thanks
> Bikash
> 
> 
> --- Bikash Paul <bi...@yahoo.com> wrote:
>> Hi,
>> 
>> Iam using Tomcat5.0 and iam trying to connect
>> oracle8i
>> Data base through Datasource and I have created one
>> Datasource using administrator tool of Tomcat using
>> oracle driver and I have kept my driver
>> classes12.jar
>> file in common\lib folder and also in server\lib
>> folder but still it giving me error that
>> "java.lang.ClassNotFoundException
>> :oracle.jdbc.driver.OracleDriver".Can any one please
>> tell me is there any class path setting require for
>> that if it is require then in which file.Eagerly
>> waiting for reply.
>> 
>> Thanks & Regards
>> Bikash
>> 
>> __________________________________
>> Do you Yahoo!?
>> Yahoo! Search - Find what you?re looking for faster
>> http://search.yahoo.com
>> 
>> 
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> tomcat-user-help@jakarta.apache.org
>> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you?re looking for faster
> http://search.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


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


Re: Driver class not found

Posted by Bikash Paul <bi...@yahoo.com>.
Hi
After adding class12.jar in setclasspath.bat file I am
getting below error. I have copied Clasess12.jar in
Common\lib directory. 

DBConnection - getConnection()namingexception caught:
Name jdbc is not bound in
this Context
com.ge.voc.util.SqlBean.executeQuery() outer caught:
No suitable driver. SQL sta
te = 08001, error code = 0
java.sql.SQLException: No suitable driver
        at
java.sql.DriverManager.getConnection(DriverManager.java:532)
        at
java.sql.DriverManager.getConnection(DriverManager.java:171)
        at
com.ge.voc.util.DBConnection.getConnection(DBConnection.java:53)
DBConnection - getConnection()namingexception caught:
Name jdbc is not bound in
this Context
com.ge.voc.util.SqlBean.executeQuery() outer caught:
No suitable driver. SQL sta
te = 08001, error code = 0

Can anyone pls help me to solve this problem

Thanks
Bikash


--- Bikash Paul <bi...@yahoo.com> wrote:
> Hi,
> 
> Iam using Tomcat5.0 and iam trying to connect
> oracle8i
> Data base through Datasource and I have created one
> Datasource using administrator tool of Tomcat using
> oracle driver and I have kept my driver
> classes12.jar
> file in common\lib folder and also in server\lib
> folder but still it giving me error that
> "java.lang.ClassNotFoundException
> :oracle.jdbc.driver.OracleDriver".Can any one please
> tell me is there any class path setting require for
> that if it is require then in which file.Eagerly
> waiting for reply.
> 
> Thanks & Regards
> Bikash
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you�re looking for faster
> http://search.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com

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