The following is based on
Wildfly 10.1 Standalone and Derby Remote client. I assume the same will be true for other environments.
I have deployed derbyclient.jar to the deployments folder and registered a DataSource in Wildfly named 'SimpleWebProjectDS', a JNDI-Name of '
java:jboss/SimpleWebProjectDS' and associated this with the deployed Derby driver. The server URL is set to '
jdbc:derby://localhost:1527/SimpleWebProjectDB;create=true'.
With Derby running on port 1527, the following causes a ClassNotFoundException:
The following executes without throwing an exception and produces the expected functionality:
Why does the first solution cause a ClassNotFoundError?