Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-16800

(7.2.z) TCCL is not set to datasource module in datasource constructor

    Details

    • Type: Bug
    • Status: Pull Request Sent (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.2.1.GA
    • Fix Version/s: None
    • Component/s: JCA
    • Labels:
      None

      Description

      TCCL is not set to datasource module

      User has a datasource that uses ORB classes and is getting a ClassNotFound.

      If a 3rd party JDBC driver implementation is using e. g. CORBA, the class loader is not set and thus the CORBA classes got loaded from the 'org.jboss.as.connector' modules class loader.

      So the root cause is the Thread Context ClassLoader (TCCL) is not set to the classloader/module of the datasource driver module. The particular datasource driver is making using of ORB.init which is a JDK class that looks on the TCCL and other places to load the class specified in ORB.init, but JCA when running has not set the TCCL thus the classes cannot be found.

      Having the TCCL set to the application is how JEE handles related situations to load application classes, so it would make sense that when JCA is running the datasource that it would have the TCCL set to the module of the datasource or a delegate class loader that sees both the datasource module and any other class loader that JCA might need, JBossWS does something similar.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  spyrkob Bartosz Spyrko
                  Reporter:
                  spyrkob Bartosz Spyrko
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: