Skip to content

[JENKINS-63355] NullPointerException while loading library #384

@jenkins-infra-bot

Description

@jenkins-infra-bot

I have a problem where if I have a globally configured shared library and I want to use it in a build I get the following error:

java.lang.NullPointerException
  at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:171)
  at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:154)
  at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
  at hudson.security.ACL.impersonate(ACL.java:367)
  at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at java.base/java.lang.Thread.run(Thread.java:834)

One workaround is to delete the library '...' line from the Jenkinsfile and make the shared lib implicitly included
The Jenkinsfile in question looks like this:
library 'tsc-pipelines@​master'
java()


Originally reported by rolaca11, imported from: NullPointerException while loading library
  • status: Open
  • priority: Critical
  • component(s): workflow-cps-global-lib-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 3
  • imported: 20251212-090250
Raw content of original issue

I have a problem where if I have a globally configured shared library and I want to use it in a build I get the following error:

java.lang.NullPointerException   at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:171)   at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:154)   at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)   at hudson.security.ACL.impersonate(ACL.java:367)   at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)   at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)   at java.base/java.lang.Thread.run(Thread.java:834)

One workaround is to delete the library '...' line from the Jenkinsfile and make the shared lib implicitly included The Jenkinsfile in question looks like this: library 'tsc-pipelines@master' java()

environment
Version: 2.235.3<br/>
Running on Docker<br/>
Running a bitbucket multibranch pipeline<br/>
The problem occurs in 2.235.1 as well, but it didn&#39;t happen 1-2 days and nothing I know has changed

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions