Forum: Building VoltDB Applications

Post: Unable to load data into VoltDB cluster

Unable to load data into VoltDB cluster
divya.gowda
Jun 30, 2016
Hi
I am trying to load data into VoltDB via JDBC connector ,when i try running the class file post compilation I get the below error
at Alarm_data.main(Alarm_data.java:35)
Caused by: java.lang.ClassNotFoundException: org.voltdb.client.ClientFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more

I read on one of the forum threads that the guava-16.0.jar comes included as a part of the voltdb package in the lib directory ...but I don't have guava-16.0.jar or any other version of the guava jar for that matter.
is it why I am facing the above error??
P.S am new to VoltDB and java environment ..

Divya
jhugg
Jun 30, 2016
It appears that you're missing the VoltDB client jar (or server jar) in your classpath. I don't think this has anything to do with Guava.
divya.gowda
Jul 1, 2016
Hi,
I added the voltdb client and server jar in the classpath and tried running i get the below error.
Error: Could not find or load main class Alarm_data
the program compiles but can't run .
jhugg
Jul 1, 2016
Now it seems like you removed your own code from the class path.

1) The client jar VoltDB provides is a subset of the full VoltDB jar. You only need the client to run a client app, but it's safe to use the full jar too.
2) You need to include a VoltDB jar AND your own jar or the location of your classfiles in the class path.

I hope this helps.