Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1310

NoClassDefFoundError in teiid Driver Auto-detect

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2017.5.0
    • Fix Version/s: 2017.6.0
    • Component/s: None
    • Labels:
      None

      Description

      Teiid has supply a driver(teiid-$VERSION-jdbc.jar) which do not depend on additional jars, this should wrok fine with current logic.
      But teiid-client library also contains detectableClassName( org.teiid.jdbc.TeiidDriver), this will cause a NoClassDefFoundError

      2017-05-02 16:23:35,091 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 16) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "datasources"),
          ("jdbc-driver" => "teiid")
      ]): java.util.ServiceConfigurationError: java.sql.Driver: Provider org.teiid.jdbc.TeiidDriver could not be instantiated
      	at java.util.ServiceLoader.fail(ServiceLoader.java:232)
      	at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
      	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
      	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
      	at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
      	at org.jboss.as.connector.subsystems.datasources.JdbcDriverAdd.performRuntime(JdbcDriverAdd.java:107)
      	at org.jboss.as.controller.AbstractAddStepHandler.performRuntime(AbstractAddStepHandler.java:337)
      	at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:151)
      	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:890)
      	at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:659)
      	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370)
      	at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:359)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      Caused by: java.lang.NoClassDefFoundError: org/teiid/core/TeiidException
      	at org.teiid.jdbc.TeiidDriver.<init>(TeiidDriver.java:72)
      	at org.teiid.jdbc.TeiidDriver.<clinit>(TeiidDriver.java:60)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at java.lang.Class.newInstance(Class.java:442)
      	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
      	... 13 more
      Caused by: java.lang.ClassNotFoundException: org.teiid.core.TeiidException from [Module "org.teiid.jdbc:main" from BootModuleLoader@635eaaf1 for finders [BootstrapClasspathModuleFinder, BootstrapModuleFinder(org.wildfly.swarm.bootstrap:main), ClasspathModuleFinder, ContainerModuleFinder(swarm.container:main), ApplicationModuleFinder(swarm.application:main), org.wildfly.swarm.bootstrap.modules.DynamicModuleFinder@5c30a9b0]]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
      	... 21 more
      

      .h3 Reproduce

      $ git clone git@github.com:kylinsoong/wildfly-swarm-teiid-examples.git
      $ cd wildfly-swarm-teiid-examples
      $ mvn clean install
      $ java -jar vdb-datafederation/target/vdb-datafederation-swarm.jar
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kylin Kylin Soong
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: