Picking up from an older issue regarding some trouble with class loading from within isolated contexts such as Database Readers (see here).
Basically, in these contexts there is a separate ClassLoader built specifically based on the Resources assigned to those Channels/Connectors. This would allow different versions of different custom drivers to be used in parallel (ClassLoader instantiated here, more info in comments here).
Example steps to reproduce:
- Download ojdbc17.jar from Oracle
- Place it somewhere accessible to OIE but outside of server-lib or custom-lib
- In OIE Settings, create a Resource containing only ojdbc17.jar
- Create a Channel, assign the Resource to its Dependencies
- Configure source as Database Reader with settings as follows:
- Driver: Oracle
- URL: jdbc:oracle:thin:@
- Username: username
- Password: password
- SQL: select
- Attempt to deploy the channel
- There should be a DeployException caused by NoClassDefFoundError: java/sql/Driver
Note that attempting to deploy the channel without having the Resource assigned should result in a different error (StartException: Failed to start channel fallback_test), which shows that the default server-lib ojdbc class loads successfully.
With the official move to Java 9+, this could now be solved by having the isolated ClassLoader fall back to ClassLoader.getPlatformClassLoader() as its parent, effectively replicating the behavior previously seen with null parent on Java 8.
Picking up from an older issue regarding some trouble with class loading from within isolated contexts such as Database Readers (see here).
Basically, in these contexts there is a separate ClassLoader built specifically based on the Resources assigned to those Channels/Connectors. This would allow different versions of different custom drivers to be used in parallel (ClassLoader instantiated here, more info in comments here).
Example steps to reproduce:
Note that attempting to deploy the channel without having the Resource assigned should result in a different error (StartException: Failed to start channel fallback_test), which shows that the default server-lib ojdbc class loads successfully.
With the official move to Java 9+, this could now be solved by having the isolated ClassLoader fall back to
ClassLoader.getPlatformClassLoader()as its parent, effectively replicating the behavior previously seen withnullparent on Java 8.