java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • WS7 & NB 6.5?
    via by wgkorb-JavaNet,
  • My Sonar Analyzes via Hudson Sonar Plugin crash with following message since i installed sonar pdf plugin. INFO] [pdfreport:generate {execution: default-cli}] [INFO] Team workbook report type selected [INFO] Retrieving project info for de.gruppe:planner [ERROR] Can't access to Sonar or project doesn't exist on Sonar instance. HTTP KO to http://localhost/sonar/api/resources?resource=de.gruppe:planner&depth=0&format=xml java.io.IOException: Can't access to Sonar or project doesn't exist on Sonar instance. at org.sonar.report.pdf.util.SonarAccess.getUrlAsDocument(SonarAccess.java:110) at org.sonar.report.pdf.entity.Project.initializeProject(Project.java:124) at org.sonar.report.pdf.PDFReporter.getProject(PDFReporter.java:114) at org.sonar.report.pdf.PDFReporter.getReport(PDFReporter.java:71) at org.sonar.report.pdf.mojo.SonarPDFMojo.execute(SonarPDFMojo.java:162) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.sonar.maven2.Maven2PluginExecutor.execute(Maven2PluginExecutor.java:65) at org.sonar.maven2.Maven2PluginExecutor.execute(Maven2PluginExecutor.java:47) at org.sonar.batch.PostJobsExecutor.executeMavenPlugin(PostJobsExecutor.java:77) at org.sonar.batch.PostJobsExecutor.execute(PostJobsExecutor.java:56) at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59) at org.sonar.batch.Batch.analyzeProject(Batch.java:120) at org.sonar.batch.Batch.analyzeProjects(Batch.java:83) at org.sonar.batch.Batch.execute(Batch.java:58) at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:142) at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:133) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NullPointerException at java.io.FileInputStream.<init>(FileInputStream.java:103) at org.sonar.report.pdf.batch.PDFPostJob.loadFile(PDFPostJob.java:107) at org.sonar.report.pdf.batch.PDFPostJob.executeOn(PDFPostJob.java:79) at org.sonar.batch.PostJobsExecutor.execute(PostJobsExecutor.java:57) at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59) at org.sonar.batch.Batch.analyzeProject(Batch.java:120) at org.sonar.batch.Batch.analyzeProjects(Batch.java:83) at org.sonar.batch.Batch.execute(Batch.java:58) at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:142) at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:133) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) ... 21 more [INFO] ------------------------------------------------------------------------
    via by cforce,
  • Reproduction steps: 1) Create a new job using Subversion and set the Repository URL to a repository which requires SSL authentication 2) See the error message under the Repository URL field: "Unable to access https://svn.zynga.com/svn/pets/game/branches/amanda : svn: Unknown error (show details) (Maybe you need to enter credential?)" 3) Ignore this error and click "Save" at the bottom of the page so that the Repository URL is saved (this is a work-around for http://issues.jenkins-ci.org/browse/JENKINS-5348) 4) Enter the configuration page for this job again 5) View the error message under the Repository URL field and click "enter credential" 6) Select the "HTTPS client certificate" radio button, browse to the certificate file on your local filesystem, enter its password, click OK 7) View message "Authentication was successful. Information is stored in Hudson now." (thanks to the fix for http://issues.jenkins-ci.org/browse/JENKINS-5230, this part works correctly now) 8) Go to the dashboard, click "build now" for the job you just created 9) See that it fails with the following error: {noformat} Started by user amanda Checking out a fresh workspace because /zynga/home/deploy/.hudson/jobs/test-flash-amanda-2/workspace/amanda doesn't exist Checking out https://svn.zynga.com/svn/pets/game/branches/amanda ERROR: Failed to check out https://svn.zynga.com/svn/pets/game/branches/amanda org.tmatesoft.svn.core.SVNException: svn: Unknown error at org.tmatesoft.svn.core.internal.io.dav.http.HTTPSSLKeyManager.acknowledgeAndClearAuthentication(HTTPSSLKeyManager.java:231) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:368) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:273) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:261) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1001) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:178) at org.tmatesoft.svn.core.wc.SVNBasicClient.getRevisionNumber(SVNBasicClient.java:482) at org.tmatesoft.svn.core.wc.SVNBasicClient.getLocations(SVNBasicClient.java:851) at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:534) at org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout(SVNUpdateClient.java:893) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:673) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:593) at hudson.FilePath.act(FilePath.java:676) at hudson.FilePath.act(FilePath.java:660) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:586) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:534) at hudson.model.AbstractProject.checkout(AbstractProject.java:1011) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:485) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1193) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Caused by: java.lang.NullPointerException at java.io.FileInputStream.<init>(FileInputStream.java:103) at org.tmatesoft.svn.core.auth.SVNSSLAuthentication.<init>(SVNSSLAuthentication.java:46) at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager$PersistentAuthenticationProvider.requestClientAuthentication(DefaultSVNAuthenticationManager.java:502) at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getFirstAuthentication(DefaultSVNAuthenticationManager.java:159) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPSSLKeyManager.initialize(HTTPSSLKeyManager.java:255) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPSSLKeyManager.initializeNoException(HTTPSSLKeyManager.java:237) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPSSLKeyManager.chooseClientAlias(HTTPSSLKeyManager.java:131) at com.sun.net.ssl.internal.ssl.AbstractWrapper.chooseClientAlias(SSLContextImpl.java:262) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:500) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:197) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:623) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.sendData(HTTPConnection.java:226) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:166) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:345) ... 23 more Finished: FAILURE {noformat} More exploration: 10) Navigate back to the job configure page for the job you just created 11) View that the error message from step #2 is again visible, even though you entered the SSL creds and successfully authenticated. This is closely related to JENKINS-5348, but the difference is that JENKINS-5348 doesn't save the Repository URL after a successful first authentication, and this bug demonstrates that the SSL credential file and password are not saved, even when you do a work-around to get the Repository URL to save. I suspect that there needs to be a "save" step completed after the first successful authentication, which should save the Repository URL, the SSL certificate file, and the password for that file. This way, the credentials entered can be used to access the repository and build the project.
    via by awixted,
  • mdimport fails in exported ant script
    via by 666705,
    • java.lang.NullPointerException at java.io.FileInputStream.<init>(FileInputStream.java:103) at org.netbeans.modules.j2ee.sun.ws7.dm.WS70SunDeploymentManager.distribute(WS70SunDeploymentManager.java:238) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:609) at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor204.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:273) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:499) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)

    Users with the same issue

    bpbhat77bpbhat77
    4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    serious2monkeysserious2monkeys
    122 times, last one,