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

java.lang.NullPointerException: Cannot invoke "org.apache.camel.model.FromDefinition.getLabel()" because "this.input" is null

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      Running a file with content (tried with Camel JBang 3.20.6):

      apiVersion: camel.apache.org/v1alpha1
      kind: KameletBinding
      metadata:
        name: ''
      spec:
        source:
          ref:
            apiVersion: camel.apache.org/v1alpha1
            name: timer-source
            kind: Kamelet
        steps:
        - ref:
            apiVersion: camel.apache.org/v1alpha1
            name: log-action
            kind: Kamelet
      

      leads to a NPE:

      java.lang.NullPointerException: Cannot invoke "org.apache.camel.model.FromDefinition.getLabel()" because "this.input" is null
              at org.apache.camel.model.RouteDefinition.getLabel(RouteDefinition.java:171)
              at org.apache.camel.impl.PreconditionHelper.included(PreconditionHelper.java:51)
              at org.apache.camel.impl.DefaultCamelContext.includedRoute(DefaultCamelContext.java:1062)
              at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:927)
              at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:800)
              at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:3017)
              at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
              at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2688)
              at org.apache.camel.support.service.BaseService.start(BaseService.java:111)
              at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2707)
              at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:262)
              at org.apache.camel.main.KameletMain.doStart(KameletMain.java:280)
              at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
              at org.apache.camel.dsl.jbang.core.commands.Run.runKameletMain(Run.java:784)
              at org.apache.camel.dsl.jbang.core.commands.Run.run(Run.java:592)
              at org.apache.camel.dsl.jbang.core.commands.Run.doCall(Run.java:232)
              at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:73)
              at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:36)
              at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
              at picocli.CommandLine.access$1500(CommandLine.java:148)
              at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
              at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
              at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
              at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
              at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
              at picocli.CommandLine.execute(CommandLine.java:2170)
              at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:154)
              at main.CamelJBang.main(CamelJBang.java:36)
       

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            apupier Aurélien Pupier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: