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

camel-main - can not use the camel.lra.enabled=true

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.7.0
    • camel-main
    • None
    • Unknown

    Description

      I just use the camel-example-main to reproducer this issue

      • add the camel-lra dependency in the pom.xml
      • add camel.lra.enabled=true in the application.properties
      • re-compile and run the example
      INFO] Using custom org.apache.camel.example.MyApplication to initiate a CamelContext
      [INFO] Starting Camel ...
      23:02:19.058 [org.apache.camel.example.MyApplication.main()] INFO  o.a.camel.support.LRUCacheFactory - Detected and using LRUCacheFactory: camel-caffeine-lrucache
      23:02:19.161 [org.apache.camel.example.MyApplication.main()] INFO  o.apache.camel.main.BaseMainSupport - Using properties from: classpath:application.properties;optional=true
      23:02:19.175 [org.apache.camel.example.MyApplication.main()] INFO  o.apache.camel.main.BaseMainSupport - Loaded additional 1 properties from file: src/main/data/foo.properties
      23:02:19.243 [org.apache.camel.example.MyApplication.main()] INFO  o.a.c.i.e.DefaultBeanIntrospection - Invoked: 1 times (overall) [Method: setProperty, Target: org.apache.camel.service.lra.LRASagaService@13db0de, Arguments: [enabled, true]]
      [ERROR] *************************************
      [ERROR] Error occurred while running main from: org.apache.camel.example.MyApplication
      [ERROR] 
      java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.apache.camel.maven.RunMojo$1.run (RunMojo.java:438)
          at java.lang.Thread.run (Thread.java:748)
      Caused by: org.apache.camel.PropertyBindingException: Error binding property (camel.lra.enabled=true) with name: enabled on bean: lra-saga-service with value: true
          at org.apache.camel.main.MainHelper.setPropertiesOnTarget (MainHelper.java:192)
          at org.apache.camel.main.BaseMainSupport.setLraCheckProperties (BaseMainSupport.java:1041)
          at org.apache.camel.main.BaseMainSupport.doConfigureCamelContextFromMainConfiguration (BaseMainSupport.java:795)
          at org.apache.camel.main.BaseMainSupport.autoconfigure (BaseMainSupport.java:435)
          at org.apache.camel.main.BaseMainSupport.postProcessCamelContext (BaseMainSupport.java:522)
          at org.apache.camel.main.MainSupport.initCamelContext (MainSupport.java:320)
          at org.apache.camel.main.Main.doInit (Main.java:106)
          at org.apache.camel.support.service.BaseService.init (BaseService.java:83)
          at org.apache.camel.main.MainSupport.run (MainSupport.java:58)
          at org.apache.camel.main.MainCommandLineSupport.run (MainCommandLineSupport.java:156)
          at org.apache.camel.example.MyApplication.main (MyApplication.java:38)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.apache.camel.maven.RunMojo$1.run (RunMojo.java:438)
          at java.lang.Thread.run (Thread.java:748)
      
      

       

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            zhfeng Zheng Feng
            zhfeng Zheng Feng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment