Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-37452

Confluence 5.8 OD has unsupported Java 7 JRE embedded, will not startup when installed using automated installer

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Summary

      Confluence 5.8 OD will not startup, as it comes with Java 7 JRE embedded and set as the default

      Environment

      • Automated installer version (.bin in Linux, .exe in Windows)

      Steps to Reproduce

      1. Install Confluence 5.8 OD from installer
      2. Attempt to access Confluence in the browser

      Expected Results

      You are greeted with the Confluence setup wizard

      Actual Results

      Confluence doesn't start, there is a an error in the browser.
      The below exception is thrown in the catalina.out file:

      SEVERE: A child container failed during start
      java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Standalone].StandardHost[localhost].StandardContext[]]
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
      	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Standalone].StandardHost[localhost].StandardContext[]]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      	... 6 more
      Caused by: java.lang.UnsupportedClassVersionError: com/atlassian/confluence/logging/ConfluenceHomeLogAppender : Unsupported major.minor version 52.0 (unable to load class com.atlassian.confluence.logging.ConfluenceHomeLogAppender)
      	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2961)
      	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210)
      	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690)
      	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:195)
      	at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
      	at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
      	at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124)
      	at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:785)
      	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
      	at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
      	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
      	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
      	at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
      	at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
      	at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:63)
      	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:284)
      	at org.slf4j.bridge.SLF4JBridgeHandler.getSLF4JLogger(SLF4JBridgeHandler.java:202)
      	at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:287)
      	at java.util.logging.Logger.log(Logger.java:616)
      	at java.util.logging.Logger.doLog(Logger.java:641)
      	at java.util.logging.Logger.logp(Logger.java:841)
      	at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:185)
      	at org.apache.juli.logging.DirectJDKLog.error(DirectJDKLog.java:151)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4915)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	... 6 more
      
      May 05, 2015 4:01:06 PM org.apache.catalina.core.ContainerBase startInternal
      SEVERE: A child container failed during start
      java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Standalone].StandardHost[localhost]]
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
      	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
      Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Standalone].StandardHost[localhost]]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.catalina.LifecycleException: A child container failed during start
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
      	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	... 6 more
      
      May 05, 2015 4:01:06 PM org.apache.catalina.startup.Catalina start
      SEVERE: The required Server component failed to start so Tomcat is unable to start.
      org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8000]]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      	at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
      Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat-Standalone]]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	... 7 more
      Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Standalone]]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	... 9 more
      Caused by: org.apache.catalina.LifecycleException: A child container failed during start
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
      	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	... 11 more
      

      Notes

      • I looked into what JRE is included and the notes indicate it is Java 7

      Workaround

      1. Install Java 8
      2. Go to <confluence_install>/bin
      3. Edit setenv.sh (or modify tomcat7w in Windows)
      4. Remove the JRE_HOME line and replace with
        export JAVA_HOME=/path/to/java/8
      5. Start Confluence

            [CONFSERVER-37452] Confluence 5.8 OD has unsupported Java 7 JRE embedded, will not startup when installed using automated installer

            Graham Gatus added a comment - - edited

            Looks like this has already been fixed. i cant find any references to "1.7" in confluence-distribution/installer/confluence-template.install4j. I did a diff between the master version, and tag 5.8-OD-50-011-x64, which was the version of confluence the customer was using where the installer failed to work (see https://support.atlassian.com/browse/CSP-147037).

            Diff is attached below. There is one section for the Windows 6 bit installers where the includedJRE for the installers has been updated from 1.7 to 1.8, so it looks like the issue has already fixed.

            Was not able to reproduce on Windows 7, 32 bit, with JAVA_HOME set to a 1.7 java installation, using the latest installers.

            diff --git a/installer/confluence-template.install4j b/installer/confluence-template.install4j
            index 646e278..38a95e8 100644
            --- a/installer/confluence-template.install4j
            +++ b/installer/confluence-template.install4j
            @@ -1,7 +1,7 @@
             <?xml version="1.0" encoding="UTF-8"?>
             <install4j version="5.0.9" transformSequenceNumber="3">
               <directoryPresets config="./bin/user.sh" />
            -  <application name="${compiler:app.name} ${compiler:app.version}" distributionSourceDir="" applicationId="9713-7075-2654-3663" mediaDir="target" mediaFilePattern="atlassian-${compiler:app.name.lower}-${compiler:app.version}" compression="6" lzmaCompression="false" pack200Compression="false" excludeSignedFromPacking="true" commonExternalFiles="false" createMd5Sums="true" shrinkRuntime="true" shortName="${compiler:app.name}" publisher="Atlassian" publisherWeb="http://www.atlassian.com/" version="${compiler:app.version}" allPathsRelative="true" backupOnSave="false" autoSave="true" convertDotsToUnderscores="false" macSignature="????" installerName="" javaMinVersion="1.7" javaMaxVersion="" allowBetaVM="false" jdkMode="runtimeJre" jdkName="">
            +  <application name="${compiler:app.name} ${compiler:app.version}" distributionSourceDir="" applicationId="9713-7075-2654-3663" mediaDir="target" mediaFilePattern="atlassian-${compiler:app.name.lower}-${compiler:app.version}" compression="6" lzmaCompression="false" pack200Compression="false" excludeSignedFromPacking="true" commonExternalFiles="false" createMd5Sums="true" shrinkRuntime="true" shortName="${compiler:app.name}" publisher="Atlassian" publisherWeb="http://www.atlassian.com/" version="${compiler:app.version}" allPathsRelative="true" backupOnSave="false" autoSave="true" convertDotsToUnderscores="false" macSignature="????" installerName="" javaMinVersion="1.8" javaMaxVersion="" allowBetaVM="false" jdkMode="runtimeJre" jdkName="">
                 <languages skipLanguageSelection="true" languageSelectionInPrincipalLanguage="false">
                   <principalLanguage id="en" customLocalizationFile="./messages/messages_en.utf8" />
                   <additionalLanguages />
            @@ -2424,7 +2424,7 @@ import com.atlassian.inception.UpgradeHelper;
             
             boolean isWindows = Util.isWindows();
             boolean isUpgrade = context.getBooleanVariable("sys.confirmedUpdateInstallation");
            -boolean isUpgradingFromJava6 = false;
            +boolean isUpgradingJava = false;
             
             if (!isWindows || !isUpgrade) {
                 return false;
            @@ -2436,10 +2436,10 @@ try
                UpgradeHelper upgradeHelper = new ConfluenceUpgradeHelper(installDir);
                String currInstallationVersion = (String) upgradeHelper.getExistingInstallationVersion();
                VersionStringComparator versionComparator = new VersionStringComparator();
            -   //If current version is lower than 5.0 we are upgrading from JRE 6 to 7
            -   isUpgradingFromJava6 = versionComparator.compare(currInstallationVersion, "5.0") &lt; 0;
            +   // If current version is lower than 5.8 we are upgrading the JRE to 8
            +   isUpgradingJava = versionComparator.compare(currInstallationVersion, "5.8") &lt; 0;
                
            -   return isUpgradingFromJava6;
            +   return isUpgradingJava;
             }
             catch (Exception e) 
             {
            @@ -2454,60 +2454,60 @@ catch (Exception e)
                 return false;
             }</condition>
                               </action>
            -                  <action name="Change Tomcat executable in Windows Registry when upgrading from Tomcat 6 to Tomcat 7" id="70902" customizedId="" beanClass="com.install4j.runtime.beans.actions.registry.SetRegistryValueAction" enabled="true" commentSet="false" comment="" rollbackBarrier="false" multiExec="false" failureStrategy="1" errorMessage="Failed when updating the Tomcat path">
            -                                      <serializedBean>
            -                                        <java class="java.beans.XMLDecoder">
            -                                          <object class="com.install4j.runtime.beans.actions.registry.SetRegistryValueAction">
            -                                            <void property="keyName">
            -                                              <string>SYSTEM\CurrentControlSet\Services\${installer:installationID}</string>
            -                                            </void>
            -                                            <void property="registryRoot">
            -                                              <object class="com.install4j.api.windows.RegistryRoot" field="HKEY_LOCAL_MACHINE" />
            -                                            </void>
            -                                            <void property="value">
            -                                              <string>"${installer:sys.installationDir}\bin\tomcat7.exe" "//RS//${installer:installationID}"</string>
            -                                            </void>
            -                                            <void property="valueName">
            -                                              <string>ImagePath</string>
            -                                            </void>
            -                                          </object>
            -                                        </java>
            -                                      </serializedBean>
            -                                      <condition>import com.atlassian.inception.ConfluenceUpgradeHelper;
            -                  import com.atlassian.inception.VersionStringComparator;
            -                  import com.atlassian.inception.UpgradeHelper;
            +                  <action name="Change Tomcat executable in Windows Registry when upgrading from Tomcat 6 to Tomcat 8" id="70902" customizedId="" beanClass="com.install4j.runtime.beans.actions.registry.SetRegistryValueAction" enabled="true" commentSet="false" comment="" rollbackBarrier="false" multiExec="false" failureStrategy="1" errorMessage="Failed when updating the Tomcat path">
            +                    <serializedBean>
            +                      <java class="java.beans.XMLDecoder">
            +                        <object class="com.install4j.runtime.beans.actions.registry.SetRegistryValueAction">
            +                          <void property="keyName">
            +                            <string>SYSTEM\CurrentControlSet\Services\${installer:installationID}</string>
            +                          </void>
            +                          <void property="registryRoot">
            +                            <object class="com.install4j.api.windows.RegistryRoot" field="HKEY_LOCAL_MACHINE" />
            +                          </void>
            +                          <void property="value">
            +                            <string>"${installer:sys.installationDir}\bin\tomcat8.exe" "//RS//${installer:installationID}"</string>
            +                          </void>
            +                          <void property="valueName">
            +                            <string>ImagePath</string>
            +                          </void>
            +                        </object>
            +                      </java>
            +                    </serializedBean>
            +                    <condition>import com.atlassian.inception.ConfluenceUpgradeHelper;
            +import com.atlassian.inception.VersionStringComparator;
            +import com.atlassian.inception.UpgradeHelper;
             
            -                  boolean isWindows = Util.isWindows();
            -                  boolean isUpgrade = context.getBooleanVariable("sys.confirmedUpdateInstallation");
            -                  boolean isUpgradingFromTomcat6 = false;
            +boolean isWindows = Util.isWindows();
            +boolean isUpgrade = context.getBooleanVariable("sys.confirmedUpdateInstallation");
            +boolean isUpgradingTomcat = false;
             
            -                  if (!isWindows || !isUpgrade) {
            -                      return false;
            -                  }
            +if (!isWindows || !isUpgrade) {
            +  return false;
            +}
             
            -                  try
            -                  {
            -                     String installDir = (String) context.getVariable("existingInstallationDir");
            -                     UpgradeHelper upgradeHelper = new ConfluenceUpgradeHelper(installDir);
            -                     String currInstallationVersion = (String) upgradeHelper.getExistingInstallationVersion();
            -                     VersionStringComparator versionComparator = new VersionStringComparator();
            -                     // If current version is lower than 5.5 we need to update the Tomcat path in the service
            -                     isUpgradingFromTomcat6 = versionComparator.compare(currInstallationVersion, "5.5") &lt; 0;
            +try
            +{
            + String installDir = (String) context.getVariable("existingInstallationDir");
            + UpgradeHelper upgradeHelper = new ConfluenceUpgradeHelper(installDir);
            + String currInstallationVersion = (String) upgradeHelper.getExistingInstallationVersion();
            + VersionStringComparator versionComparator = new VersionStringComparator();
            + // If current version is lower than 5.5 we need to update the Tomcat path in the service
            + isUpgradingTomcat = versionComparator.compare(currInstallationVersion, "5.8") &lt; 0;
             
            -                     return isUpgradingFromTomcat6;
            -                  }
            -                  catch (Exception e)
            -                  {
            -                      Util.log(e);
            -                      // An exception that we did not expect was thrown. Give feedback to the user
            -                      Util.showErrorMessage(context.getMessage("error.unable.to.update.jvm.path"));
            -                      if (context.isConsole())
            -                      {
            -                          context.finish(0); // exit the upgrader if we are in console mode
            -                      }
            + return isUpgradingTomcat;
            +}
            +catch (Exception e)
            +{
            +  Util.log(e);
            +  // An exception that we did not expect was thrown. Give feedback to the user
            +  Util.showErrorMessage(context.getMessage("error.unable.to.update.jvm.path"));
            +  if (context.isConsole())
            +  {
            +      context.finish(0); // exit the upgrader if we are in console mode
            +  }
             
            -                      return false;
            -                  }</condition>
            +  return false;
            +}</condition>
                               </action>
                             </actions>
                             <formComponents />
            @@ -3334,6 +3334,12 @@ return true;</string>
                                           </void>
                                         </array>
                                       </void>
            +                          <void property="environmentVariables">
            +                            <void method="put">
            +                              <string>JRE_HOME</string>
            +                              <string>${installer:sys.installationDir}\jre</string>
            +                            </void>
            +                          </void>
                                       <void property="executable">
                                         <object class="java.io.File">
                                           <string>bin/service.bat</string>
            @@ -3344,7 +3350,7 @@ return true;</string>
                                       </void>
                                       <void property="workingDirectory">
                                         <object class="java.io.File">
            -                              <string>.</string>
            +                              <string>${installer:sys.installationDir}</string>
                                         </object>
                                       </void>
                                     </object>
            @@ -3848,14 +3854,14 @@ catch (Exception e)
                                     <object class="com.install4j.runtime.beans.actions.files.MoveFileAction">
                                       <void property="destinationFile">
                                         <object class="java.io.File">
            -                              <string>bin/tomcat7.exe.x32</string>
            +                              <string>bin/tomcat8.exe.x32</string>
                                         </object>
                                       </void>
                                       <void property="files">
                                         <array class="java.io.File" length="1">
                                           <void index="0">
                                             <object class="java.io.File">
            -                                  <string>bin/tomcat7.exe</string>
            +                                  <string>bin/tomcat8.exe</string>
                                             </object>
                                           </void>
                                         </array>
            @@ -3894,14 +3900,14 @@ catch (Exception e)
                                     <object class="com.install4j.runtime.beans.actions.files.CopyFileAction">
                                       <void property="destinationFile">
                                         <object class="java.io.File">
            -                              <string>bin/tomcat7.exe</string>
            +                              <string>bin/tomcat8.exe</string>
                                         </object>
                                       </void>
                                       <void property="files">
                                         <array class="java.io.File" length="1">
                                           <void index="0">
                                             <object class="java.io.File">
            -                                  <string>bin/tomcat7.exe.x64</string>
            +                                  <string>bin/tomcat8.exe.x64</string>
                                             </object>
                                           </void>
                                         </array>
            @@ -5024,7 +5030,7 @@ return true;</string>
                 </applications>
               </installerGui>
               <mediaSets>
            -    <windows name="Windows" id="22" customizedId="" mediaFileName="atlassian-confluence-${compiler:app.version}-x32" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="32" runPostProcessor="true" postProcessor="mono ${compiler:install4j.home}/resource/signcode.exe -spc ${compiler:keystore.home}/atlassian.spc  -v ${compiler:keystore.home}/private.pvk -vp ${compiler:keystore.password} -t http://timestamp.verisign.com/scripts/timstamp.dll $EXECUTABLE" failOnPostProcessorError="true" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.7.0_15-windows-x86" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="" verifyIntegrity="true">
            +    <windows name="Windows" id="22" customizedId="" mediaFileName="atlassian-confluence-${compiler:app.version}-x32" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="32" runPostProcessor="true" postProcessor="mono ${compiler:install4j.home}/resource/signcode.exe -spc ${compiler:keystore.home}/atlassian.spc  -v ${compiler:keystore.home}/private.pvk -vp ${compiler:keystore.password} -t http://timestamp.verisign.com/scripts/timstamp.dll $EXECUTABLE" failOnPostProcessorError="true" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.8.0_51-windows-x86" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="" verifyIntegrity="true">
                   <excludedLaunchers />
                   <excludedBeans />
                   <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
            @@ -5037,7 +5043,7 @@ return true;</string>
                   <excludedComponents />
                   <includedDownloadableComponents />
                 </windows>
            -    <unixInstaller name="Unix Installer" id="66154" customizedId="" mediaFileName="atlassian-${compiler:app.name.lower}-${compiler:app.version}-x32" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.7.0_15-linux-x86" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="">
            +    <unixInstaller name="Unix Installer" id="66154" customizedId="" mediaFileName="atlassian-${compiler:app.name.lower}-${compiler:app.version}-x32" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.8.0_51-linux-x86" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="">
                   <excludedLaunchers />
                   <excludedBeans />
                   <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
            @@ -5066,7 +5072,7 @@ return true;</string>
                     <content />
                   </installerScript>
                 </unixInstaller>
            -    <unixInstaller name="Linux 64bit Installer" id="68855" customizedId="" mediaFileName="atlassian-${compiler:app.name.lower}-${compiler:app.version}-x64" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.7.0_15-linux-x64" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="">
            +    <unixInstaller name="Linux 64bit Installer" id="68855" customizedId="" mediaFileName="atlassian-${compiler:app.name.lower}-${compiler:app.version}-x64" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.8.0_51-linux-x64" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="">
                   <excludedLaunchers />
                   <excludedBeans />
                   <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
            @@ -5095,7 +5101,7 @@ return true;</string>
                     <content />
                   </installerScript>
                 </unixInstaller>
            -    <windows name="Windows 64 bit" id="69984" customizedId="" mediaFileName="atlassian-confluence-${compiler:app.version}-x64" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="mono ${compiler:install4j.home}/resource/signcode.exe -spc ${compiler:keystore.home}/atlassian.spc  -v ${compiler:keystore.home}/private.pvk -vp ${compiler:keystore.password} -t http://timestamp.verisign.com/scripts/timstamp.dll $EXECUTABLE" failOnPostProcessorError="true" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.7.0_15-windows-x64" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="" verifyIntegrity="true">
            +    <windows name="Windows 64 bit" id="69984" customizedId="" mediaFileName="atlassian-confluence-${compiler:app.version}-x64" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="mono ${compiler:install4j.home}/resource/signcode.exe -spc ${compiler:keystore.home}/atlassian.spc  -v ${compiler:keystore.home}/private.pvk -vp ${compiler:keystore.password} -t http://timestamp.verisign.com/scripts/timstamp.dll $EXECUTABLE" failOnPostProcessorError="true" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.8.0_51-windows-x64" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="" verifyIntegrity="true">
                   <excludedLaunchers />
                   <excludedBeans />
                   <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
            
            

            Graham Gatus added a comment - - edited Looks like this has already been fixed. i cant find any references to "1.7" in confluence-distribution/installer/confluence-template.install4j. I did a diff between the master version, and tag 5.8-OD-50-011-x64, which was the version of confluence the customer was using where the installer failed to work (see https://support.atlassian.com/browse/CSP-147037 ). Diff is attached below. There is one section for the Windows 6 bit installers where the includedJRE for the installers has been updated from 1.7 to 1.8, so it looks like the issue has already fixed. Was not able to reproduce on Windows 7, 32 bit, with JAVA_HOME set to a 1.7 java installation, using the latest installers. diff --git a/installer/confluence-template.install4j b/installer/confluence-template.install4j index 646e278..38a95e8 100644 --- a/installer/confluence-template.install4j +++ b/installer/confluence-template.install4j @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <install4j version="5.0.9" transformSequenceNumber="3"> <directoryPresets config="./bin/user.sh" /> - <application name="${compiler:app.name} ${compiler:app.version}" distributionSourceDir="" applicationId="9713-7075-2654-3663" mediaDir="target" mediaFilePattern="atlassian-${compiler:app.name.lower}-${compiler:app.version}" compression="6" lzmaCompression="false" pack200Compression="false" excludeSignedFromPacking="true" commonExternalFiles="false" createMd5Sums="true" shrinkRuntime="true" shortName="${compiler:app.name}" publisher="Atlassian" publisherWeb="http://www.atlassian.com/" version="${compiler:app.version}" allPathsRelative="true" backupOnSave="false" autoSave="true" convertDotsToUnderscores="false" macSignature="????" installerName="" javaMinVersion="1.7" javaMaxVersion="" allowBetaVM="false" jdkMode="runtimeJre" jdkName=""> + <application name="${compiler:app.name} ${compiler:app.version}" distributionSourceDir="" applicationId="9713-7075-2654-3663" mediaDir="target" mediaFilePattern="atlassian-${compiler:app.name.lower}-${compiler:app.version}" compression="6" lzmaCompression="false" pack200Compression="false" excludeSignedFromPacking="true" commonExternalFiles="false" createMd5Sums="true" shrinkRuntime="true" shortName="${compiler:app.name}" publisher="Atlassian" publisherWeb="http://www.atlassian.com/" version="${compiler:app.version}" allPathsRelative="true" backupOnSave="false" autoSave="true" convertDotsToUnderscores="false" macSignature="????" installerName="" javaMinVersion="1.8" javaMaxVersion="" allowBetaVM="false" jdkMode="runtimeJre" jdkName=""> <languages skipLanguageSelection="true" languageSelectionInPrincipalLanguage="false"> <principalLanguage id="en" customLocalizationFile="./messages/messages_en.utf8" /> <additionalLanguages /> @@ -2424,7 +2424,7 @@ import com.atlassian.inception.UpgradeHelper; boolean isWindows = Util.isWindows(); boolean isUpgrade = context.getBooleanVariable("sys.confirmedUpdateInstallation"); -boolean isUpgradingFromJava6 = false; +boolean isUpgradingJava = false; if (!isWindows || !isUpgrade) { return false; @@ -2436,10 +2436,10 @@ try UpgradeHelper upgradeHelper = new ConfluenceUpgradeHelper(installDir); String currInstallationVersion = (String) upgradeHelper.getExistingInstallationVersion(); VersionStringComparator versionComparator = new VersionStringComparator(); - //If current version is lower than 5.0 we are upgrading from JRE 6 to 7 - isUpgradingFromJava6 = versionComparator.compare(currInstallationVersion, "5.0") &lt; 0; + // If current version is lower than 5.8 we are upgrading the JRE to 8 + isUpgradingJava = versionComparator.compare(currInstallationVersion, "5.8") &lt; 0; - return isUpgradingFromJava6; + return isUpgradingJava; } catch (Exception e) { @@ -2454,60 +2454,60 @@ catch (Exception e) return false; }</condition> </action> - <action name="Change Tomcat executable in Windows Registry when upgrading from Tomcat 6 to Tomcat 7" id="70902" customizedId="" beanClass="com.install4j.runtime.beans.actions.registry.SetRegistryValueAction" enabled="true" commentSet="false" comment="" rollbackBarrier="false" multiExec="false" failureStrategy="1" errorMessage="Failed when updating the Tomcat path"> - <serializedBean> - <java class="java.beans.XMLDecoder"> - <object class="com.install4j.runtime.beans.actions.registry.SetRegistryValueAction"> - <void property="keyName"> - <string>SYSTEM\CurrentControlSet\Services\${installer:installationID}</string> - </void> - <void property="registryRoot"> - <object class="com.install4j.api.windows.RegistryRoot" field="HKEY_LOCAL_MACHINE" /> - </void> - <void property="value"> - <string>"${installer:sys.installationDir}\bin\tomcat7.exe" "//RS//${installer:installationID}"</string> - </void> - <void property="valueName"> - <string>ImagePath</string> - </void> - </object> - </java> - </serializedBean> - <condition>import com.atlassian.inception.ConfluenceUpgradeHelper; - import com.atlassian.inception.VersionStringComparator; - import com.atlassian.inception.UpgradeHelper; + <action name="Change Tomcat executable in Windows Registry when upgrading from Tomcat 6 to Tomcat 8" id="70902" customizedId="" beanClass="com.install4j.runtime.beans.actions.registry.SetRegistryValueAction" enabled="true" commentSet="false" comment="" rollbackBarrier="false" multiExec="false" failureStrategy="1" errorMessage="Failed when updating the Tomcat path"> + <serializedBean> + <java class="java.beans.XMLDecoder"> + <object class="com.install4j.runtime.beans.actions.registry.SetRegistryValueAction"> + <void property="keyName"> + <string>SYSTEM\CurrentControlSet\Services\${installer:installationID}</string> + </void> + <void property="registryRoot"> + <object class="com.install4j.api.windows.RegistryRoot" field="HKEY_LOCAL_MACHINE" /> + </void> + <void property="value"> + <string>"${installer:sys.installationDir}\bin\tomcat8.exe" "//RS//${installer:installationID}"</string> + </void> + <void property="valueName"> + <string>ImagePath</string> + </void> + </object> + </java> + </serializedBean> + <condition>import com.atlassian.inception.ConfluenceUpgradeHelper; +import com.atlassian.inception.VersionStringComparator; +import com.atlassian.inception.UpgradeHelper; - boolean isWindows = Util.isWindows(); - boolean isUpgrade = context.getBooleanVariable("sys.confirmedUpdateInstallation"); - boolean isUpgradingFromTomcat6 = false; +boolean isWindows = Util.isWindows(); +boolean isUpgrade = context.getBooleanVariable("sys.confirmedUpdateInstallation"); +boolean isUpgradingTomcat = false; - if (!isWindows || !isUpgrade) { - return false; - } +if (!isWindows || !isUpgrade) { + return false; +} - try - { - String installDir = (String) context.getVariable("existingInstallationDir"); - UpgradeHelper upgradeHelper = new ConfluenceUpgradeHelper(installDir); - String currInstallationVersion = (String) upgradeHelper.getExistingInstallationVersion(); - VersionStringComparator versionComparator = new VersionStringComparator(); - // If current version is lower than 5.5 we need to update the Tomcat path in the service - isUpgradingFromTomcat6 = versionComparator.compare(currInstallationVersion, "5.5") &lt; 0; +try +{ + String installDir = (String) context.getVariable("existingInstallationDir"); + UpgradeHelper upgradeHelper = new ConfluenceUpgradeHelper(installDir); + String currInstallationVersion = (String) upgradeHelper.getExistingInstallationVersion(); + VersionStringComparator versionComparator = new VersionStringComparator(); + // If current version is lower than 5.5 we need to update the Tomcat path in the service + isUpgradingTomcat = versionComparator.compare(currInstallationVersion, "5.8") &lt; 0; - return isUpgradingFromTomcat6; - } - catch (Exception e) - { - Util.log(e); - // An exception that we did not expect was thrown. Give feedback to the user - Util.showErrorMessage(context.getMessage("error.unable.to.update.jvm.path")); - if (context.isConsole()) - { - context.finish(0); // exit the upgrader if we are in console mode - } + return isUpgradingTomcat; +} +catch (Exception e) +{ + Util.log(e); + // An exception that we did not expect was thrown. Give feedback to the user + Util.showErrorMessage(context.getMessage("error.unable.to.update.jvm.path")); + if (context.isConsole()) + { + context.finish(0); // exit the upgrader if we are in console mode + } - return false; - }</condition> + return false; +}</condition> </action> </actions> <formComponents /> @@ -3334,6 +3334,12 @@ return true;</string> </void> </array> </void> + <void property="environmentVariables"> + <void method="put"> + <string>JRE_HOME</string> + <string>${installer:sys.installationDir}\jre</string> + </void> + </void> <void property="executable"> <object class="java.io.File"> <string>bin/service.bat</string> @@ -3344,7 +3350,7 @@ return true;</string> </void> <void property="workingDirectory"> <object class="java.io.File"> - <string>.</string> + <string>${installer:sys.installationDir}</string> </object> </void> </object> @@ -3848,14 +3854,14 @@ catch (Exception e) <object class="com.install4j.runtime.beans.actions.files.MoveFileAction"> <void property="destinationFile"> <object class="java.io.File"> - <string>bin/tomcat7.exe.x32</string> + <string>bin/tomcat8.exe.x32</string> </object> </void> <void property="files"> <array class="java.io.File" length="1"> <void index="0"> <object class="java.io.File"> - <string>bin/tomcat7.exe</string> + <string>bin/tomcat8.exe</string> </object> </void> </array> @@ -3894,14 +3900,14 @@ catch (Exception e) <object class="com.install4j.runtime.beans.actions.files.CopyFileAction"> <void property="destinationFile"> <object class="java.io.File"> - <string>bin/tomcat7.exe</string> + <string>bin/tomcat8.exe</string> </object> </void> <void property="files"> <array class="java.io.File" length="1"> <void index="0"> <object class="java.io.File"> - <string>bin/tomcat7.exe.x64</string> + <string>bin/tomcat8.exe.x64</string> </object> </void> </array> @@ -5024,7 +5030,7 @@ return true;</string> </applications> </installerGui> <mediaSets> - <windows name="Windows" id="22" customizedId="" mediaFileName="atlassian-confluence-${compiler:app.version}-x32" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="32" runPostProcessor="true" postProcessor="mono ${compiler:install4j.home}/resource/signcode.exe -spc ${compiler:keystore.home}/atlassian.spc -v ${compiler:keystore.home}/private.pvk -vp ${compiler:keystore.password} -t http://timestamp.verisign.com/scripts/timstamp.dll $EXECUTABLE" failOnPostProcessorError="true" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.7.0_15-windows-x86" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="" verifyIntegrity="true"> + <windows name="Windows" id="22" customizedId="" mediaFileName="atlassian-confluence-${compiler:app.version}-x32" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="32" runPostProcessor="true" postProcessor="mono ${compiler:install4j.home}/resource/signcode.exe -spc ${compiler:keystore.home}/atlassian.spc -v ${compiler:keystore.home}/private.pvk -vp ${compiler:keystore.password} -t http://timestamp.verisign.com/scripts/timstamp.dll $EXECUTABLE" failOnPostProcessorError="true" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.8.0_51-windows-x86" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="" verifyIntegrity="true"> <excludedLaunchers /> <excludedBeans /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" /> @@ -5037,7 +5043,7 @@ return true;</string> <excludedComponents /> <includedDownloadableComponents /> </windows> - <unixInstaller name="Unix Installer" id="66154" customizedId="" mediaFileName="atlassian-${compiler:app.name.lower}-${compiler:app.version}-x32" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.7.0_15-linux-x86" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL=""> + <unixInstaller name="Unix Installer" id="66154" customizedId="" mediaFileName="atlassian-${compiler:app.name.lower}-${compiler:app.version}-x32" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.8.0_51-linux-x86" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL=""> <excludedLaunchers /> <excludedBeans /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" /> @@ -5066,7 +5072,7 @@ return true;</string> <content /> </installerScript> </unixInstaller> - <unixInstaller name="Linux 64bit Installer" id="68855" customizedId="" mediaFileName="atlassian-${compiler:app.name.lower}-${compiler:app.version}-x64" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.7.0_15-linux-x64" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL=""> + <unixInstaller name="Linux 64bit Installer" id="68855" customizedId="" mediaFileName="atlassian-${compiler:app.name.lower}-${compiler:app.version}-x64" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.8.0_51-linux-x64" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL=""> <excludedLaunchers /> <excludedBeans /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" /> @@ -5095,7 +5101,7 @@ return true;</string> <content /> </installerScript> </unixInstaller> - <windows name="Windows 64 bit" id="69984" customizedId="" mediaFileName="atlassian-confluence-${compiler:app.version}-x64" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="mono ${compiler:install4j.home}/resource/signcode.exe -spc ${compiler:keystore.home}/atlassian.spc -v ${compiler:keystore.home}/private.pvk -vp ${compiler:keystore.password} -t http://timestamp.verisign.com/scripts/timstamp.dll $EXECUTABLE" failOnPostProcessorError="true" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.7.0_15-windows-x64" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="" verifyIntegrity="true"> + <windows name="Windows 64 bit" id="69984" customizedId="" mediaFileName="atlassian-confluence-${compiler:app.version}-x64" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="mono ${compiler:install4j.home}/resource/signcode.exe -spc ${compiler:keystore.home}/atlassian.spc -v ${compiler:keystore.home}/private.pvk -vp ${compiler:keystore.password} -t http://timestamp.verisign.com/scripts/timstamp.dll $EXECUTABLE" failOnPostProcessorError="true" useLegacyMediaFileIds="false" legacyMediaFileIds="" includedJRE="jre1.8.0_51-windows-x64" manualJREEntry="false" bundleType="1" jreURL="" jreFtpURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" downloadURL="" verifyIntegrity="true"> <excludedLaunchers /> <excludedBeans /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" />

            I can confirm that confluence 5.8.9 will not work without java 8. Using tar install and local java.

            Henrik Juul Pedersen added a comment - I can confirm that confluence 5.8.9 will not work without java 8. Using tar install and local java.

            The same error came up after I upgraded our locally installed Confluence version with 5.8.6 automated installer. The bundled JRE said it was Java 8, but had to install JRE8 locally on the server to make Confluence start again.

            Frederik D. added a comment - The same error came up after I upgraded our locally installed Confluence version with 5.8.6 automated installer. The bundled JRE said it was Java 8, but had to install JRE8 locally on the server to make Confluence start again.

              ggatus Graham Gatus
              sbrannen@atlassian.com Branno (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: