I was able to previously create an instance with Karaf on Windows, but
can't seem to now on Karaf 4.2.5 or 4.2.6 (even if I do it with a fresh
karaf downloaded distribution).  I don't really get any useful info even
with debug.  If I use the bash shell on that same windows box, of course
the instance starts without any issue.  If there a way to get more
information why the instance can't start?  If it helps at all, I noticed
when doing instance:list, even the root instance shows as stopped, but
shows as started on linux.... Actually, it just dawned on me before hitting
send, on windows I'm using Java 11, but JDK 8 is what is installed in
ubuntu.  Is there any Java 11+ issues with instances on Windows? I'll
switch shortly and try jdk 8 and see what happens:

13:34:22.814 DEBUG [Karaf local console user karaf] Executing command:
'instance:start ld'
13:34:22.846 DEBUG [pipe-instance:start ld] Starting instance ld with
command: "C:\dev\java\jdk-11.0.4+11\bin\java.exe" -server -Xmx512M
-Dcom.sun.management.jmxremote -XX:+UnlockDiagnosticVMOptions   --add-opens
java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED --add-opens
java.base/java.util=ALL-UNNAMED --add-opens
java.naming/javax.naming.spi=ALL-UNNAMED --add-opens
java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED
--add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED
--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED
--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED --add-modules
java.xml.ws.annotation,java.corba,java.transaction,java.xml.bind,java.xml.ws
-Djava.util.logging.config.file="C:\dev\dist\target\assembly\instances\ld\etc\java.util.logging.properties"
-Dkaraf.home="C:\dev\dist\target\assembly"
-Dkaraf.base="C:\dev\dist\target\assembly\instances\ld"
-Dkaraf.data="C:\dev\dist\target\assembly\instances\ld\data"
-Dkaraf.etc="C:\dev\dist\target\assembly\instances\ld\etc"
-Dkaraf.log="C:\dev\dist\target\assembly\instances\ld\data\log"
-Djava.io.tmpdir="C:\dev\dist\target\assembly\instances\ld\data\tmp"
-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath
"C:\dev\dist\target\assembly\lib\boot\org.apache.karaf.diagnostic.boot-4.2.5.jar;C:\dev\dist\target\assembly\lib\boot\org.apache.karaf.jaas.boot-4.2.5.jar;C:\dev\dist\target\assembly\lib\boot\org.apache.karaf.main-4.2.5.jar;C:\dev\dist\target\assembly\lib\boot\org.apache.karaf.specs.activator-4.2.5.jar;C:\dev\dist\target\assembly\lib\boot\org.osgi.core-6.0.0.jar"
org.apache.karaf.main.Main server 13:34:23.032 DEBUG [Karaf local console
user karaf] Command: 'instance:start ld' failed:
org.apache.karaf.shell.support.MultiException: Error starting instance(s)
13:34:23.033 ERROR [Karaf local console user karaf] Exception caught while
executing command
org.apache.karaf.shell.support.MultiException: Error starting instance(s)
        at
org.apache.karaf.instance.command.StartCommand.doExecute(StartCommand.java:53)
~[?:?]
        at
org.apache.karaf.instance.command.InstanceCommandSupport.execute(InstanceCommandSupport.java:90)
~[?:?]
        at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
~[?:?]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
~[?:?]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
~[?:?]
        at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
        at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526)
~[?:?]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415)
~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
~[?:?]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
        Suppressed: java.lang.RuntimeException: java.io.IOException: Unable
to create process (error code: 1)
                at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.execute(InstanceServiceImpl.java:264)
~[?:?]
                at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.startInstance(InstanceServiceImpl.java:474)
~[?:?]
                at
org.apache.karaf.instance.core.internal.InstanceImpl.start(InstanceImpl.java:100)
~[?:?]
                at
org.apache.karaf.instance.command.StartCommand.doExecute(StartCommand.java:74)
~[?:?]
                at
org.apache.karaf.instance.command.InstanceCommandSupport.execute(InstanceCommandSupport.java:90)
~[?:?]
                at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
~[?:?]
                at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
~[?:?]
                at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
~[?:?]
                at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
                at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526)
~[?:?]
                at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
                at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416)
~[?:?]
                at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)
~[?:?]
                at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)
~[?:?]
                at java.util.concurrent.FutureTask.run(FutureTask.java:264)
~[?:?]
                at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
~[?:?]
                at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
~[?:?]
                at java.lang.Thread.run(Thread.java:834) [?:?]
        Caused by: java.io.IOException: Unable to create process (error
code: 1)
                at
org.apache.karaf.jpm.impl.ProcessImpl.create(ProcessImpl.java:129) ~[?:?]
                at
org.apache.karaf.jpm.impl.ProcessBuilderImpl.start(ProcessBuilderImpl.java:42)
~[?:?]
                at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.doStart(InstanceServiceImpl.java:557)
~[?:?]
                at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.lambda$startInstance$5(InstanceServiceImpl.java:483)
~[?:?]
                at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.lambda$execute$0(InstanceServiceImpl.java:257)
~[?:?]
                at
org.apache.karaf.util.locks.FileLockUtils.lambda$execute$1(FileLockUtils.java:76)
~[?:?]
                at
org.apache.karaf.util.locks.FileLockUtils.execute(FileLockUtils.java:56)
~[?:?]
                at
org.apache.karaf.util.locks.FileLockUtils.execute(FileLockUtils.java:74)
~[?:?]
                at
org.apache.karaf.instance.core.internal.InstanceServiceImpl.execute(InstanceServiceImpl.java:255)
~[?:?]
                ... 17 more

Reply via email to