java.lang.NullPointerException

Jenkins JIRA | chrashoverraid | 8 years ago
  1. 0

    There seems to be a problem with the getProject method, when i call getProject a nullpointer is thrown. In this message you find the code i am using and the stacktrace public void doCheckDirectory(StaplerRequest req, StaplerResponse rsp, @QueryParameter final String value) throws IOException, ServletException { new FormFieldValidator.WorkspaceFilePath(req, rsp, true, true) { protected void check() throws IOException, ServletException { System.out.println("checking"); try { AbstractProject b = this.getProject(); } catch (Exception e) { error("exception " + e.getMessage()); e.printStackTrace(); } } }.process(); } checking java.lang.NullPointerException at java.util.StringTokenizer.<init>(Unknown Source) at java.util.StringTokenizer.<init>(Unknown Source) at hudson.model.Hudson.getItemByFullName(Hudson.java:1229) at hudson.util.FormFieldValidator$WorkspaceFilePath.getProject(FormFieldValidator.java:399) at hudson.plugins.qseplugin.QSETask$QSEDescriptor$2.check(QSETask.java:230) at hudson.util.FormFieldValidator.process(FormFieldValidator.java:77) at hudson.plugins.qseplugin.QSETask$QSEDescriptor.doCheckDirectory(QSETask.java:225) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:146) at org.kohsuke.stapler.Function.bindAndinvoke(Function.java:71) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:75) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:409) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:173) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:409) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:352) at org.kohsuke.stapler.Stapler.service(Stapler.java:112) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:61) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)

    Jenkins JIRA | 8 years ago | chrashoverraid
    java.lang.NullPointerException
  2. 0

    There seems to be a problem with the getProject method, when i call getProject a nullpointer is thrown. In this message you find the code i am using and the stacktrace public void doCheckDirectory(StaplerRequest req, StaplerResponse rsp, @QueryParameter final String value) throws IOException, ServletException { new FormFieldValidator.WorkspaceFilePath(req, rsp, true, true) { protected void check() throws IOException, ServletException { System.out.println("checking"); try { AbstractProject b = this.getProject(); } catch (Exception e) { error("exception " + e.getMessage()); e.printStackTrace(); } } }.process(); } checking java.lang.NullPointerException at java.util.StringTokenizer.<init>(Unknown Source) at java.util.StringTokenizer.<init>(Unknown Source) at hudson.model.Hudson.getItemByFullName(Hudson.java:1229) at hudson.util.FormFieldValidator$WorkspaceFilePath.getProject(FormFieldValidator.java:399) at hudson.plugins.qseplugin.QSETask$QSEDescriptor$2.check(QSETask.java:230) at hudson.util.FormFieldValidator.process(FormFieldValidator.java:77) at hudson.plugins.qseplugin.QSETask$QSEDescriptor.doCheckDirectory(QSETask.java:225) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:146) at org.kohsuke.stapler.Function.bindAndinvoke(Function.java:71) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:75) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:409) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:173) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:409) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:352) at org.kohsuke.stapler.Stapler.service(Stapler.java:112) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:61) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)

    Jenkins JIRA | 8 years ago | chrashoverraid
    java.lang.NullPointerException
  3. 0

    indexterm/keyword causees NullPointerException

    GitHub | 5 years ago | jelovirt
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error message: java.lang.NullPointerException

    Google Groups | 2 years ago | NI Based
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at java.util.StringTokenizer.<init>()
    2. Java RT
      StringTokenizer.<init>
      1. java.util.StringTokenizer.<init>(Unknown Source)
      2. java.util.StringTokenizer.<init>(Unknown Source)
      2 frames
    3. Hudson
      Hudson.getItemByFullName
      1. hudson.model.Hudson.getItemByFullName(Hudson.java:1229)
      1 frame