Forum: Building VoltDB Applications

Post: ClassNotFoundException trying to start server

ClassNotFoundException trying to start server
Aug 19, 2013

I'm getting a strange ClassNotFoundException trying to start a server with a new stored procedure that I wrote. Compilation works fine as does creating the JAR file, but when I do a "voltdb create ...", I get this exception after a couple seconds. I opened up and checked the JAR file to ensure that the class is there and it is. The package name is correct as well.

Is there anything else I should check? I've been staring at this for an our or so without any clue as to why this is occurring.

The full exception looks like this:

        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(
        at java.lang.Class.getConstructor0(
        at java.lang.Class.newInstance0(
        at java.lang.Class.newInstance(
        at org.voltdb.LoadedProcedureSet.loadProceduresFromCatalog(
        at org.voltdb.LoadedProcedureSet.loadProcedures(
        at org.voltdb.iv2.BaseInitiator.configureCommon(
        at org.voltdb.iv2.SpInitiator.configure(
        at org.voltdb.RealVoltDB.initialize(
        at org.voltdb.VoltDB.initialize(
        at org.voltdb.VoltDB.main(
Caused by: java.lang.ClassNotFoundException:$1
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at org.voltdb.utils.InMemoryJarfile$JarLoader.loadClass(
Aug 19, 2013
Nevermind. I figured it out. I was using the double-brace initialization to initialize a list and it was creating "class$1" which was not imported into VoltDB.