Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6260

IllegalAccessException when setup statement in the camel-jdbc component

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.10.4, 2.11.0
    • Fix Version/s: 2.10.5, 2.11.0
    • Component/s: camel-core, camel-jdbc
    • Labels:
      None
    • Environment:

      jdbc: ojdbc6.jar (Oracle)
      camel: 2.10.4

    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown

      Description

      When use camel-jdbc and try to setup statement parameter:

      to("jdbc:tradeDataSource?statement.fetchSize=100").

      jdbc: ojdbc6.jar (Oracle)

      Exception happens:
      Class org.apache.camel.util.IntrospectionSupport can not access a member of class oracle.jdbc.driver.OracleStatementWrapper with modifiers "public"
      java.lang.IllegalAccessException: Class org.apache.camel.util.IntrospectionSupport can not access a member of class oracle.jdbc.driver.OracleStatementWrapper with modifiers "public"
      at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
      at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:261)
      at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:253)
      at java.lang.reflect.Method.invoke(Method.java:594)
      at org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:331)
      at org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:367)
      at org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:297)
      at org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:307)
      at org.apache.camel.component.jdbc.JdbcProducer.createAndExecuteSqlStatement(JdbcProducer.java:118)
      at org.apache.camel.component.jdbc.JdbcProducer.processingSqlBySettingAutoCommit(JdbcProducer.java:82)
      at org.apache.camel.component.jdbc.JdbcProducer.process(JdbcProducer.java:63)
      at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
      at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)
      at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)
      at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
      at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
      at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:308)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
      at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:122)
      at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
      at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:61)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
      at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
      at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
      at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)
      at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:98)
      at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:94)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)

      This is because the Oracle class oracle.jdbc.driver.OracleStatementWrapper has package-view access.

        Attachments

        1. IntrospectionSupport.java.patch
          1 kB
          Jury Matveentsev

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              basssjm Jury Matveentsev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: