-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
copy-data-to-workspace version 1.0
There is a Null pointer exception, when the “Path to folder point” to a directory which doesn’t exists
Console output (if directory doesn’t exists)
Started by user anonymous
Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug
FATAL: null
java.lang.NullPointerException
at hpi.CopyDataToWorkspacePlugin.saveNames(CopyDataToWorkspacePlugin.java:164)
at hpi.CopyDataToWorkspacePlugin.setUp(CopyDataToWorkspacePlugin.java:92)
at hudson.model.Build$BuildExecution.doRun(Build.java:154)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536)
at hudson.model.Run.execute(Run.java:1718)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Console output (if directory does exists)
Started by user anonymous
Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug
Collecting metadata...
Metadata collection done.
Finished: SUCCESS
I traced to problem back to line 164 of Code.java
- this.copiedFiles = new String[children.size()];
+ this.copiedFiles = new String[children != null ? children.size() : 0];
It is probably a good idea to show some kind of error message to the user, that the configured folder does not exist, but I do not know how to do that.
[JENKINS-27083] null pointer exception in when directory doesnt exists, plugin: copy-data-to-workspace
Attachment | New: screenshot1.PNG [ 28644 ] | |
Description |
Original:
NullPointerException when directory configured in Path to folder Doesn't exists. please refer the attachements. |
New:
*Null pointer exception when the “Path to folder point” to a directory which doesn’t exists* *Console output (if directory doesn’t exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug FATAL: null java.lang.NullPointerException at hpi.CopyDataToWorkspacePlugin.saveNames(CopyDataToWorkspacePlugin.java:164) at hpi.CopyDataToWorkspacePlugin.setUp(CopyDataToWorkspacePlugin.java:92) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1718) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) {quote} *Console output (if directory does exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug Collecting metadata... Metadata collection done. Finished: SUCCESS {quote} *I traced to problem back to line 164 of Code.java* {quote} (-) this.copiedFiles = new String[children.size()]; (+) if(children== null) (+) \{ (+) throw exception (“Path described doesn’t exist ”); (+) \} (+) this.copiedFiles = new String[children.size()]; {quote} |
Description |
Original:
*Null pointer exception when the “Path to folder point” to a directory which doesn’t exists* *Console output (if directory doesn’t exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug FATAL: null java.lang.NullPointerException at hpi.CopyDataToWorkspacePlugin.saveNames(CopyDataToWorkspacePlugin.java:164) at hpi.CopyDataToWorkspacePlugin.setUp(CopyDataToWorkspacePlugin.java:92) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1718) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) {quote} *Console output (if directory does exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug Collecting metadata... Metadata collection done. Finished: SUCCESS {quote} *I traced to problem back to line 164 of Code.java* {quote} (-) this.copiedFiles = new String[children.size()]; (+) if(children== null) (+) \{ (+) throw exception (“Path described doesn’t exist ”); (+) \} (+) this.copiedFiles = new String[children.size()]; {quote} |
New:
*Null pointer exception when the “Path to folder point” to a directory which doesn’t exists* !https://issues.jenkins-ci.org/secure/attachment/28644/screenshot1.PNG! *Console output (if directory doesn’t exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug FATAL: null java.lang.NullPointerException at hpi.CopyDataToWorkspacePlugin.saveNames(CopyDataToWorkspacePlugin.java:164) at hpi.CopyDataToWorkspacePlugin.setUp(CopyDataToWorkspacePlugin.java:92) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1718) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) {quote} *Console output (if directory does exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug Collecting metadata... Metadata collection done. Finished: SUCCESS {quote} *I traced to problem back to line 164 of Code.java* {quote} (-) this.copiedFiles = new String[children.size()]; (+) if(children== null) (+) \{ (+) throw exception (“Path described doesn’t exist ”); (+) \} (+) this.copiedFiles = new String[children.size()]; {quote} |
Description |
Original:
*Null pointer exception when the “Path to folder point” to a directory which doesn’t exists* !https://issues.jenkins-ci.org/secure/attachment/28644/screenshot1.PNG! *Console output (if directory doesn’t exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug FATAL: null java.lang.NullPointerException at hpi.CopyDataToWorkspacePlugin.saveNames(CopyDataToWorkspacePlugin.java:164) at hpi.CopyDataToWorkspacePlugin.setUp(CopyDataToWorkspacePlugin.java:92) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1718) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) {quote} *Console output (if directory does exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug Collecting metadata... Metadata collection done. Finished: SUCCESS {quote} *I traced to problem back to line 164 of Code.java* {quote} (-) this.copiedFiles = new String[children.size()]; (+) if(children== null) (+) \{ (+) throw exception (“Path described doesn’t exist ”); (+) \} (+) this.copiedFiles = new String[children.size()]; {quote} |
New:
*There is a Null pointer exception, when the “Path to folder point” to a directory which doesn’t exists* !https://issues.jenkins-ci.org/secure/attachment/28644/screenshot1.PNG! *Console output (if directory doesn’t exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug FATAL: null java.lang.NullPointerException at hpi.CopyDataToWorkspacePlugin.saveNames(CopyDataToWorkspacePlugin.java:164) at hpi.CopyDataToWorkspacePlugin.setUp(CopyDataToWorkspacePlugin.java:92) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1718) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) {quote} *Console output (if directory does exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug Collecting metadata... Metadata collection done. Finished: SUCCESS {quote} *I traced to problem back to line 164 of Code.java* {quote} - this.copiedFiles = new String[children.size()]; + this.copiedFiles = new String[children != null ? children.size() : 0]; {quote} It is probably a good idea to show some kind of error message to the user, that the configured folder does not exist, but I do not know how to do that. |
Description |
Original:
*There is a Null pointer exception, when the “Path to folder point” to a directory which doesn’t exists* !https://issues.jenkins-ci.org/secure/attachment/28644/screenshot1.PNG! *Console output (if directory doesn’t exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug FATAL: null java.lang.NullPointerException at hpi.CopyDataToWorkspacePlugin.saveNames(CopyDataToWorkspacePlugin.java:164) at hpi.CopyDataToWorkspacePlugin.setUp(CopyDataToWorkspacePlugin.java:92) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1718) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) {quote} *Console output (if directory does exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug Collecting metadata... Metadata collection done. Finished: SUCCESS {quote} *I traced to problem back to line 164 of Code.java* {quote} - this.copiedFiles = new String[children.size()]; + this.copiedFiles = new String[children != null ? children.size() : 0]; {quote} It is probably a good idea to show some kind of error message to the user, that the configured folder does not exist, but I do not know how to do that. |
New:
*There is a Null pointer exception, when the “Path to folder point” to a directory which doesn’t exists* !https://issues.jenkins-ci.org/secure/attachment/28644/screenshot1.PNG! *Console output (if directory doesn’t exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug FATAL: null java.lang.NullPointerException at hpi.CopyDataToWorkspacePlugin.saveNames(CopyDataToWorkspacePlugin.java:164) at hpi.CopyDataToWorkspacePlugin.setUp(CopyDataToWorkspacePlugin.java:92) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1718) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) {quote} *Console output (if directory does exists)* {quote} Started by user anonymous Building remotely on dem6894 (RanorexTestPC) in workspace d:\JenkinsSlaveRoot\workspace\Debug Collecting metadata... Metadata collection done. Finished: SUCCESS {quote} *I traced to problem back to line 164 of Code.java* {quote} \- this.copiedFiles = new String[children.size()]; + this.copiedFiles = new String[children != null ? children.size() : 0]; {quote} It is probably a good idea to show some kind of error message to the user, that the configured folder does not exist, but I do not know how to do that. |
Workflow | Original: JNJira [ 161276 ] | New: JNJira + In-Review [ 180639 ] |