Commit e721fa46 authored by Matt Tucker's avatar Matt Tucker Committed by matt

jiveHome --> messengerHome


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@79 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3834de01
...@@ -42,7 +42,7 @@ startup.channels=Initializing channels ...@@ -42,7 +42,7 @@ startup.channels=Initializing channels
startup.plain=Started plain (unencrypted) socket on port: {0} startup.plain=Started plain (unencrypted) socket on port: {0}
startup.ssl=Started SSL (encrypted) socket on port: {0} startup.ssl=Started SSL (encrypted) socket on port: {0}
startup.error=Error starting the server. Please check the log files for more information. startup.error=Error starting the server. Please check the log files for more information.
startup.error.jivehome=Could not locate jiveHome. Set the jiveHome property or edit your jive_init.xml file for app server deployments. startup.error.jivehome=Could not locate messengerHome. Set the messengerHome property or edit your messenger_init.xml file for app server deployments.
startup.missing-plugins=Could not locate the plug-ins directory. Possibly corrupt installation. No plug ins will be loaded. startup.missing-plugins=Could not locate the plug-ins directory. Possibly corrupt installation. No plug ins will be loaded.
# Standard server error messages (for server admin) # Standard server error messages (for server admin)
......
...@@ -8,21 +8,14 @@ ...@@ -8,21 +8,14 @@
# Strings for the setup tool # Strings for the setup tool
setup.error.jive_home_not_set=The 'jiveHome' directory has not been set. setup.error.messenger_home_not_set=The 'messengerHome' directory has not been set.
setup.error.jive_home_not_readable=The 'jiveHome' directory is not readable by your appserver. Please change its permissions settings. setup.error.messenger_home_not_readable=The 'messengerHome' directory is not readable by your appserver. Please change its permissions settings.
setup.error.jive_home_not_writeable=The 'jiveHome' directory is not writable by your appserver. Please change its permissions settings. setup.error.messenger_home_not_writeable=The 'messengerHome' directory is not writable by your appserver. Please change its permissions settings.
setup.error.jive_license_does_not_exist=A valid Jive Messenger license does not exist. setup.error.messenger_config_file_not_exist=The conf/jive-messenger.xml file does not exist in your messengerHome directory. Make sure the file is there an that the appserver has read access to the messengerHome directory.
setup.error.jive_license_not_readable=Your Jive Messenger license is not readable. Please change its permissions settings and load this page again. setup.error.messenger_config_file_no_perms=Your appserver does not have permission to read or write to the conf/jive-messenger.xml file. Please change the file permissions then reload this page.
setup.error.jive_license_expired=Your Jive Messenger license has expired.
setup.error.jive_license_does_not_validate=Your license file does not validate which means it might be corrupt. Please verify you have the correct license in place and load this page again.
setup.error.jive_config_file_not_exist=The jive_config.xml file does not exist in your jiveHome directory. Make sure the file is there an that the appserver has read access to the jiveHome directory.
setup.error.jive_config_file_no_perms=Your appserver does not have permission to read or write to the jive_config.xml file. Please change the file permissions then reload this page.
setup.error.license_text_invalid=License text invalid - please enter valid text.
setup.error.license_file_not_writeable=Error saving the jive.license text - make sure your appserver has write permimssions to the jive.license file and jiveHome directory.
setup.error.main.general=Before setup can continue you need to fix the errors listed below. setup.error.main.general=Before setup can continue you need to fix the errors listed below.
setup.error.usersystem.invalid_mode=Invalid mode - please choose a valid user/group/authentication mode below. setup.error.usersystem.invalid_mode=Invalid mode - please choose a valid user/group/authentication mode below.
setup.error.usersystem.not_enterprise=You need to install Jive Messenger Enterprise before using this feature.
setup.error.datasource.invalid_mode=Invalid mode - please choose a valid datasource mode below. setup.error.datasource.invalid_mode=Invalid mode - please choose a valid datasource mode below.
...@@ -23,9 +23,9 @@ import java.sql.SQLException; ...@@ -23,9 +23,9 @@ import java.sql.SQLException;
/** /**
* A connection provider for the embedded hsqlDB database. The database file is stored at * A connection provider for the embedded hsqlDB database. The database file is stored at
* <tt>jiveHome/database</tt>. The log file for this connection provider is stored at * <tt>messengerHome/database</tt>. The log file for this connection provider is stored at
* <tt>[jiveHome]/logs/EmbeddedConnectionProvider.log</tt>, so you should ensure * <tt>[messengerHome]/logs/EmbeddedConnectionProvider.log</tt>, so you should ensure
* that the <tt>[jiveHome]/logs</tt> directory exists. * that the <tt>[messengerHome]/logs</tt> directory exists.
* *
* @author Matt Tucker * @author Matt Tucker
*/ */
...@@ -60,8 +60,8 @@ public class EmbeddedConnectionProvider implements ConnectionProvider { ...@@ -60,8 +60,8 @@ public class EmbeddedConnectionProvider implements ConnectionProvider {
synchronized (initLock) { synchronized (initLock) {
try { try {
String driver = "org.hsqldb.jdbcDriver"; String driver = "org.hsqldb.jdbcDriver";
File jiveHome = new File(JiveGlobals.getJiveHome(), File.separator + "database" + File.separator + "messenger"); File messengerHome = new File(JiveGlobals.getMessengerHome(), File.separator + "database" + File.separator + "messenger");
String path = jiveHome.getCanonicalPath(); String path = messengerHome.getCanonicalPath();
String serverURL = "jdbc:hsqldb:" + path; String serverURL = "jdbc:hsqldb:" + path;
String username = "sa"; String username = "sa";
......
...@@ -26,7 +26,7 @@ import java.util.TimeZone; ...@@ -26,7 +26,7 @@ import java.util.TimeZone;
* <p>There are some special Jive properties that will always be set:</p> * <p>There are some special Jive properties that will always be set:</p>
* <p/> * <p/>
* <ul> * <ul>
* <li><strong>jiveHome</strong> - The directory where the XMPP server is * <li><strong>messengerHome</strong> - The directory where the XMPP server is
* installed</li> * installed</li>
* <li><strong>locale</strong> - The locale settings used by Jive including * <li><strong>locale</strong> - The locale settings used by Jive including
* timezone, character encoding, date formats, etc.</li> * timezone, character encoding, date formats, etc.</li>
......
...@@ -40,7 +40,7 @@ public interface ModuleProperties { ...@@ -40,7 +40,7 @@ public interface ModuleProperties {
/** /**
* Returns a Jive property. Jive properties are stored in the file * Returns a Jive property. Jive properties are stored in the file
* <tt>jive_config.xml</tt> that exists in the <tt>jiveHome</tt> directory. * <tt>jive-messenger.xml</tt> that exists in the <tt>messengerHome/conf</tt> directory.
* Properties are always specified as "foo.bar.prop", which would map to * Properties are always specified as "foo.bar.prop", which would map to
* the following entry in the XML file: * the following entry in the XML file:
* <pre> * <pre>
...@@ -185,7 +185,7 @@ public interface ModuleProperties { ...@@ -185,7 +185,7 @@ public interface ModuleProperties {
/** /**
* Sets a Jive property. If the property doesn't already exists, a new * Sets a Jive property. If the property doesn't already exists, a new
* one will be created. Jive properties are stored in the file * one will be created. Jive properties are stored in the file
* <tt>jive_config.xml</tt> that exists in the <tt>jiveHome</tt> directory. * <tt>jive-messenger.xml</tt> that exists in the <tt>messengerHome/conf</tt> directory.
* Properties are always specified as "foo.bar.prop", which would map to * Properties are always specified as "foo.bar.prop", which would map to
* the following entry in the XML file: * the following entry in the XML file:
* <pre> * <pre>
......
...@@ -37,24 +37,21 @@ import org.dom4j.Document; ...@@ -37,24 +37,21 @@ import org.dom4j.Document;
* <p/> * <p/>
* <p>The boostrap container operates in a similar manner to the basic container * <p>The boostrap container operates in a similar manner to the basic container
* but alters the standard module layout for better packaging of server. * but alters the standard module layout for better packaging of server.
* Notice that the bootstrap server runs from the jiveHome directory whether * Notice that the bootstrap server runs from the messengerHome directory whether
* the server is run in standalone mode (jiveHome == server directory) or * the server is run in standalone mode (messengerHome == server directory) or
* as a web-app (jiveHome == setting in jive_init.xml).</p> * as a web-app (messengerHome == setting in messenger_init.xml).</p>
* <p/> * <p/>
* <p>Bootstrap systems should have a directory layout that looks like:</p> * <p>Bootstrap systems should have a directory layout that looks like:</p>
* <p/> * <p/>
* <ul> * <ul>
* <li>config - Contains configuration information for the server as a whole * <li>conf - Contains configuration information for the server as a whole
* <ul> * <ul>
* <li>[product-name].xml - The configuration file * <li>jive-messenger.xml - The bootstrap configuration file.</li>
* for the server and it's core modules. Product-name
* varies, e.g. jive_messenger, jive_nntp, etc.</li>
* <li>[product-name].license - Optional license file for the server</li>
* </ul> * </ul>
* </li> * </li>
* <li>log - The root directory for log files</li> * <li>logs - The root directory for log files</li>
* <li>security - The security keystores for the server (if any)</li> * <li>security - The security keystores for the server (if any)</li>
* <li>plug-ins - The module directory for loading server modules</li> * <li>plugins - The module directory for loading server modules</li>
* </li> * </li>
* <p/> * <p/>
* <p>Note that the root lib directory is NOT part * <p>Note that the root lib directory is NOT part
...@@ -144,10 +141,10 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -144,10 +141,10 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
private List modules = new ArrayList(); private List modules = new ArrayList();
/** /**
* Location of the jiveHome directory. All configuration files should be * Location of the messengerHome directory. All configuration files should be
* located here. * located here.
*/ */
private File jiveHome; private File messengerHome;
private File logDir; private File logDir;
private File configFile; private File configFile;
private ClassLoader loader; private ClassLoader loader;
...@@ -180,7 +177,7 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -180,7 +177,7 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
try { try {
// Let's specify jive_messenger.xml as the new config file. // Let's specify jive_messenger.xml as the new config file.
locateJiveHome(); locateJiveHome();
context = new XMLModuleContext(null, configFile, jiveHome, logDir); context = new XMLModuleContext(null, configFile, messengerHome, logDir);
if ("true".equals(context.getProperty("setup"))) { if ("true".equals(context.getProperty("setup"))) {
setupMode = false; setupMode = false;
} }
...@@ -254,7 +251,7 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -254,7 +251,7 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
catch (Exception e) { catch (Exception e) {
System.out.println("Database setup or configuration error: " + System.out.println("Database setup or configuration error: " +
"Please verify your database settings and check the " + "Please verify your database settings and check the " +
"jiveHome/logs/jive.error.log file for detailed error messages."); "logs/error.log file for detailed error messages.");
Log.error("Database could not be accessed", e); Log.error("Database could not be accessed", e);
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
...@@ -347,14 +344,14 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -347,14 +344,14 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
* @param setupMode True if starting in setup mode. * @param setupMode True if starting in setup mode.
*/ */
private void loadPlugins(boolean setupMode) { private void loadPlugins(boolean setupMode) {
File pluginDir = new File(jiveHome + "/plug-ins"); File pluginDir = new File(messengerHome + "/plugins");
if (pluginDir.exists()) { if (pluginDir.exists()) {
File[] plugins = pluginDir.listFiles(); File[] plugins = pluginDir.listFiles();
for (int i = 0; i < plugins.length; i++) { for (int i = 0; i < plugins.length; i++) {
if (plugins[i].isDirectory()) { if (plugins[i].isDirectory()) {
if (setupMode) { if (setupMode) {
// Only load web-admin plug-in // Only load web-admin plug-in
if ("web-admin".equals(plugins[i].getName())) { if ("admin".equals(plugins[i].getName())) {
loadPlugin(plugins[i]); loadPlugin(plugins[i]);
} }
} }
...@@ -396,7 +393,7 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -396,7 +393,7 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
this.modules.add(mod); this.modules.add(mod);
} }
else { else {
Log.warn("Plug-in " + pluginDir + Log.warn("Plugin " + pluginDir +
" not loaded: no module.xml configuration file found"); " not loaded: no module.xml configuration file found");
} }
} }
...@@ -562,31 +559,26 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -562,31 +559,26 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
* @throws FileNotFoundException If jiveHome could not be located * @throws FileNotFoundException If jiveHome could not be located
*/ */
private void locateJiveHome() throws FileNotFoundException { private void locateJiveHome() throws FileNotFoundException {
String jiveConfigName = "config" + File.separator + "jive-" + getFileCoreName() + ".xml"; String jiveConfigName = "conf" + File.separator + "jive-" + getFileCoreName() + ".xml";
// First, try to load it jiveHome as a system property. // First, try to load it jiveHome as a system property.
if (jiveHome == null) { if (messengerHome == null) {
String homeProperty = System.getProperty("jiveHome"); String homeProperty = System.getProperty("messengerHome");
try { try {
if (homeProperty != null) { if (homeProperty != null) {
jiveHome = verifyHome(homeProperty, jiveConfigName); messengerHome = verifyHome(homeProperty, jiveConfigName);
} }
} }
catch (FileNotFoundException fe) { catch (FileNotFoundException fe) {
System.err.println("Messenger and Forums/KB cannot share " +
"the same jiveHome directory!");
System.err.println(" * A Forum/KB jiveHome directory was detected " +
"using the system property 'jiveHome' pointing to " +
homeProperty);
System.err.println(" * Messenger will continue looking for jiveHome");
} }
} }
// If we still don't have jiveHome, let's assume this is standalone // If we still don't have jiveHome, let's assume this is standalone
// and just look for jiveHome in a standard sub-dir location and verify // and just look for jiveHome in a standard sub-dir location and verify
// by looking for the config file // by looking for the config file
if (jiveHome == null) { if (messengerHome == null) {
try { try {
jiveHome = verifyHome("..", jiveConfigName); messengerHome = verifyHome("..", jiveConfigName);
} }
catch (FileNotFoundException fe) { catch (FileNotFoundException fe) {
String path = ".."; String path = "..";
...@@ -596,47 +588,33 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -596,47 +588,33 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
catch (Exception e) { catch (Exception e) {
System.err.println("Could not resolve path to '..'"); System.err.println("Could not resolve path to '..'");
} }
System.err.println("Messenger and Forums/KB cannot share " +
"the same jiveHome directory!");
System.err.println(" * A Forum/KB jiveHome directory was detected " +
"where a standalone Messenger installation was " +
"expected: " + path);
System.err.println(" * Messenger will continue looking for jiveHome");
} }
} }
// If jiveHome is still null, no outside process has set it and // If messengerHome is still null, no outside process has set it and
// we have to attempt to load the value from jive_init.xml, // we have to attempt to load the value from messenger_init.xml,
// which must be in the classpath. // which must be in the classpath.
if (jiveHome == null) { if (messengerHome == null) {
InputStream in = null; InputStream in = null;
try { try {
in = getClass().getResourceAsStream("/jive_init.xml"); in = getClass().getResourceAsStream("/messenger_init.xml");
if (in != null) { if (in != null) {
Document doc = XPPReader.parseDocument(new InputStreamReader(in), Document doc = XPPReader.parseDocument(new InputStreamReader(in),
this.getClass()); this.getClass());
String path = doc.getRootElement().getText(); String path = doc.getRootElement().getText();
try { try {
if (path != null) { if (path != null) {
jiveHome = verifyHome(path, messengerHome = verifyHome(path,
jiveConfigName); jiveConfigName);
} }
} }
catch (FileNotFoundException fe) { catch (FileNotFoundException fe) {
System.err.println("Messenger and Forums/KB cannot share " + fe.printStackTrace();
"the same jiveHome directory");
System.err.println(" * A Forum/KB jiveHome directory was " +
"detected by following the directory " +
"specified in the resource stream " +
"'/jive_init.xml'" +
"probably located on your classpath. The" +
"init file pointed to " +
path);
} }
} }
} }
catch (Exception e) { catch (Exception e) {
System.err.println("Error loading jive_init.xml to find jiveHome."); System.err.println("Error loading messenger_init.xml to find messengerHome.");
e.printStackTrace(); e.printStackTrace();
} }
finally { finally {
...@@ -652,14 +630,14 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -652,14 +630,14 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
} }
} }
if (jiveHome == null) { if (messengerHome == null) {
System.err.println("Could not locate jiveHome"); System.err.println("Could not locate messengerHome");
throw new FileNotFoundException(); throw new FileNotFoundException();
} }
else { else {
JiveGlobals.jiveHome = jiveHome.toString(); JiveGlobals.messengerHome = messengerHome.toString();
configFile = new File(jiveHome, jiveConfigName); configFile = new File(messengerHome, jiveConfigName);
logDir = new File(jiveHome, JIVE_LOG_DIR); logDir = new File(messengerHome, JIVE_LOG_DIR);
} }
} }
} }
...@@ -247,7 +247,7 @@ public class XMLModuleContext implements ModuleContext { ...@@ -247,7 +247,7 @@ public class XMLModuleContext implements ModuleContext {
/** /**
* Loads properties if necessary. Property loading must be done lazily so * Loads properties if necessary. Property loading must be done lazily so
* that we give outside classes a chance to set <tt>jiveHome</tt>. * that we give outside classes a chance to set <tt>messengerHome</tt>.
*/ */
private synchronized void loadProperties(File filename) { private synchronized void loadProperties(File filename) {
if (properties == null) { if (properties == null) {
......
...@@ -19,7 +19,7 @@ import javax.swing.*; ...@@ -19,7 +19,7 @@ import javax.swing.*;
public class Launcher { public class Launcher {
private Process messengerd = null; private Process messengerd = null;
private String configFile = JiveGlobals.getJiveHome() + File.separator + "config" + private String configFile = JiveGlobals.getMessengerHome() + File.separator + "config" +
File.separator + "jive-messenger.xml"; File.separator + "jive-messenger.xml";
private JPanel toolbar = new JPanel(); private JPanel toolbar = new JPanel();
......
...@@ -53,7 +53,7 @@ public class SSLConfig { ...@@ -53,7 +53,7 @@ public class SSLConfig {
keystore = null; keystore = null;
} }
else { else {
keystore = JiveGlobals.getJiveHome() + File.separator + keystore; keystore = JiveGlobals.getMessengerHome() + File.separator + keystore;
} }
keypass = JiveGlobals.getProperty("xmpp.socket.ssl.keypass"); keypass = JiveGlobals.getProperty("xmpp.socket.ssl.keypass");
if (keypass == null) { if (keypass == null) {
...@@ -67,7 +67,7 @@ public class SSLConfig { ...@@ -67,7 +67,7 @@ public class SSLConfig {
truststore = null; truststore = null;
} }
else { else {
truststore = JiveGlobals.getJiveHome() + File.separator + truststore; truststore = JiveGlobals.getMessengerHome() + File.separator + truststore;
} }
trustpass = JiveGlobals.getProperty("xmpp.socket.ssl.trustpass"); trustpass = JiveGlobals.getProperty("xmpp.socket.ssl.trustpass");
if (trustpass == null) { if (trustpass == null) {
......
...@@ -37,7 +37,7 @@ public class SSLJiveKeyManagerFactory { ...@@ -37,7 +37,7 @@ public class SSLJiveKeyManagerFactory {
/** /**
* Creates a KeyManager list which is null if the storeType is null, or * Creates a KeyManager list which is null if the storeType is null, or
* is a standard KeyManager that uses a KeyStore of type storeType, * is a standard KeyManager that uses a KeyStore of type storeType,
* located at 'keystore' location under jiveHome, and uses 'keypass' as * located at 'keystore' location under messengerHome, and uses 'keypass' as
* the password for the keystore password and key password. The default * the password for the keystore password and key password. The default
* Jive keystore contains a self-signed X509 certificate pair under the * Jive keystore contains a self-signed X509 certificate pair under the
* alias '127.0.0.1' in a Java KeyStore (JKS) with initial password 'changeit'. * alias '127.0.0.1' in a Java KeyStore (JKS) with initial password 'changeit'.
...@@ -46,7 +46,7 @@ public class SSLJiveKeyManagerFactory { ...@@ -46,7 +46,7 @@ public class SSLJiveKeyManagerFactory {
* the Jive XMPP server security documentation for more information. * the Jive XMPP server security documentation for more information.
* *
* @param storeType The type of keystore (e.g. "JKS") to use or null to indicate no keystore should be used * @param storeType The type of keystore (e.g. "JKS") to use or null to indicate no keystore should be used
* @param keystore The relative location of the keystore under jiveHome * @param keystore The relative location of the keystore under messengerHome
* @param keypass The password for the keystore and key * @param keypass The password for the keystore and key
* @return An array of relevant KeyManagers (may be null indicating a default KeyManager should be created) * @return An array of relevant KeyManagers (may be null indicating a default KeyManager should be created)
* @throws NoSuchAlgorithmException If the keystore type doesn't exist (not provided or configured with your JVM) * @throws NoSuchAlgorithmException If the keystore type doesn't exist (not provided or configured with your JVM)
......
...@@ -38,7 +38,7 @@ public class SSLJiveTrustManagerFactory { ...@@ -38,7 +38,7 @@ public class SSLJiveTrustManagerFactory {
/** /**
* Creates a TrustManager list which is null if the storeType is null, or * Creates a TrustManager list which is null if the storeType is null, or
* is a standard TrustManager that uses a KeyStore of type storeType, * is a standard TrustManager that uses a KeyStore of type storeType,
* located at 'keystore' location under jiveHome, and uses 'keypass' as * located at 'keystore' location under messengerHome, and uses 'keypass' as
* the password for the keystore password and key password (note that * the password for the keystore password and key password (note that
* trust managers typically don't need a key password as public keys * trust managers typically don't need a key password as public keys
* are stored in the clear and can be obtained without a key password). * are stored in the clear and can be obtained without a key password).
...@@ -46,7 +46,7 @@ public class SSLJiveTrustManagerFactory { ...@@ -46,7 +46,7 @@ public class SSLJiveTrustManagerFactory {
* as it is not needed (the server does not require client authentication). * as it is not needed (the server does not require client authentication).
* *
* @param storeType The type of keystore (e.g. "JKS") to use or null to indicate no keystore should be used * @param storeType The type of keystore (e.g. "JKS") to use or null to indicate no keystore should be used
* @param truststore The relative location of the keystore under jiveHome * @param truststore The relative location of the keystore under messengerHome
* @param trustpass The password for the keystore and key * @param trustpass The password for the keystore and key
* @return An array of relevant KeyManagers (may be null indicating a default KeyManager should be created) * @return An array of relevant KeyManagers (may be null indicating a default KeyManager should be created)
* @throws NoSuchAlgorithmException If the keystore type doesn't exist (not provided or configured with your JVM) * @throws NoSuchAlgorithmException If the keystore type doesn't exist (not provided or configured with your JVM)
......
...@@ -59,16 +59,16 @@ public class Log { ...@@ -59,16 +59,16 @@ public class Log {
/** /**
* This method is used to initialize the Log class. For normal operations this method * This method is used to initialize the Log class. For normal operations this method
* should <b>never</b> be called, rather it's only publically available so that the class * should <b>never</b> be called, rather it's only publically available so that the class
* can be reset by the setup process once the jiveHome directory has been specified. * can be reset by the setup process once the messengerHome directory has been specified.
*/ */
public static void initLog() { public static void initLog() {
try { try {
logDirectory = JiveGlobals.getXMLProperty("log.directory"); logDirectory = JiveGlobals.getXMLProperty("log.directory");
if (logDirectory == null) { if (logDirectory == null) {
if (JiveGlobals.getJiveHome() != null) { if (JiveGlobals.getMessengerHome() != null) {
File jiveHome = new File(JiveGlobals.getJiveHome()); File messengerHome = new File(JiveGlobals.getMessengerHome());
if (jiveHome.exists() && jiveHome.canWrite()) { if (messengerHome.exists() && messengerHome.canWrite()) {
logDirectory = (new File(jiveHome, "logs")).toString(); logDirectory = (new File(messengerHome, "logs")).toString();
} }
} }
} }
...@@ -83,10 +83,10 @@ public class Log { ...@@ -83,10 +83,10 @@ public class Log {
logDir.mkdir(); logDir.mkdir();
} }
logNameDebug = logDirectory + "jive.debug.log"; logNameDebug = logDirectory + "debug.log";
logNameInfo = logDirectory + "jive.info.log"; logNameInfo = logDirectory + "info.log";
logNameWarn = logDirectory + "jive.warn.log"; logNameWarn = logDirectory + "warn.log";
logNameError = logDirectory + "jive.error.log"; logNameError = logDirectory + "error.log";
debugPattern = JiveGlobals.getXMLProperty("log.debug.format"); debugPattern = JiveGlobals.getXMLProperty("log.debug.format");
infoPattern = JiveGlobals.getXMLProperty("log.info.format"); infoPattern = JiveGlobals.getXMLProperty("log.info.format");
...@@ -105,7 +105,7 @@ public class Log { ...@@ -105,7 +105,7 @@ public class Log {
debugEnabled = "true".equals(JiveGlobals.getXMLProperty("log.debug.enabled")); debugEnabled = "true".equals(JiveGlobals.getXMLProperty("log.debug.enabled"));
} }
catch (Exception e) { catch (Exception e) {
// we'll get an exception if jiveHome isn't setup yet - we ignore that since // we'll get an exception if messengerHome isn't setup yet - we ignore that since
// it's sure to be logged elsewhere :) // it's sure to be logged elsewhere :)
} }
...@@ -137,9 +137,9 @@ public class Log { ...@@ -137,9 +137,9 @@ public class Log {
Exception ioe = null; Exception ioe = null;
try { try {
// jiveHome was not setup correctly // messengerHome was not setup correctly
if (logName == null) { if (logName == null) {
throw new IOException("LogName was null - JiveHome not set?"); throw new IOException("LogName was null - MessengerHome not set?");
} }
else { else {
RevolvingFileStrategy fileStrategy = new RevolvingFileStrategy(logName, 5); RevolvingFileStrategy fileStrategy = new RevolvingFileStrategy(logName, 5);
......
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
* Specifies the full path to your jiveHome directory. * Specifies the full path to your messengerHome directory.
* This file must be in the classpath of your application * This file must be in the classpath of your application
* server. Normally, the easiest way to do this is to * server. Normally, the easiest way to do this is to
* put it into the [jive]/WEB-INF/classes directory, * put it into the /WEB-INF/classes directory of the web
* where [jive] is the name of your Jive Messenger web
* application. * application.
* *
* For unix this might be: * For unix this might be:
* <jiveHome>/var/web/jiveHome</jiveHome> * <messengerHome>/var/jiveMessenger</messengerHome>
* *
* For Windows this might be: * For Windows this might be:
* <jiveHome>c:\web\jiveHome</jiveHome> * <messengerHome>c:\jiveMessenger</messengerHome>
--> -->
<jiveHome></jiveHome> <messengerHome></messengerHome>
\ No newline at end of file \ No newline at end of file
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
} }
catch (Exception e) { catch (Exception e) {
errors.put("general","Setting connection properties failed - please see the error " errors.put("general","Setting connection properties failed - please see the error "
+ "log located in jiveHome/logs for more details."); + "log located in messengerHome/logs for more details.");
Log.error(e); Log.error(e);
} }
// No errors setting the properties, so test the connection // No errors setting the properties, so test the connection
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
boolean servlet22Installed = false; boolean servlet22Installed = false;
boolean jsp11Installed = false; boolean jsp11Installed = false;
boolean jiveJarsInstalled = false; boolean jiveJarsInstalled = false;
boolean jiveHomeExists = false; boolean messengerHomeExists = false;
File jiveHome = null; File messengerHome = null;
// Check for JDK 1.5 // Check for JDK 1.5
try { try {
...@@ -41,20 +41,20 @@ ...@@ -41,20 +41,20 @@
catch (ClassNotFoundException cnfe) {} catch (ClassNotFoundException cnfe) {}
// Check that the Messenger jar are installed: // Check that the Messenger jar are installed:
try { try {
loadClass("org.jivesoftware.xmpp.XMPPServer"); loadClass("org.jivesoftware.messenger.XMPPServer");
jiveJarsInstalled = true; jiveJarsInstalled = true;
} }
catch (ClassNotFoundException cnfe) {} catch (ClassNotFoundException cnfe) {}
// Try to determine what the jiveHome directory is: // Try to determine what the jiveHome directory is:
try { try {
Class jiveGlobalsClass = loadClass("org.jivesoftware.xmpp.JiveGlobals"); Class jiveGlobalsClass = loadClass("org.jivesoftware.messenger.JiveGlobals");
Method getJiveHomeMethod = jiveGlobalsClass.getMethod("getJiveHome", (Class[])null); Method getMessengerHomeMethod = jiveGlobalsClass.getMethod("getMessengerHome", (Class[])null);
String jiveHomeProp = (String)getJiveHomeMethod.invoke(jiveGlobalsClass, (Object[])null); String messengerHomeProp = (String)getMessengerHomeMethod.invoke(jiveGlobalsClass, (Object[])null);
if (jiveHomeProp != null) { if (messengerHomeProp != null) {
jiveHome = new File(jiveHomeProp); messengerHome = new File(messengerHomeProp);
if (jiveHome.exists()) { if (messengerHome.exists()) {
jiveHomeExists = true; messengerHomeExists = true;
} }
} }
} }
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
// If there were no errors, redirect to the main setup page // If there were no errors, redirect to the main setup page
if (!jdk13Installed || !servlet22Installed || !jsp11Installed || !jiveJarsInstalled if (!jdk13Installed || !servlet22Installed || !jsp11Installed || !jiveJarsInstalled
|| !jiveHomeExists) || !messengerHomeExists)
{ {
%> %>
<html> <html>
...@@ -173,13 +173,13 @@ ...@@ -173,13 +173,13 @@
</tr> </tr>
<% } <% }
if (jiveHomeExists) { if (messengerHomeExists) {
%> %>
<tr> <tr>
<td><img src="images/x.gif" width="13" height="13" border="0"></td> <td><img src="images/x.gif" width="13" height="13" border="0"></td>
<td> <td>
<span class="jive-setup-error-text"> <span class="jive-setup-error-text">
Jive Home Directory (<%= jiveHome.toString() %>) Jive Home Directory (<%= messengerHome.toString() %>)
</span> </span>
</td> </td>
</tr> </tr>
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
<td><img src="images/x.gif" width="13" height="13" border="0"></td> <td><img src="images/x.gif" width="13" height="13" border="0"></td>
<td> <td>
<span class="jive-setup-error-text"> <span class="jive-setup-error-text">
Jive Home Directory - Not Set Messenger Home Directory - Not Set
</span> </span>
</td> </td>
</tr> </tr>
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
success = false; success = false;
errors.put("general","A connection to the database could not be " errors.put("general","A connection to the database could not be "
+ "made. View the error message by opening the " + "made. View the error message by opening the "
+ "\"[jiveHome]" + File.separator + "logs" + File.separator + "error.log\" log " + "\"" + File.separator + "logs" + File.separator + "error.log\" log "
+ "file, then go back to fix the problem."); + "file, then go back to fix the problem.");
} }
else { else {
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
success = false; success = false;
errors.put("general","A connection to the database could not be " errors.put("general","A connection to the database could not be "
+ "made. View the error message by opening the " + "made. View the error message by opening the "
+ "\"[jiveHome]" + File.separator + "logs" + File.separator + "error.log\" log " + "\"" + File.separator + "logs" + File.separator + "error.log\" log "
+ "file, then go back to fix the problem."); + "file, then go back to fix the problem.");
} }
else { else {
......
...@@ -281,7 +281,7 @@ function toggle(form,disabled) { ...@@ -281,7 +281,7 @@ function toggle(form,disabled) {
value="<%= ((keystore != null) ? keystore : "") %>"> value="<%= ((keystore != null) ? keystore : "") %>">
<span class="jive-description"> <span class="jive-description">
<br> <br>
Filename (relative to jiveHome directory) of the certificate used for this server. Filename (relative to meessengerHome directory) of the certificate used for this server.
</span> </span>
</td> </td>
</tr> </tr>
...@@ -307,7 +307,7 @@ function toggle(form,disabled) { ...@@ -307,7 +307,7 @@ function toggle(form,disabled) {
value="<%= ((truststore != null) ? truststore : "") %>"> value="<%= ((truststore != null) ? truststore : "") %>">
<span class="jive-description"> <span class="jive-description">
<br> <br>
Filename (relative to jiveHome directory) of the store used for client certificates. Filename (relative to messengerHome directory) of the store used for client certificates.
</span> </span>
</td> </td>
</tr> </tr>
......
...@@ -40,61 +40,19 @@ ...@@ -40,61 +40,19 @@
Map errors = new HashMap(); Map errors = new HashMap();
// Error checking // Error checking
Map jiveHomeErrors = new HashMap(); Map messengerHomeErrors = new HashMap();
// Get a handle on the jiveHome directory // Get a handle on the jiveHome directory
File jiveHomeDir = new File(JiveGlobals.getJiveHome()); File messengerHomeDir = new File(JiveGlobals.getMessengerHome());
// Validate it: // Validate it:
if (jiveHomeDir == null || !jiveHomeDir.exists()) { if (messengerHomeDir == null || !messengerHomeDir.exists()) {
jiveHomeErrors.put("exists","exists"); messengerHomeErrors.put("exists","exists");
} }
else { else {
if (!jiveHomeDir.canRead()) { if (!messengerHomeDir.canRead()) {
jiveHomeErrors.put("read","read"); messengerHomeErrors.put("read","read");
} }
if (!jiveHomeDir.canWrite()) { if (!messengerHomeDir.canWrite()) {
jiveHomeErrors.put("write","write"); messengerHomeErrors.put("write","write");
}
}
// If this is JDK 1.3, check for dependencies:
boolean isJDK13 = false;
boolean isJDK14 = false;
try {
loadClass("java.util.TimerTask");
isJDK13 = true;
}
catch (Exception ignored) {}
try {
loadClass("java.nio.Buffer");
isJDK14 = true;
}
catch (Exception ignored) {}
Map depErrors = new HashMap();
if (isJDK13 && !isJDK14) {
// Check for jcert.jar, jnet.jar, jsse.jar
try {
loadClass("javax.security.cert.Certificate");
}
catch (ClassNotFoundException e) {
depErrors.put("jcert.jar","jcert.jar");
}
try {
loadClass("javax.net.SocketFactory");
}
catch (ClassNotFoundException e) {
depErrors.put("jnet.jar","jnet.jar");
}
try {
loadClass("javax.net.ssl.SSLSocket");
}
catch (ClassNotFoundException e) {
depErrors.put("jsse.jar","jsse.jar");
}
try {
loadClass("javax.sql.DataSource");
}
catch (ClassNotFoundException e) {
depErrors.put("jdbc2_0-stdext.jar","jdbc2_0-stdext.jar");
} }
} }
%> %>
...@@ -231,29 +189,29 @@ below. ...@@ -231,29 +189,29 @@ below.
jiveHome Directory jiveHome Directory
<br> <br>
<span class="jive-info"> <span class="jive-info">
<% boolean jiveHomeOK = true; <% boolean messengerHomeOK = true;
if (jiveHomeErrors.size() == 0) { if (messengerHomeErrors.size() == 0) {
%> %>
Valid jiveHome directory. Valid messengerHome directory.
<% } else { <% } else {
jiveHomeOK = false; messengerHomeOK = false;
%> %>
<% if (jiveHomeErrors.get("exists") != null) { %> <% if (messengerHomeErrors.get("exists") != null) { %>
Unable to locate valid jiveHome directory. Please refer to the installation Unable to locate valid messengerHome directory. Please refer to the installation
documentation for the correct way to set the jiveHome directory. documentation for the correct way to set the jiveHome directory.
<% } else if (jiveHomeErrors.get("read") != null) { %> <% } else if (messengerHomeErrors.get("read") != null) { %>
Setup was able to find your jiveHome directory but does not have read Setup was able to find your messengerHome directory but does not have read
permission on it. Please alter the directory permissions. permission on it. Please alter the directory permissions.
<% } else if (jiveHomeErrors.get("write") != null) { %> <% } else if (messengerHomeErrors.get("write") != null) { %>
Setup was able to find your jiveHome directory but does not have write permission Setup was able to find your messengerHome directory but does not have write permission
on it. Please alter the directory permissions. on it. Please alter the directory permissions.
...@@ -263,7 +221,7 @@ below. ...@@ -263,7 +221,7 @@ below.
<% } %> <% } %>
</span> </span>
</td> </td>
<% if (jiveHomeOK) { %> <% if (messengerHomeOK) { %>
<td align="center" class="jive-setup-checklist-box"><img src="images/check.gif" width="13" height="13" border="0"></td> <td align="center" class="jive-setup-checklist-box"><img src="images/check.gif" width="13" height="13" border="0"></td>
<td align="center" class="jive-setup-checklist-box"><img src="images/blank.gif" width="13" height="13" border="0"></td> <td align="center" class="jive-setup-checklist-box"><img src="images/blank.gif" width="13" height="13" border="0"></td>
...@@ -283,7 +241,7 @@ below. ...@@ -283,7 +241,7 @@ below.
<form action="setup-index.jsp"> <form action="setup-index.jsp">
<div align="right"> <div align="right">
<% if (!jiveHomeOK || !depsOK) { %> <% if (!messengerHomeOK || !depsOK) { %>
<input type="submit" value=" Continue " disabled onclick="return false;"> <input type="submit" value=" Continue " disabled onclick="return false;">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment