Adding aggregate function to external H2 database Adding aggregate function to external H2 database database database

Adding aggregate function to external H2 database


Have you added your class to the classpath of the H2 database process? I.e. when starting up the H2 database?

Another way to do this is to fork H2 and build it including your custom aggregate function. Or just put your .class file inside the H2 jar file, depending on how often you have to update your own code, this might be ok, too. Then it will certainly be on the classpath...

In the worst case, the H2 user group is quite active:

http://groups.google.com/group/h2-database


When running the H2 server as an external process, the classes can be added to the classpath using java -cp <dir> ....

When using the h2.sh or h2.bat to start the H2 server, you can add the directory to the environment variables %H2DRIVERS% or %CLASSPATH%.