[jira] [Updated] (CAMEL-20514) camel-model - Add support for bean constructors for beans in route templates or kamelets

2024-05-02 Thread Claus Ibsen (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-20514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-20514:

Fix Version/s: 4.6.0
   (was: 4.x)

> camel-model - Add support for bean constructors for beans in route templates 
> or kamelets
> 
>
> Key: CAMEL-20514
> URL: https://issues.apache.org/jira/browse/CAMEL-20514
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 4.6.0
>
>
> https://github.com/apache/camel-karavan/discussions/1154



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-20514) camel-model - Add support for bean constructors for beans in route templates or kamelets

2024-05-02 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-20514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842947#comment-17842947
 ] 

Claus Ibsen commented on CAMEL-20514:
-

TODO: add constructors, factory bean/method, builder bean/method to kamelet 
beans *DONE*
TODO: see if we can merge model for registry bean and kamelet bean into the 
same model/class instead of duplicates

> camel-model - Add support for bean constructors for beans in route templates 
> or kamelets
> 
>
> Key: CAMEL-20514
> URL: https://issues.apache.org/jira/browse/CAMEL-20514
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 4.6.0
>
>
> https://github.com/apache/camel-karavan/discussions/1154



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CAMEL-20729) camel-http - cookieStore property not recognized

2024-05-02 Thread Claus Ibsen (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-20729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-20729:

Summary: camel-http - cookieStore property not recognized  (was: 
cookieStore property not recognized)

> camel-http - cookieStore property not recognized
> 
>
> Key: CAMEL-20729
> URL: https://issues.apache.org/jira/browse/CAMEL-20729
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http
>Affects Versions: 4.5.0
>Reporter: Raymond
>Priority: Minor
>
> I am in the process of upgrading from 3.20.9 to 4.5.0. When I install a route 
> that uses following http endpoint:
> {code:java}
>  uri="http://www.testingmcafeesites.com/testcat_al.html?cookieStore=#flowCookieStore&throwExceptionOnFailure=true&maxTotalConnections=20&connectionsPerRoute=2"/>
>  {code}
> I get the following error:
> {code:java}
> Failed to create route HTTP_TEST at: >>> 
> To[http://www.testingmcafeesites.com/testcat_al.html?cookieStore=#flowCookieStore&throwExceptionOnFailure=true&maxTotalConnections=20&connectionsPerRoute=2]
>  <<< in route: 
> Route(ID_627a64ad38c74a00130006eb-ce173190-d08f-11ec-83f5-37... because of 
> Failed to resolve endpoint: 
> http://www.testingmcafeesites.com/testcat_al.html?connectionsPerRoute=2&cookieStore=%23flowCookieStore&maxTotalConnections=20&throwExceptionOnFailure=true
>  due to: Error binding property (cookieStore=#flowCookieStore) with name: 
> cookieStore on bean: 
> http://www.testingmcafeesites.com/testcat_al.html?maxTotalConnections=20&connectionsPerRoute=2&throwExceptionOnFailure=true&cookieStore=%23flowCookieStore
>  with value: #flowCookieStore",{code}
> When I remove the cookieStore property the route installs and runs normally. 
> The "#flowCookieStore" is binded to registry like it was in camel 3.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (CAMEL-20717) camel-mllp - Exception not thrown in TcpSocketConsumerRunnable line 192

2024-05-02 Thread Claus Ibsen (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-20717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-20717.
-
Resolution: Fixed

> camel-mllp - Exception not thrown in TcpSocketConsumerRunnable line 192
> ---
>
> Key: CAMEL-20717
> URL: https://issues.apache.org/jira/browse/CAMEL-20717
> Project: Camel
>  Issue Type: Bug
>  Components: camel-mllp
>Reporter: Dmitrii Kriukov
>Assignee: Dmitrii Kriukov
>Priority: Minor
> Fix For: 4.6.0
>
>
> {color:#172b4d}new MllpInvalidMessageException({color}
> {color:#172b4d} "Timeout receiving complete message payload", 
> mllpBuffer.toByteArrayAndReset(), timeoutEx,
> logPhi);
> Possible fix is to reorder statements and throw the exception in the end of 
> block else
> Please let me know what you think
> {color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-20729) camel-http - cookieStore property not recognized

2024-05-02 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-20729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842954#comment-17842954
 ] 

Claus Ibsen commented on CAMEL-20729:
-

Make sure your cookieStore bean is the correct class - it should be 
org.apache.hc.client5.http.cookie.CookieStore.class

> camel-http - cookieStore property not recognized
> 
>
> Key: CAMEL-20729
> URL: https://issues.apache.org/jira/browse/CAMEL-20729
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http
>Affects Versions: 4.5.0
>Reporter: Raymond
>Priority: Minor
>
> I am in the process of upgrading from 3.20.9 to 4.5.0. When I install a route 
> that uses following http endpoint:
> {code:java}
>  uri="http://www.testingmcafeesites.com/testcat_al.html?cookieStore=#flowCookieStore&throwExceptionOnFailure=true&maxTotalConnections=20&connectionsPerRoute=2"/>
>  {code}
> I get the following error:
> {code:java}
> Failed to create route HTTP_TEST at: >>> 
> To[http://www.testingmcafeesites.com/testcat_al.html?cookieStore=#flowCookieStore&throwExceptionOnFailure=true&maxTotalConnections=20&connectionsPerRoute=2]
>  <<< in route: 
> Route(ID_627a64ad38c74a00130006eb-ce173190-d08f-11ec-83f5-37... because of 
> Failed to resolve endpoint: 
> http://www.testingmcafeesites.com/testcat_al.html?connectionsPerRoute=2&cookieStore=%23flowCookieStore&maxTotalConnections=20&throwExceptionOnFailure=true
>  due to: Error binding property (cookieStore=#flowCookieStore) with name: 
> cookieStore on bean: 
> http://www.testingmcafeesites.com/testcat_al.html?maxTotalConnections=20&connectionsPerRoute=2&throwExceptionOnFailure=true&cookieStore=%23flowCookieStore
>  with value: #flowCookieStore",{code}
> When I remove the cookieStore property the route installs and runs normally. 
> The "#flowCookieStore" is binded to registry like it was in camel 3.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CAMEL-20731) Route coverage fails on routes with multiple doCatch blocks

2024-05-02 Thread Adriano Machado (Jira)
Adriano Machado created CAMEL-20731:
---

 Summary: Route coverage fails on routes with multiple doCatch 
blocks
 Key: CAMEL-20731
 URL: https://issues.apache.org/jira/browse/CAMEL-20731
 Project: Camel
  Issue Type: Bug
  Components: tooling
Affects Versions: 4.0.3
Reporter: Adriano Machado


Routes containing `doTry` with multiple `doCatch` blocks fails when running the 
code coverate mojo.  An example:

```

  
  
    
    
    
      java.io.IOException
      
    
    
      java.lang.IllegalStateException
      
    
    
       
    
  
```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CAMEL-20731) Route coverage fails on routes with multiple doCatch blocks

2024-05-02 Thread Claus Ibsen (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-20731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-20731:

Priority: Minor  (was: Major)

> Route coverage fails on routes with multiple doCatch blocks
> ---
>
> Key: CAMEL-20731
> URL: https://issues.apache.org/jira/browse/CAMEL-20731
> Project: Camel
>  Issue Type: Bug
>  Components: tooling
>Affects Versions: 4.0.3
>Reporter: Adriano Machado
>Priority: Minor
>
> Routes containing `doTry` with multiple `doCatch` blocks fails when running 
> the code coverate mojo.  An example:
> ```
> 
>   
>   
>     
>     
>     
>       java.io.IOException
>       
>     
>     
>       java.lang.IllegalStateException
>       
>     
>     
>        
>     
>   
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-20731) Route coverage fails on routes with multiple doCatch blocks

2024-05-02 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-20731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843007#comment-17843007
 ] 

Claus Ibsen commented on CAMEL-20731:
-

Can you try with latest 4.4.x and/or 4.5.0 release

> Route coverage fails on routes with multiple doCatch blocks
> ---
>
> Key: CAMEL-20731
> URL: https://issues.apache.org/jira/browse/CAMEL-20731
> Project: Camel
>  Issue Type: Bug
>  Components: tooling
>Affects Versions: 4.0.3
>Reporter: Adriano Machado
>Priority: Minor
>
> Routes containing `doTry` with multiple `doCatch` blocks fails when running 
> the code coverate mojo.  An example:
> ```
> 
>   
>   
>     
>     
>     
>       java.io.IOException
>       
>     
>     
>       java.lang.IllegalStateException
>       
>     
>     
>        
>     
>   
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CAMEL-20732) RestDefinition does not properly handle array of primitives for` in/out types

2024-05-02 Thread Stefan Kalscheuer (Jira)
Stefan Kalscheuer created CAMEL-20732:
-

 Summary: RestDefinition does not properly handle array of 
primitives for` in/out types
 Key: CAMEL-20732
 URL: https://issues.apache.org/jira/browse/CAMEL-20732
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 4.4.2
Reporter: Stefan Kalscheuer


This is likely a regression from CAMEL-15199 (since 3.5.0).

Using primitive array types as in/out type in REST route definition results in 
invalid string representation of the actual type.

 

*History*

Noticed on a project with Camel 4.4 including SpringDoc and a route with 
outType "byte[]".
OpenAPI/Swagger output is completely broken (i.e. empty), apparently because 
the type "null[]" is not resolvable.

The issue is still present in latest 4.6.0-SNAPSHOT and most likely since 3.5.0

 

*Analysis*

The workaround code introduced in the referenced issue contains this branch:
{code:java}
if (!classType.isPrimitive()) {
if (classType.isArray()) {
type = StringHelper.between(classType.getName(), "[L", ";") + "[]";
} else {
/* ...*/{code}
Because byte[].class.getName() returns "[B" there is nothing betwen "[L" and 
";", so the output is "null[]".

 

*Example*
{code:java}
package my.example;

public class MyRoutes extends org.apache.camel.builder.RouteBuilder {
@Override
public void configure() throws Exception {
rest()
.get("/test")
.outType(byte[].class)
.produces("application/octet-stream")
.route()
.log("test me");
}
} {code}
 

*Workarounds*

Use boxed type, e.g. Byte[] (which correctly results in "java.lang.Byte[]") or 
specify the type as String "byte[]" directly.

 

*Solution*

The solution seems pretty straight forward here. I will submit a proposal



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-20729) camel-http - cookieStore property not recognized

2024-05-02 Thread Raymond (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-20729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843020#comment-17843020
 ] 

Raymond commented on CAMEL-20729:
-

Yes, that was indeed the case. Once I migrated from Apache HttpComponents v4 to 
Apache HttpComponents v5 it worked. You can close ticket.

Though (when carefully read) this is in the documentation of the HTTP 
component, I was looking in the migration guide (3 --> 4). Maybe good to add 
this info there as well.

> camel-http - cookieStore property not recognized
> 
>
> Key: CAMEL-20729
> URL: https://issues.apache.org/jira/browse/CAMEL-20729
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http
>Affects Versions: 4.5.0
>Reporter: Raymond
>Priority: Minor
>
> I am in the process of upgrading from 3.20.9 to 4.5.0. When I install a route 
> that uses following http endpoint:
> {code:java}
>  uri="http://www.testingmcafeesites.com/testcat_al.html?cookieStore=#flowCookieStore&throwExceptionOnFailure=true&maxTotalConnections=20&connectionsPerRoute=2"/>
>  {code}
> I get the following error:
> {code:java}
> Failed to create route HTTP_TEST at: >>> 
> To[http://www.testingmcafeesites.com/testcat_al.html?cookieStore=#flowCookieStore&throwExceptionOnFailure=true&maxTotalConnections=20&connectionsPerRoute=2]
>  <<< in route: 
> Route(ID_627a64ad38c74a00130006eb-ce173190-d08f-11ec-83f5-37... because of 
> Failed to resolve endpoint: 
> http://www.testingmcafeesites.com/testcat_al.html?connectionsPerRoute=2&cookieStore=%23flowCookieStore&maxTotalConnections=20&throwExceptionOnFailure=true
>  due to: Error binding property (cookieStore=#flowCookieStore) with name: 
> cookieStore on bean: 
> http://www.testingmcafeesites.com/testcat_al.html?maxTotalConnections=20&connectionsPerRoute=2&throwExceptionOnFailure=true&cookieStore=%23flowCookieStore
>  with value: #flowCookieStore",{code}
> When I remove the cookieStore property the route installs and runs normally. 
> The "#flowCookieStore" is binded to registry like it was in camel 3.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-20731) Route coverage fails on routes with multiple doCatch blocks

2024-05-02 Thread Adriano Machado (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-20731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843024#comment-17843024
 ] 

Adriano Machado commented on CAMEL-20731:
-

[~davsclaus] it fails using current 4.6.0-SNAPSHOT version.

> Route coverage fails on routes with multiple doCatch blocks
> ---
>
> Key: CAMEL-20731
> URL: https://issues.apache.org/jira/browse/CAMEL-20731
> Project: Camel
>  Issue Type: Bug
>  Components: tooling
>Affects Versions: 4.0.3
>Reporter: Adriano Machado
>Priority: Minor
>
> Routes containing `doTry` with multiple `doCatch` blocks fails when running 
> the code coverate mojo.  An example:
> ```
> 
>   
>   
>     
>     
>     
>       java.io.IOException
>       
>     
>     
>       java.lang.IllegalStateException
>       
>     
>     
>        
>     
>   
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CAMEL-20731) Route coverage fails on routes with multiple doCatch blocks

2024-05-02 Thread Adriano Machado (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-20731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adriano Machado updated CAMEL-20731:

Attachment: multiple-catch-blocks-reproducer.patch

> Route coverage fails on routes with multiple doCatch blocks
> ---
>
> Key: CAMEL-20731
> URL: https://issues.apache.org/jira/browse/CAMEL-20731
> Project: Camel
>  Issue Type: Bug
>  Components: tooling
>Affects Versions: 4.0.3
>Reporter: Adriano Machado
>Priority: Minor
> Attachments: multiple-catch-blocks-reproducer.patch
>
>
> Routes containing `doTry` with multiple `doCatch` blocks fails when running 
> the code coverate mojo.  An example:
> ```
> 
>   
>   
>     
>     
>     
>       java.io.IOException
>       
>     
>     
>       java.lang.IllegalStateException
>       
>     
>     
>        
>     
>   
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (CAMEL-20731) Route coverage fails on routes with multiple doCatch blocks

2024-05-02 Thread Adriano Machado (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-20731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843024#comment-17843024
 ] 

Adriano Machado edited comment on CAMEL-20731 at 5/2/24 5:13 PM:
-

[~davsclaus] it fails using current 4.6.0-SNAPSHOT version.

I attached a patch file on top of the camel-spring-boot-examples repository.

You can apply it and run `mvn test camel-report:route-coverage` to replicate 
the issue.


was (Author: ammachado):
[~davsclaus] it fails using current 4.6.0-SNAPSHOT version.

> Route coverage fails on routes with multiple doCatch blocks
> ---
>
> Key: CAMEL-20731
> URL: https://issues.apache.org/jira/browse/CAMEL-20731
> Project: Camel
>  Issue Type: Bug
>  Components: tooling
>Affects Versions: 4.0.3
>Reporter: Adriano Machado
>Priority: Minor
> Attachments: multiple-catch-blocks-reproducer.patch
>
>
> Routes containing `doTry` with multiple `doCatch` blocks fails when running 
> the code coverate mojo.  An example:
> ```
> 
>   
>   
>     
>     
>     
>       java.io.IOException
>       
>     
>     
>       java.lang.IllegalStateException
>       
>     
>     
>        
>     
>   
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CAMEL-20731) Route coverage fails on routes with multiple doCatch blocks

2024-05-02 Thread Adriano Machado (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-20731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adriano Machado updated CAMEL-20731:

Description: 
Routes containing `doTry` with multiple `doCatch` blocks fails when running the 
code coverate mojo.  An example:

 
{code:java}
http://camel.apache.org/schema/spring";>
    
        
        
            
            
                java.io.IOException
                
            
            
                java.lang.IllegalStateException
                
            
            
                
            
        
    
{code}
Applying the attached patch gives the following error message:

 

 
{noformat}
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.619 s 
-- in sample.camel.MultipleCatchBlocksTest
[INFO] Running sample.camel.SampleCamelApplicationTest
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.008 
s -- in sample.camel.SampleCamelApplicationTest
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1
[INFO]
[INFO]
[INFO] --- camel-report:4.6.0-SNAPSHOT:route-coverage (default-cli) @ 
camel-example-spring-boot-xml ---
[INFO] Discovered 2 routes
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  17.235 s
[INFO] Finished at: 2024-05-02T13:13:57-04:00
[INFO] 
[ERROR] Failed to execute goal 
org.apache.camel:camel-report-maven-plugin:4.6.0-SNAPSHOT:route-coverage 
(default-cli) on project camel-example-spring-boot-xml: Error during gathering 
route coverage data for route: multiple-catch-blocks: count is negative: -1 -> 
[Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException{noformat}
 

  was:
Routes containing `doTry` with multiple `doCatch` blocks fails when running the 
code coverate mojo.  An example:

```

  
  
    
    
    
      java.io.IOException
      
    
    
      java.lang.IllegalStateException
      
    
    
       
    
  
```


> Route coverage fails on routes with multiple doCatch blocks
> ---
>
> Key: CAMEL-20731
> URL: https://issues.apache.org/jira/browse/CAMEL-20731
> Project: Camel
>  Issue Type: Bug
>  Components: tooling
>Affects Versions: 4.0.3
>Reporter: Adriano Machado
>Priority: Minor
> Attachments: multiple-catch-blocks-reproducer.patch
>
>
> Routes containing `doTry` with multiple `doCatch` blocks fails when running 
> the code coverate mojo.  An example:
>  
> {code:java}
> http://camel.apache.org/schema/spring";>
>     
>         
>         
>             
>             
>                 java.io.IOException
>                 
>             
>             
>                 java.lang.IllegalStateException
>                 
>             
>             
>                 
>             
>         
>     
> {code}
> Applying the attached patch gives the following error message:
>  
>  
> {noformat}
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.619 
> s -- in sample.camel.MultipleCatchBlocksTest
> [INFO] Running sample.camel.SampleCamelApplicationTest
> [WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 
> 0.008 s -- in sample.camel.SampleCamelApplicationTest
> [INFO]
> [INFO] Results:
> [INFO]
> [WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1
> [INFO]
> [INFO]
> [INFO] --- camel-report:4.6.0-SNAPSHOT:route-coverage (default-cli) @ 
> camel-example-spring-boot-xml ---
> [INFO] Discovered 2 routes
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  17.235 s
> [INFO] Finished at: 2024-05-02T13:13:57-04:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.camel:camel-report-maven-plugin:4.6.0-SNAPSHOT:route-coverage 
> (default-cli) on project camel-example-spring-boot-xml: Error during 
> gathering route coverage data for route: multiple-catch-blocks: count is 
> negative: -1 -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ER

[jira] [Updated] (CAMEL-20731) Route coverage fails on routes with multiple doCatch blocks

2024-05-02 Thread Adriano Machado (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-20731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adriano Machado updated CAMEL-20731:

Description: 
Routes containing `doTry` with multiple `doCatch` blocks fails when running the 
code coverage mojo.  An example:
{code:java}
http://camel.apache.org/schema/spring";>
    
        
        
            
            
                java.io.IOException
                
            
            
                java.lang.IllegalStateException
                
            
            
                
            
        
    
{code}
Applying the attached patch gives the following error message:
{noformat}
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.619 s 
-- in sample.camel.MultipleCatchBlocksTest
[INFO] Running sample.camel.SampleCamelApplicationTest
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.008 
s -- in sample.camel.SampleCamelApplicationTest
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1
[INFO]
[INFO]
[INFO] --- camel-report:4.6.0-SNAPSHOT:route-coverage (default-cli) @ 
camel-example-spring-boot-xml ---
[INFO] Discovered 2 routes
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  17.235 s
[INFO] Finished at: 2024-05-02T13:13:57-04:00
[INFO] 
[ERROR] Failed to execute goal 
org.apache.camel:camel-report-maven-plugin:4.6.0-SNAPSHOT:route-coverage 
(default-cli) on project camel-example-spring-boot-xml: Error during gathering 
route coverage data for route: multiple-catch-blocks: count is negative: -1 -> 
[Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException{noformat}
 

  was:
Routes containing `doTry` with multiple `doCatch` blocks fails when running the 
code coverate mojo.  An example:

 
{code:java}
http://camel.apache.org/schema/spring";>
    
        
        
            
            
                java.io.IOException
                
            
            
                java.lang.IllegalStateException
                
            
            
                
            
        
    
{code}
Applying the attached patch gives the following error message:

 

 
{noformat}
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.619 s 
-- in sample.camel.MultipleCatchBlocksTest
[INFO] Running sample.camel.SampleCamelApplicationTest
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.008 
s -- in sample.camel.SampleCamelApplicationTest
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1
[INFO]
[INFO]
[INFO] --- camel-report:4.6.0-SNAPSHOT:route-coverage (default-cli) @ 
camel-example-spring-boot-xml ---
[INFO] Discovered 2 routes
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  17.235 s
[INFO] Finished at: 2024-05-02T13:13:57-04:00
[INFO] 
[ERROR] Failed to execute goal 
org.apache.camel:camel-report-maven-plugin:4.6.0-SNAPSHOT:route-coverage 
(default-cli) on project camel-example-spring-boot-xml: Error during gathering 
route coverage data for route: multiple-catch-blocks: count is negative: -1 -> 
[Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException{noformat}
 


> Route coverage fails on routes with multiple doCatch blocks
> ---
>
> Key: CAMEL-20731
> URL: https://issues.apache.org/jira/browse/CAMEL-20731
> Project: Camel
>  Issue Type: Bug
>  Components: tooling
>Affects Versions: 4.0.3
>Reporter: Adriano Machado
>Priority: Minor
> Attachments: multiple-catch-blocks-reproducer.patch
>
>
> Routes containing `doTry` with multiple `doCatch` blocks fails when running 
> the code coverage mojo.  An example:
> {code:java}
> http://camel.apache.org/schema/spring";>
>     
> 

[jira] [Comment Edited] (CAMEL-20514) camel-model - Add support for bean constructors for beans in route templates or kamelets

2024-05-02 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-20514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842947#comment-17842947
 ] 

Claus Ibsen edited comment on CAMEL-20514 at 5/2/24 8:20 PM:
-

TODO: add constructors, factory bean/method, builder bean/method to kamelet 
beans *DONE*
TODO: see if we can merge model for registry bean and kamelet bean into the 
same model/class instead of duplicates *DONE*
TODO: rename RegistryBeanDefinition to a BeanInstanceDefinition
TODO: upgrade doc


was (Author: davsclaus):
TODO: add constructors, factory bean/method, builder bean/method to kamelet 
beans *DONE*
TODO: see if we can merge model for registry bean and kamelet bean into the 
same model/class instead of duplicates

> camel-model - Add support for bean constructors for beans in route templates 
> or kamelets
> 
>
> Key: CAMEL-20514
> URL: https://issues.apache.org/jira/browse/CAMEL-20514
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 4.6.0
>
>
> https://github.com/apache/camel-karavan/discussions/1154



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (CAMEL-20514) camel-model - Add support for bean constructors for beans in route templates or kamelets

2024-05-02 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-20514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842947#comment-17842947
 ] 

Claus Ibsen edited comment on CAMEL-20514 at 5/3/24 5:48 AM:
-

TODO: add constructors, factory bean/method, builder bean/method to kamelet 
beans *DONE*
TODO: see if we can merge model for registry bean and kamelet bean into the 
same model/class instead of duplicates *DONE*
TODO: rename RegistryBeanDefinition to a BeanFactoryDefinition *DONE*
TODO: upgrade doc


was (Author: davsclaus):
TODO: add constructors, factory bean/method, builder bean/method to kamelet 
beans *DONE*
TODO: see if we can merge model for registry bean and kamelet bean into the 
same model/class instead of duplicates *DONE*
TODO: rename RegistryBeanDefinition to a BeanInstanceDefinition
TODO: upgrade doc

> camel-model - Add support for bean constructors for beans in route templates 
> or kamelets
> 
>
> Key: CAMEL-20514
> URL: https://issues.apache.org/jira/browse/CAMEL-20514
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 4.6.0
>
>
> https://github.com/apache/camel-karavan/discussions/1154



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (CAMEL-20514) camel-model - Add support for bean constructors for beans in route templates or kamelets

2024-05-02 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-20514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842947#comment-17842947
 ] 

Claus Ibsen edited comment on CAMEL-20514 at 5/3/24 6:52 AM:
-

TODO: add constructors, factory bean/method, builder bean/method to kamelet 
beans *DONE*
TODO: see if we can merge model for registry bean and kamelet bean into the 
same model/class instead of duplicates *DONE*
TODO: rename RegistryBeanDefinition to a BeanFactoryDefinition *DONE*
TODO: upgrade doc *DONE*


was (Author: davsclaus):
TODO: add constructors, factory bean/method, builder bean/method to kamelet 
beans *DONE*
TODO: see if we can merge model for registry bean and kamelet bean into the 
same model/class instead of duplicates *DONE*
TODO: rename RegistryBeanDefinition to a BeanFactoryDefinition *DONE*
TODO: upgrade doc

> camel-model - Add support for bean constructors for beans in route templates 
> or kamelets
> 
>
> Key: CAMEL-20514
> URL: https://issues.apache.org/jira/browse/CAMEL-20514
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 4.6.0
>
>
> https://github.com/apache/camel-karavan/discussions/1154



--
This message was sent by Atlassian Jira
(v8.20.10#820010)