FELIX-1152: wrapper scripts fail to start Karaf
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@803007 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/gshell/gshell-wrapper/src/main/java/org/apache/felix/karaf/gshell/wrapper/InstallCommand.java b/karaf/gshell/gshell-wrapper/src/main/java/org/apache/felix/karaf/gshell/wrapper/InstallCommand.java
index 219ff7c..092adfd 100644
--- a/karaf/gshell/gshell-wrapper/src/main/java/org/apache/felix/karaf/gshell/wrapper/InstallCommand.java
+++ b/karaf/gshell/gshell-wrapper/src/main/java/org/apache/felix/karaf/gshell/wrapper/InstallCommand.java
@@ -204,7 +204,7 @@
throw e;
}
- return 0;
+ return null;
}
private int chmod(File serviceFile, String mode) throws Exception {
diff --git a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/all/karaf-wrapper.conf b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/all/karaf-wrapper.conf
index 1230daa..d146a7d 100644
--- a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/all/karaf-wrapper.conf
+++ b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/all/karaf-wrapper.conf
@@ -22,7 +22,7 @@
set.default.KARAF_BASE=${karaf.base}
# Java Application
-wrapper.working.dir=%SERVICEMIX_BASE%
+wrapper.working.dir=%KARAF_BASE%
wrapper.java.command=java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=%KARAF_BASE%/lib/karaf-wrapper.jar
@@ -31,15 +31,15 @@
wrapper.java.library.path.1=%KARAF_BASE%/lib/
# Application Parameters. Add parameters as needed starting from 1
-wrapper.app.parameter.1=org.apache.felix.karaf.main.Main
+wrapper.app.parameter.1=org.apache.felix.karaf.main.Bootstrap
# JVM Parameters
# note that n is the parameter number starting from 1.
-wrapper.java.additional.1=-Dservicemix.home=%KARAF_HOME%
-wrapper.java.additional.2=-Dservicemix.base=%KARAF_BASE%
+wrapper.java.additional.1=-Dkaraf.home=%KARAF_HOME%
+wrapper.java.additional.2=-Dkaraf.base=%KARAF_BASE%
wrapper.java.additional.3=-Dcom.sun.management.jmxremote
-wrapper.java.additional.4=-Dservicemix.startLocalConsole=false
-wrapper.java.additional.5=-Dservicemix.startRemoteShell=true
+wrapper.java.additional.4=-Dkaraf.startLocalConsole=false
+wrapper.java.additional.5=-Dkaraf.startRemoteShell=true
# Uncomment to enable jmx
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
@@ -70,7 +70,7 @@
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
-wrapper.logfile=%SERVICEMIX_BASE%/data/log/wrapper.log
+wrapper.logfile=%KARAF_BASE%/data/log/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
diff --git a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/all/karaf-wrapper.jar b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/all/karaf-wrapper.jar
index d374419..c766405 100755
--- a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/all/karaf-wrapper.jar
+++ b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/all/karaf-wrapper.jar
Binary files differ
diff --git a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/linux/karaf-wrapper b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/linux/karaf-wrapper
index 6338246..c58d4f7 100644
--- a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/linux/karaf-wrapper
+++ b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/linux/karaf-wrapper
Binary files differ
diff --git a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/linux/libwrapper.so b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/linux/libwrapper.so
index 3fb8a57..df25ec6 100644
--- a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/linux/libwrapper.so
+++ b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/linux/libwrapper.so
Binary files differ
diff --git a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/macosx/karaf-wrapper b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/macosx/karaf-wrapper
index cc6844a..8c281b9 100644
--- a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/macosx/karaf-wrapper
+++ b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/macosx/karaf-wrapper
Binary files differ
diff --git a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/macosx/libwrapper.jnilib b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/macosx/libwrapper.jnilib
index 82033b0..ae5a14e 100644
--- a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/macosx/libwrapper.jnilib
+++ b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/macosx/libwrapper.jnilib
Binary files differ
diff --git a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/windows/karaf-wrapper.exe b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/windows/karaf-wrapper.exe
index d143c07..a46a2ac 100644
--- a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/windows/karaf-wrapper.exe
+++ b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/windows/karaf-wrapper.exe
Binary files differ
diff --git a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/windows/wrapper.dll b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/windows/wrapper.dll
index feba0af..37c4f33 100644
--- a/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/windows/wrapper.dll
+++ b/karaf/gshell/gshell-wrapper/src/main/resources/org/apache/felix/karaf/gshell/wrapper/windows/wrapper.dll
Binary files differ
diff --git a/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java b/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java
index 07aa856..a760cac 100644
--- a/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java
+++ b/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java
@@ -292,7 +292,7 @@
main.launch();
main.destroy(true);
}
- catch (Exception ex) {
+ catch (Throwable ex) {
System.err.println("Error occured shutting down framework: " + ex);
ex.printStackTrace();
} finally {