Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.3.5
-
Ubuntu Linux 14.04 x86_64
Oracle JDK 1.7.0_60
Karaf 2.3.5
Description
When I start with a completely clean Karaf 2.3.5, I am unable to start a sub-instance.
Steps to reproduce:
ranger@the-slip:/tmp$ tar -xzf apache-karaf-2.3.5.tar.gz ranger@the-slip:/tmp$ cd apache-karaf-2.3.5 ranger@the-slip:/tmp/apache-karaf-2.3.5$ bin/karaf __ __ ____ / //_/____ __________ _/ __/ / ,< / __ `/ ___/ __ `/ /_ / /| |/ /_/ / / / /_/ / __/ /_/ |_|\__,_/_/ \__,_/_/ Apache Karaf (2.3.5) Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'osgi:shutdown' or 'logout' to shutdown Karaf. karaf@root> admin:create minion-test Creating new instance on SSH port 8102 and RMI ports 1100/44445 at: /tmp/apache-karaf-2.3.5/instances/minion-test Creating dir: /tmp/apache-karaf-2.3.5/instances/minion-test/bin Creating dir: /tmp/apache-karaf-2.3.5/instances/minion-test/etc Creating dir: /tmp/apache-karaf-2.3.5/instances/minion-test/system Creating dir: /tmp/apache-karaf-2.3.5/instances/minion-test/deploy Creating dir: /tmp/apache-karaf-2.3.5/instances/minion-test/data Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/config.properties Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/jre.properties Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/custom.properties Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/java.util.logging.properties Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/org.apache.felix.fileinstall-deploy.cfg Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/org.apache.karaf.log.cfg Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/org.apache.karaf.features.cfg Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/org.ops4j.pax.logging.cfg Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/org.ops4j.pax.url.mvn.cfg Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/startup.properties Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/users.properties Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/keys.properties Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/system.properties Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/org.apache.karaf.shell.cfg Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/etc/org.apache.karaf.management.cfg Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/bin/karaf Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/bin/start Creating file: /tmp/apache-karaf-2.3.5/instances/minion-test/bin/stop karaf@root> admin:status minion-test Stopped karaf@root> log:set DEBUG karaf@root> admin:start minion-test karaf@root> admin:status minion-test Stopped
The log contains this message:
2014-07-01 10:34:43,620 | DEBUG | l Console Thread | AdminServiceImpl | dmin.internal.AdminServiceImpl$6 410 | 27 - org.apache.karaf.admin.core - 2.3.5 | Starting instance minion-test with command: "/usr/lib/jvm/java-7-oracle/jre/bin/java" -server -Xmx512M -Dcom.sun.management.jmxremote null -Djava.util.logging.config.file="/tmp/apache-karaf-2.3.5/instances/minion-test/etc/java.util.logging.properties" -Djava.endorsed.dirs="/usr/lib/jvm/java-7-oracle/jre/jre/lib/endorsed:/usr/lib/jvm/java-7-oracle/jre/lib/endorsed:/tmp/apache-karaf-2.3.5/lib/endorsed" -Djava.ext.dirs="/usr/lib/jvm/java-7-oracle/jre/jre/lib/ext:/usr/lib/jvm/java-7-oracle/jre/lib/ext:/tmp/apache-karaf-2.3.5/lib/ext" -Dkaraf.home="/tmp/apache-karaf-2.3.5" -Dkaraf.base="/tmp/apache-karaf-2.3.5/instances/minion-test" -Dkaraf.data="/tmp/apache-karaf-2.3.5/instances/minion-test/data" -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath "/tmp/apache-karaf-2.3.5/lib/org.apache.servicemix.specs.activator-2.4.0.jar:/tmp/apache-karaf-2.3.5/lib/org.apache.servicemix.specs.locator-2.4.0.jar:/tmp/apache-karaf-2.3.5/lib/karaf-jaas-boot.jar:/tmp/apache-karaf-2.3.5/lib/karaf.jar" org.apache.karaf.main.Main
If I try to run that command on the command-line, I get the error:
Error: Could not find or load main class null
Note the "null" after the
-Dcom.sun.management.jmxremote
in the command-line it's trying to send; it appears that javaOpts is somehow ending up with some null junk in it when it attempts to create the call to start the sub-karaf.
I tried digging into the code a bit but I can't figure out which part is responsible for actually creating those javaOpts.