Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68871

NullPointerException when using Personal Access Token

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.303.3
      Java 11
      Web Browser Mozilla Firefox 91.0
      confluence-publisher 2.0.6

      I'm trying to configure a Confluence sites using a blank username + PAT token as password. 

      When I test the connection using Jenkins GUI I get a "SUCCESS" message, but when I execute my pipeline I receive a NullPointerException:

      java.lang.NullPointerException
      	at com.atlassian.confluence.rest.client.AbstractRemoteContentService$AbstractRemoteContentFinder.withSpace(AbstractRemoteContentService.java:98)
      	at com.atlassian.confluence.rest.client.RemoteContentServiceImpl$RemoteContentFinderImpl.withSpace(RemoteContentServiceImpl.java:35)
      	at com.myyearbook.hudson.plugins.confluence.ConfluenceSession.getContent(ConfluenceSession.java:148)
      	at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.perform(ConfluencePublisher.java:387)
      	at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:100)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:70)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:750)
      

      When I use username+password with same source code, everything goes well and my changes are uploaded to confluence correctly.

            jhansche Joe Hansche
            fabriziosta Fabrizio Asta
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: