You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Matthew Robson (Jira)" <ji...@apache.org> on 2024/09/18 14:05:00 UTC
[jira] [Commented] (CAMEL-21239) camel-report-maven-plugin - NPE if route does not have id
[ https://issues.apache.org/jira/browse/CAMEL-21239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17882729#comment-17882729 ]
Matthew Robson commented on CAMEL-21239:
----------------------------------------
[~davsclaus] I am not sure this fix [1] is the root cause of the regression.
[1] https://github.com/apache/camel/commit/e8c8cdbfa811762785d872a9fd7977afadb0e267
Camel 4.0.x works with camel-report-maven-plugin 4.4.3... but camel 4.4.x does not... so something else changed in core... I see the doc text calls out:
{code}
IMPORTANT: Routes that can be route coveraged **MUST** have a unique id assigned, in other words you cannot use anonymous routes.
But this was not actually the case. It was working with anonymous routes.
{code}
But this was not actually the case. It was previously working with anonymous routes.
Starting with 4.3.x, I can see:
{code}
[WARNING] No route coverage data found for route: hello-1. Make sure to enable route coverage in your unit tests and assign unique route ids to your routes. Also remember to run unit tests first.
[WARNING] No route coverage data found for route: hello-2. Make sure to enable route coverage in your unit tests and assign unique route ids to your routes. Also remember to run unit tests first.
{code}
> camel-report-maven-plugin - NPE if route does not have id
> ---------------------------------------------------------
>
> Key: CAMEL-21239
> URL: https://issues.apache.org/jira/browse/CAMEL-21239
> Project: Camel
> Issue Type: Bug
> Components: tooling
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.4.4, 4.8.1, 4.9.0
>
>
> Caused by: java.lang.NullPointerException: Cannot invoke "org.w3c.dom.Node.getNodeValue()" because the return value of "org.w3c.dom.NamedNodeMap.getNamedItem(String)" is null
> at org.apache.camel.parser.helper.RouteCoverageHelper.parseDumpRouteCoverageByRouteId (RouteCoverageHelper.java:70)
> at org.apache.camel.maven.RouteCoverageMojo.grabDumpData (RouteCoverageMojo.java:263)
> at org.apache.camel.maven.RouteCoverageMojo.execute (RouteCoverageMojo.java:228)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)