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

Empty password in JCR Endpoint URI causes NPE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.12.4, 2.13.1, 2.14.0
    • Component/s: camel-jcr
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Leaving the password empty in a Camel JCR Endpoint URI (e.g. "jcr://gregor:@repository/home") leads to NullPointerExceptions. Empty passwords are valid when used with Jackrabbit's SimpleSecurityManager and useful for testing.

      Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: jcr://gregor:@repository/home/test due to: null
      	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:534)
      	at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:71)
      	at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:190)
      	at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106)
      	at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
      	at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
      	at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
      	at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:499)
      	at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:212)
      	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:907)
      	... 38 more
      Caused by: java.lang.NullPointerException
      	at org.apache.camel.component.jcr.JcrEndpoint.<init>(JcrEndpoint.java:60)
      	at org.apache.camel.component.jcr.JcrComponent.createEndpoint(JcrComponent.java:31)
      	at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:123)
      	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:514)
      	... 47 more
      

        Attachments

          Activity

            People

            • Assignee:
              gzurowski Gregor Zurowski
              Reporter:
              gzurowski Gregor Zurowski
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: