Solved

Error with Java/Cache JDBC Classpath

Posted on 2016-11-04
2
67 Views
Last Modified: 2016-11-04
I have a developer needing to connect from Tomcat to a Cache database running on a Linux server.
I got the cachejdbc.jar and cachedb.jar files from Ontario by installing a Windows version of Cache on my local machine.
I've placed them into a folder that's located inside the classpath.  When he runs his code, it's coming back with:
java.lang.ClassNotFoundException: com.intersys.jdbc.CacheDriver

I verified that the CacheDriver.class is inside the .jar file.  I don't know what else might be the problem.
Here is the snippet of code he's using:
Class.forName ("com.intersys.jdbc.CacheDriver").newInstance();
String  url="jdbc:Cache://<OUR URL>:1972/<OUR NAMESPACE>";
java.sql.Driver drv = java.sql.DriverManager.getDriver(url);

java.util.Properties props = new Properties();
props.put("user",username);
props.put("password",password);
java.sql.Connection dbconnection = drv.connect(url, props);
0
Comment
Question by:Brian Sandt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 41874800
Class.forName ("com.intersys.jdbc.CacheDriver").newInstance();

Open in new window

before that, please place the following and post what it prints

System.out.println(System.getProperty("java.class.path"));

Open in new window

0
 

Author Closing Comment

by:Brian Sandt
ID: 41874805
They decided to go through another path.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question