java.lang.ClassNotFoundException: com.ncr.teradata.TeraDriver
Could someone help me with this error as soon as possible.I am trying it from last 2 days,but can't solve it.
I tried intiliazing driver,but didn't work.
Driver driver =null;
try{
driver = (Driver)Class.forName(applicationproperties.getProperty("TD_T4_DRIVER")).newInstance();
}
even if I try w/o reading it from file and wire it:
driver = (Driver) Class.forName("com.ncr.teradata.TeraDriver").newInstance();
still doesn't work,gives me same error..
Plz help me,I have to get it done by today..
Many Thanks in Advance!!'
-ASH
[746 byte] By [
ASH_2007a] at [2007-11-27 9:47:23]

# 1
hi Ash,can u post the log trace please,so that, it's easy to find the error and give the exact solution to u.Bala
art84a at 2007-7-12 23:59:40 >

# 2
The log file prints:
ERROR::Thu Jul 05 11:15:41 EDT 2007-Failed!!. Severe error in , unable to continue
java.lang.ClassNotFoundException: com.ncr.teradata.TeraDriver
at java.net.URLClassLoader.findClass(URLClassLoader.java:376)
at java.lang.ClassLoader.loadClass(ClassLoader.java:570)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:442)
at java.lang.ClassLoader.loadClass(ClassLoader.java:502)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at BatchJob.main(BatchJob.java:81)
Is that what u want? Did I understand you correct?
BatchJob is my program
Thanks
# 3
this exceptions means that your jvm doesn't find the com.ncr.teradata.TeraDriver class.normally, you have a jdbc driver jar (I think terajdbc4.jar) to add to your classpath.a quick solution is to add this jar to your JDK_INSTALL_DIR/jre/lib/ext/Hope That Helps
# 4
hi,java.lang.ClassNotFoundException: com.ncr.teradata.TeraDriverit's a third party driver, so u want to map the jar file for this driver to your program.i think u can get my point.Bala
art84a at 2007-7-12 23:59:41 >

# 5
Hello Java_2006, i did added that jar to my classpath,but it's not throeing any eroor,but still it syas unable to connect with server...So it's printing anything in log trace..but still not doing anyhting :-(have any clue?
# 6
hi,
if u using the eclipse IDE right, do the following steps to clear the problem,
in the left panel of your IDE Window u can see the Package structure(list of project name), on that list right click on our project one pop up window will be appear, on that window u can click the "Properties" link, u can get an another window, on that window click the "Java Build Path " and select the "Libraries" tag , u can see the four buttons on your right hand side, Now u click on the " ADD External Jar" File button and add your jar file to your program.
After completing that u can compile and run.
i think u can understand my point, otherwise call me i ll explain u , i send my number to your email id.
Bala
art84a at 2007-7-12 23:59:41 >

# 7
I have already tried it..but it still didn't work :-(
# 8
hi,did u find the problemBala
art84a at 2007-7-12 23:59:41 >

# 9
No :-(It's not throwing any classnotfound exception anymorebut it does thrown an exception for error in server,unble to continueI have No idea, what's going on
# 10
Actually,it's still throwing the exception.Java:lang:ClassNotFoundException:com.nce.teradata:TeraDriver
# 11
Ok, question time.
What are you running this in. An IDE like Eclipse? A jsp server like Tomcat?
Can you show the code trying to connect to this database?
Does this code work in a standalone application?
Does it work in a servlet?
For a ClassNotFoundException you need to add the class into your classpath. For a web application that means putting the jar file into the WEB-INF/lib directory.
# 12
Yes, the code works in servlet in other application.
Here is how I have connected it:
try{
Driver driver = (Driver)Class.forName(applicationproperties.getProperty("TD_T4_DRIVER")).newInstance();
}
Here TD_T4_Driver="com.ncr.teradata.TeraDriver"
I have included hte teradata jar files in library and in classpath.
But it still doesn't work..
Thanks for the help.
# 13
hi ,post the full code.Bala
art84a at 2007-7-12 23:59:41 >

# 14
problem has been detected..I am working on that and will resolve it..thanks bala for concern(could you plz check my new thread) I want to execure insert statement in DB2 whenever there is new entry added (insert) in Teradata...
one table is teradata and one in db2..both contains same data..)
thanks everybody for helping me out.
Thanks