You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by peter lawrey <pe...@edgeci.com> on 2010/03/31 11:46:30 UTC

admin:create fails with NPE after different files.

Attempting to create an instance in the web console fails silently.

I have six instances already, I need to create another.

Is there any work around for this error?

 

karaf@root> admin:create cbs

Creating new instance on port 8102 at:
/app/servers/karaf1.0.0/instances/cbs

Creating file:
/app/servers/karaf1.0.0/instances/cbs/etc/org.ops4j.pax.url.mvn.cfg

Creating file:
/app/servers/karaf1.0.0/instances/cbs/etc/startup.properties

java.lang.NullPointerException

        at java.io.Reader.<init>(Reader.java:61)

        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)

        at java.util.Scanner.<init>(Scanner.java:590)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.copyResourc
eToDir(AdminServiceImpl.java:200)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.createInsta
nce(AdminServiceImpl.java:140)

        at
org.apache.felix.karaf.shell.admin.internal.commands.CreateCommand.doExe
cute(CreateCommand.java:41)

        at
org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
andSupport.java:41)

        at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
mand.java:34)

        at
org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
va:45)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)

        at
org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
a:146)

        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)

        at
org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
ssionImpl.java:71)

        at
org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)

        at java.lang.Thread.run(Thread.java:619)

karaf@root> admin:create cbs

Creating new instance on port 8103 at:
/app/servers/karaf1.0.0/instances/cbs

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/bin

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/etc

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/system

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/deploy

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/data

Creating file:
/app/servers/karaf1.0.0/instances/cbs/etc/config.properties

java.lang.NullPointerException

        at java.io.Reader.<init>(Reader.java:61)

        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)

        at java.util.Scanner.<init>(Scanner.java:590)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.copyResourc
eToDir(AdminServiceImpl.java:200)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.createInsta
nce(AdminServiceImpl.java:133)

        at
org.apache.felix.karaf.shell.admin.internal.commands.CreateCommand.doExe
cute(CreateCommand.java:41)

        at
org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
andSupport.java:41)

        at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
mand.java:34)

        at
org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
va:45)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)

        at
org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
a:146)

        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)

        at
org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
ssionImpl.java:71)

        at
org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)

        at java.lang.Thread.run(Thread.java:619)

karaf@root> admin:create cbs

Creating new instance on port 8104 at:
/app/servers/karaf1.0.0/instances/cbs

Creating file:
/app/servers/karaf1.0.0/instances/cbs/etc/java.util.logging.properties

java.lang.NullPointerException

        at java.io.Reader.<init>(Reader.java:61)

        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)

        at java.util.Scanner.<init>(Scanner.java:590)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.copyResourc
eToDir(AdminServiceImpl.java:200)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.createInsta
nce(AdminServiceImpl.java:134)

        at
org.apache.felix.karaf.shell.admin.internal.commands.CreateCommand.doExe
cute(CreateCommand.java:41)

        at
org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
andSupport.java:41)

        at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
mand.java:34)

        at
org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
va:45)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)

        at
org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
a:146)

        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)

        at
org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
ssionImpl.java:71)

        at
org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)

        at java.lang.Thread.run(Thread.java:619)

 


RE: admin:create fails with NPE after different files.

Posted by peter lawrey <pe...@edgeci.com>.
It appears it is unable to find the files to create a new instance, but
if the files already exist it doesn't try to do this.

So the work around was to copy the directory structure of an existing
instance and then use admin:create.

-----Original Message-----
From: peter lawrey [mailto:peter.lawrey@edgeci.com] 
Sent: 31 March 2010 10:47
To: users@felix.apache.org
Subject: admin:create fails with NPE after different files.

Attempting to create an instance in the web console fails silently.

I have six instances already, I need to create another.

Is there any work around for this error?

 

karaf@root> admin:create cbs

Creating new instance on port 8102 at:
/app/servers/karaf1.0.0/instances/cbs

Creating file:
/app/servers/karaf1.0.0/instances/cbs/etc/org.ops4j.pax.url.mvn.cfg

Creating file:
/app/servers/karaf1.0.0/instances/cbs/etc/startup.properties

java.lang.NullPointerException

        at java.io.Reader.<init>(Reader.java:61)

        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)

        at java.util.Scanner.<init>(Scanner.java:590)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.copyResourc
eToDir(AdminServiceImpl.java:200)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.createInsta
nce(AdminServiceImpl.java:140)

        at
org.apache.felix.karaf.shell.admin.internal.commands.CreateCommand.doExe
cute(CreateCommand.java:41)

        at
org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
andSupport.java:41)

        at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
mand.java:34)

        at
org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
va:45)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)

        at
org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
a:146)

        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)

        at
org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
ssionImpl.java:71)

        at
org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)

        at java.lang.Thread.run(Thread.java:619)

karaf@root> admin:create cbs

Creating new instance on port 8103 at:
/app/servers/karaf1.0.0/instances/cbs

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/bin

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/etc

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/system

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/deploy

Creating dir:  /app/servers/karaf1.0.0/instances/cbs/data

Creating file:
/app/servers/karaf1.0.0/instances/cbs/etc/config.properties

java.lang.NullPointerException

        at java.io.Reader.<init>(Reader.java:61)

        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)

        at java.util.Scanner.<init>(Scanner.java:590)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.copyResourc
eToDir(AdminServiceImpl.java:200)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.createInsta
nce(AdminServiceImpl.java:133)

        at
org.apache.felix.karaf.shell.admin.internal.commands.CreateCommand.doExe
cute(CreateCommand.java:41)

        at
org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
andSupport.java:41)

        at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
mand.java:34)

        at
org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
va:45)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)

        at
org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
a:146)

        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)

        at
org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
ssionImpl.java:71)

        at
org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)

        at java.lang.Thread.run(Thread.java:619)

karaf@root> admin:create cbs

Creating new instance on port 8104 at:
/app/servers/karaf1.0.0/instances/cbs

Creating file:
/app/servers/karaf1.0.0/instances/cbs/etc/java.util.logging.properties

java.lang.NullPointerException

        at java.io.Reader.<init>(Reader.java:61)

        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)

        at java.util.Scanner.<init>(Scanner.java:590)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.copyResourc
eToDir(AdminServiceImpl.java:200)

        at
org.apache.felix.karaf.shell.admin.internal.AdminServiceImpl.createInsta
nce(AdminServiceImpl.java:134)

        at
org.apache.felix.karaf.shell.admin.internal.commands.CreateCommand.doExe
cute(CreateCommand.java:41)

        at
org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
andSupport.java:41)

        at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
mand.java:34)

        at
org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
va:45)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)

        at
org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
a:146)

        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)

        at
org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
ssionImpl.java:71)

        at
org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)

        at java.lang.Thread.run(Thread.java:619)

 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org