Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error with Java/Cache JDBC Classpath

Posted on 2016-11-04
2
Medium Priority
?
72 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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

715 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