karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4867) java.lang.NullPointerException during instance creation
Date Tue, 29 Nov 2016 12:21:58 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15705170#comment-15705170
] 

Guillaume Nodet commented on KARAF-4867:
----------------------------------------

I forgot a file during the KARAF-4863 commit, hence the NPE.

> java.lang.NullPointerException during instance creation
> -------------------------------------------------------
>
>                 Key: KARAF-4867
>                 URL: https://issues.apache.org/jira/browse/KARAF-4867
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-instance
>    Affects Versions: 4.1.0
>            Reporter: Jens Offenbach
>
> Instance creation with Karaf 4.1.0-SNAPSHOT throws NullPointerException. Have a look
at the log output:
> {code}
> 2016-11-29T08:58:35,722 | DEBUG | Karaf ssh console user karaf | LoggingCommandSessionListener
   | 44 - org.apache.karaf.shell.core - 4.1.0.SNAPSHOT | Executing command: 'instance:create
test01'
> 2016-11-29T08:58:35,726 | INFO  | pipe-instance:create test01 | InstanceServiceImpl 
            | 32 - org.apache.karaf.instance.core - 4.1.0.SNAPSHOT | Creating new instance
on SSH port 8102 and registry port 1100 / RMI server port 44445 at: /opt/apache-karaf-4.1.0-SNAPSHOT/instances/test01
> 2016-11-29T08:58:35,729 | DEBUG | pipe-instance:create test01 | InstanceServiceImpl 
            | 32 - org.apache.karaf.instance.core - 4.1.0.SNAPSHOT | Creating file: /opt/apache-karaf-4.1.0-SNAPSHOT/instances/test01/etc/org.apache.karaf.jaas.cfg
> 2016-11-29T08:58:35,731 | DEBUG | Karaf ssh console user karaf | LoggingCommandSessionListener
   | 44 - org.apache.karaf.shell.core - 4.1.0.SNAPSHOT | Command: 'instance:create test01'
failed: java.lang.NullPointerException
> 2016-11-29T08:58:35,732 | ERROR | Karaf ssh console user karaf | ShellUtil          
             | 44 - org.apache.karaf.shell.core - 4.1.0.SNAPSHOT | Exception caught while
executing command
> java.lang.NullPointerException
>         at java.io.Reader.<init>(Reader.java:78) [?:?]
>         at java.io.InputStreamReader.<init>(InputStreamReader.java:72) [?:?]
>         at java.util.Scanner.<init>(Scanner.java:563) [?:?]
>         at org.apache.karaf.instance.core.internal.InstanceServiceImpl.copyStream(InstanceServiceImpl.java:1126)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.core.internal.InstanceServiceImpl.copyResourceToDir(InstanceServiceImpl.java:1088)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.core.internal.InstanceServiceImpl.copyResourcesToDir(InstanceServiceImpl.java:1076)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.core.internal.InstanceServiceImpl.access$500(InstanceServiceImpl.java:64)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.core.internal.InstanceServiceImpl$2.call(InstanceServiceImpl.java:335)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.core.internal.InstanceServiceImpl$2.call(InstanceServiceImpl.java:270)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.core.internal.InstanceServiceImpl$1.call(InstanceServiceImpl.java:234)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.util.locks.FileLockUtils$2.call(FileLockUtils.java:103) [32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.util.locks.FileLockUtils.execute(FileLockUtils.java:69) [32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.util.locks.FileLockUtils.execute(FileLockUtils.java:97) [32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.core.internal.InstanceServiceImpl.execute(InstanceServiceImpl.java:231)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.core.internal.InstanceServiceImpl.createInstance(InstanceServiceImpl.java:270)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.command.CreateCommand.doExecute(CreateCommand.java:125)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.instance.command.InstanceCommandSupport.execute(InstanceCommandSupport.java:90)
[32:org.apache.karaf.instance.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
[44:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)
[44:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
>         at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:82)
[44:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:548) [44:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:474) [44:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:363) [44:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) [44:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:227) [44:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) [44:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
>         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 same debugging, I found out that because of KARAR-4863 the file "jmx.acl.cfg" no
longer gets added to the bundle "org.apache.karaf.instance.core-4.1.0-SNAPSHOT.jar" resulting
in a NullPointerException.
> I am not sure, but I think the entry "etc/jmx.acl.cfg" must be removed from the "resources"
array defined in "org.apache.karaf.instance.core.internal.InstanceServiceImpl". Can someone
please check if there a more resource declarations that must be removed from the array to
get "instance:create" working.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message