I have been getting some errors on my program relating to running out of sockets. In searching for a solution to this I have seen Connection Pooling as a likely solution. It also promises performance benefits and greater control over the DB usage. I'm keen to give it a go. All of the examples I could find relating to this used Eclipse, Maven or some commercial driver. I don't use any of these, I write my programs in Netbeans and that keeps things simple.
I found this site: https://docs.oracle.com/database/121/JJUCP/manage.htm#JJUCP8180
and put together the code below. It compiles but when I run it I get the error at the bottom. Can anyone tell me where I can find a simple example of connection pooling not using Eclipse, Maven or anything else? Alternatively what did I miss in my code and how do I then use this DataPool when it is working?
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/OracleShardingKeyBuilder
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleShardingKeyBuilder
... 2 more
C:\Users\NeilB\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)