aspose file tools*
The moose likes JDBC and the fly likes problem in connecting to oracle database. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem in connecting to oracle database." Watch "problem in connecting to oracle database." New topic
Author

problem in connecting to oracle database.

Nguyen Phuoc
Greenhorn

Joined: Apr 23, 2011
Posts: 15
Hi all
I beginer Java .When i try connect oracle occured error

Versions using :
Oracle 10g
JDK 1.6
Tomcat 6
jdbc14.jar added
classes12.zip added
but it not run
Here my connect code:


Please help me fix this error
Mahendra Suda
Greenhorn

Joined: Apr 22, 2011
Posts: 18
Have you put the oracle jar file in your classpath?

Have you put the oracle jar file in lib directory of tomcat6?


http://www.java-connect.com
Nguyen Phuoc
Greenhorn

Joined: Apr 23, 2011
Posts: 15
Mahendra Suda wrote:Have you put the oracle jar file in your classpath?

Have you put the oracle jar file in lib directory of tomcat6?

Many thank Mahendra
jdbc14.jar added
classes12.zip added
What else ???
Sai Hegde
security forum advocate
Ranch Hand

Joined: Oct 26, 2010
Posts: 200
    
    1

I think you would need ojdbc6 from oracle since you are working with JDK6
I think the url too needs to be redone if you are connecting to a Oracle service and not a database in particular

Nguyen Phuoc
Greenhorn

Joined: Apr 23, 2011
Posts: 15
Sai Hegde wrote:I think you would need ojdbc6 from oracle since you are working with JDK6
I think the url too needs to be redone if you are connecting to a Oracle service and not a database in particular


Thanks Sai
I solved problem .When add files .jar to libraries you need copy same files to WEB-INF/lib .

and thanks all.
Sai Hegde
security forum advocate
Ranch Hand

Joined: Oct 26, 2010
Posts: 200
    
    1

Yes, the libraries need to be in your project build path.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in connecting to oracle database.