[
https://issues.apache.org/jira/browse/KARAF-5328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Baptiste Onofré resolved KARAF-5328.
-----------------------------------------
Resolution: Fixed
> NPE is thrown when execute source command from client/ssh
> ---------------------------------------------------------
>
> Key: KARAF-5328
> URL: https://issues.apache.org/jira/browse/KARAF-5328
> Project: Karaf
> Issue Type: Bug
> Components: karaf-shell
> Affects Versions: 4.1.2
> Environment: Java 8, Windows 7
> Reporter: Xilai Dai
> Assignee: Jean-Baptiste Onofré
> Fix For: 4.2.0, 4.1.3
>
>
> The NullPointerException is thrown when execute source command with a
> relative path as argument from client/ssh, e.g
> >client.bat -h localhost source scripts/abc.script
> {code}
> 2017-08-30T14:48:25,935 | ERROR | Thread-133 |
> he.karaf.shell.support.ShellUtil 149 | 107 - org.apache.karaf.shell.core -
> 4.1.2 | Exception caught while executing command
> java.lang.NullPointerException: null
> at
> org.apache.karaf.shell.commands.impl.SourceAction.execute(SourceAction.java:71)
> [105:org.apache.karaf.shell.commands:4.1.2]
> at
> org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
> [107:org.apache.karaf.shell.core:4.1.2]
> at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
> [107:org.apache.karaf.shell.core:4.1.2]
> at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
> [107:org.apache.karaf.shell.core:4.1.2]
> at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571)
> [107:org.apache.karaf.shell.core:4.1.2]
> at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497)
> [107:org.apache.karaf.shell.core:4.1.2]
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386)
> [107:org.apache.karaf.shell.core:4.1.2]
> at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417)
> [107:org.apache.karaf.shell.core:4.1.2]
> at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)
> [107:org.apache.karaf.shell.core:4.1.2]
> at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)
> [107:org.apache.karaf.shell.core:4.1.2]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [?:?]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [?:?]
> at java.lang.Thread.run(Thread.java:745) [?:?]
> {code}
> After debugging, the root cause maybe the L82 of
> org.apache.karaf.shell.impl.console.HeadlessSessionImpl class
> {code}
> session.currentDir(null);
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)