tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandra Patricia Hunter <redbirdoftheso...@shaw.ca>
Subject RE: CLASSPATH
Date Mon, 07 Apr 2003 19:41:00 GMT
Okay, then can anyone say why I am getting this problem when I try to run a
test:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
        at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:140)
        at TestingJDBC.main(TestingJDBC.java:7)

And when I run the jsp with identical connection code:
//load the Driver class file
Class.forName("oracle.jdbc.driver.OracleDriver");;
			
//make a connection to database
con = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:Joe",
					       "scott","tiger");

Tomcat generates this error:
ORA-00911: invalid character

I can't see any invalid character and I bet it is going to be something
really obvious but...


Sandra Patricia Hunter
Systems Development and Web Design 
 


-----Original Message-----
From: G. Wade Johnson [mailto:wade.johnson@abbnm.com] 
Sent: April 7, 2003 12:29 PM
To: Tomcat Users List
Subject: Re: CLASSPATH


No. The class name will still be "oracle.jdbc.driver.OracleDriver".
Tomcat will just look in the jar file to find that path.

G. Wade

Sandra Patricia Hunter wrote:
> 
> Okay now I am really confused:
> If I put the classes12.jar files in the Tomcat_home\common\lib path, 
> is that the path I include in the following? Would I say: 
> tomcat.common.lib.OracleDriver or what?
> 
> //load the Driver class file (this refers to the classes12.zip file in
> Oracle)
> Class.forName("oracle.jdbc.driver.OracleDriver");;
> 
> //make a connection to database
> con = 
> DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:Joe","sc
> ott","
> tiger");
> 
> Sandra Patricia Hunter
> Systems Development and Web Design
> 
> 
> -----Original Message-----
> From: Aparna Narla [mailto:AparnaN@envworld.com]
> Sent: April 7, 2003 9:53 AM
> To: 'Tomcat Users List'
> Subject: RE: CLASSPATH
> 
> Hi Sandra...
> 
> There is no libclasses12.jar file it is lib/classes12.jar
> 
> CLASSPATH=.:"TOMCAT_HOME"/common/lib/classes12.jar:"TOMCAT_HOME"/webap
> ps/coc
> o
> on/WEB-INF/classes
> 
> Yes you need to copy the file. First rename classes12.zip  to 
> classes12.jar and copy to TOMCAT_HOME/common/lib/
> 
> Ap
> 
> -----Original Message-----
> From: Sandra Patricia Hunter [mailto:redbirdofthesouth@shaw.ca]
> Sent: Monday, April 07, 2003 10:43 AM
> To: 'Tomcat Users List'
> Subject: RE: CLASSPATH
> 
> I don't have a libclasses12.jar file at all.
> I do have classes12.zip in my oracle/ora81/jdbc/lib directory. I don't 
> have the classes12 file in my Tomcat common/lib directory. Should I 
> copy the oracle file to the Tomcat directory? Oh dear
> 
> Sandra Patricia Hunter
> Systems Development and Web Design
> 
> 
> -----Original Message-----
> From: Aparna Narla [mailto:AparnaN@envworld.com]
> Sent: April 7, 2003 9:31 AM
> To: 'Tomcat Users List'
> Subject: RE: CLASSPATH
> 
> Hi,
> 
> Hope this may help... 
> CLASSPATH=.:"TOMCAT_HOME"/common/libclasses12.jar:"TOMCAT_HOME"/webapp
> s/coco
> on/WE-INF/classes
> 
> If you have both tomcat and cocoon
> 
> Thanks
> Ap
> 
> -----Original Message-----
> From: Sandra Patricia Hunter [mailto:redbirdofthesouth@shaw.ca]
> Sent: Monday, April 07, 2003 10:28 AM
> To: 'Tomcat Users List'
> Subject: RE: CLASSPATH
> 
> But don't I need to include the Tomcat...\WEB_INF\classes in my path 
> for them to run? What I am doing is just running a simple java app to 
> test my Oracle connection for my jsp pages and keep getting the 
> "java.lang.ClassNotFoundException" message. Now I may be wrong, but 
> doesn't this mean that something that should be in my class path isn't 
> there? Or possibly what is in my class path is not in the correct 
> order?
> 
> Sandra Patricia Hunter
> Systems Development and Web Design
> 
> 
> -----Original Message-----
> From: Tim Funk [mailto:funkman@joedog.org]
> Sent: April 7, 2003 9:18 AM
> To: Tomcat Users List
> Subject: Re: CLASSPATH
> 
> Tomcat ignores the CLASSPATH environment variable.
> 
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.htm
> l
> 
> -Tim
> 
> Sandra Patricia Hunter wrote:
> > I am struggling with the correct settings for my classpath. I am 
> > using Win2K and have a real hodgepodge. I don't really understand 
> > what I am doing in setting the class path. If someone could explain 
> > that to me I would appreciate it. I suspect there should be an order 
> > to things but I am not clear on that either. This is what I have 
> > right now: CLASSPATH =
> >
> C:\j2sdk1.4.0_03\bin;C:\j2sdkee1.3.1\lib\j2ee.jar;C:\j2sdk1.4.0_03\lib
> \tools
> >
> .jar;C:\j2sdk1.4.0_03\lib\dt.jar;C:\Tomcat\webapps\idcard\WEB-INF\clas
> ses\id
> > card; %path%
> >
> >
> > Sandra Patricia Hunter
> >
> > Systems Development and Web Design
> >
> > PO Box 404
> >
> > Malahat BC  V0R 2L0
> >
> > 250.743.2241
> >
> > Website <http://members.shaw.ca/redbirdofthesouth>
> >
> >
> >
> > Golden Geeks
> >
> > Computer Training for Mature Users
> >
> > Website <http://members.shaw.ca/goldengeeks>
> >
> >
> >
> 
> ---------------------------------------------------------------------
> 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
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message