Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-6937

Detect and prevent startup when the installation path contains spaces and consider allowing Stash to start in a directory containing spaces

      HTR:

      • Platform tested: Windows7 x64
      • Install 3.5.1 on a path that contains spaces.
        • e.g. C:\Program Files\Atlassian\Application\Stash\3.5.1
      • Start Stash.
      Observe the failure:
      2014-12-23 16:54:34,417 INFO  [spring-startup]  c.a.s.i.server.BuildInfoLogger Starting Stash 3.5.1 (db2bf99 built on Tue Dec 16 05:57:05 CST 2014)
      2014-12-23 16:54:34,428 INFO  [spring-startup]  c.a.s.i.server.BuildInfoLogger JVM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.7.0_10-b18
      2014-12-23 16:54:34,463 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory C:\Program Files\Atlassian\Application_Data\Stash\3.5.1
      2014-12-23 16:54:36,566 INFO  [spring-startup]  c.a.s.internal.ApplicationSettings Updated home version from 3.4.5 to 3.5.1
      2014-12-23 16:54:37,940 WARN  [spring-startup]  com.jolbox.bonecp.BoneCPConfig JDBC password not set in driver properties, copying it from pool config
      2014-12-23 16:54:41,892 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory C:\Program Files\Atlassian\Application_Data\Stash\3.5.1\shared
      2014-12-23 16:54:44,068 WARN  [spring-startup]  com.hazelcast.instance.Node [172.20.3.6]:5701 [bamboo-agent] [3.3.1-atlassian-10] No join method is enabled! Starting standalone.
      2014-12-23 16:55:13,600 INFO  [spring-startup]  c.a.s.i.hook.DefaultHookService Hook callback socket listening on 127.0.0.1:62203
      2014-12-23 16:55:26,005 WARN  [spring-startup]  c.a.p.o.f.t.s.ScanDescriptorForHostClassesStage The plugin 'atlassian-universal-plugin-manager-plugin-2.18.1.jar' uses a package 'org.apache.commons.fileupload.servlet' that is also exported by the application.  It is highly recommended that the plugin use its own packages.
      2014-12-23 16:55:36,894 INFO  [ThreadPoolAsyncTaskExecutor::Thread 54]  c.a.s.i.s.g.t.DefaultTranscodeServer Callback socket listening at 127.0.0.1:62227
      2014-12-23 16:55:46,998 WARN  [spring-startup]  c.a.s.i.p.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle com.atlassian.oauth.atlassian-oauth-service-provider-plugin as it does not exist
      2014-12-23 16:55:51,515 WARN  [spring-startup]  c.a.s.i.p.StaticPluginPathScanner Cannot scan directory /static/feature/tasks/icons/ in web static as it does not exist
      2014-12-23 16:55:52,406 WARN  [spring-startup]  c.a.stash.internal.home.HomeTracker The shared home directory has been moved from C:\Program Files\Atlassian\Application_Data\Stash\3.4.5\shared to C:\Program Files\Atlassian\Application_Data\Stash\3.5.1\shared
      2014-12-23 16:55:52,442 INFO  [spring-startup]  c.a.stash.internal.home.HomeTracker Invoking 1 handler(s) after shared home directory update
      2014-12-23 16:55:52,447 INFO  [spring-startup]  c.a.stash.internal.home.HomeTracker 1 handler(s) have applied the home directory update successfully
      2014-12-23 16:55:52,448 INFO  [spring-startup]  c.a.stash.internal.home.HomeTracker Updating benchmark shared home directory: C:\Program Files\Atlassian\Application_Data\Stash\3.5.1\shared
      2014-12-23 16:55:52,763 INFO  [spring-startup]  c.a.s.internal.scm.PluginScmService Stash is using c:\devTools\Git\bin\git.exe version 1.7.9
      2014-12-23 16:55:52,871 INFO  [spring-startup]  c.a.s.i.hazelcast.HazelcastLifecycle Updating Hazelcast instance capabilities
      2014-12-23 16:55:54,869 ERROR [http-nio-7990-exec-9] @7D0AEUx1015x5x0 1lffhyg 0:0:0:0:0:0:0:1 "GET /mvc/error500 HTTP/1.1" c.a.s.i.web.ErrorPageController There was an unhandled exception loading [/setup]
      org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.atlassian.soy.renderer.SoyException: Unable to compile Soy templates at: com.atlassian.stash.stash-web-plugin:server-soy-templates
      	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978) ~[FrameworkServlet.class:4.1.1.RELEASE]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) ~[na:na]
      	at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:111) ~[StashAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111) ~[BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77) ~[BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) ~[TrustedApplicationsFilter.class:na]
      	at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:79) ~[na:na]
      	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) ~[TrustedApplicationsFilter.class:na]
      	at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:79) ~[na:na]
      	at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:32) ~[na:na]
      	at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32) ~[na:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89) ~[BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) ~[BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:85) ~[DefaultRequestManager.class:na]
      	at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) ~[ConfigurableWebFilter.class:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_10]
      	at java.lang.Thread.run(Thread.java:722) [na:1.7.0_10]
      	... 215 frames trimmed
      Caused by: com.atlassian.soy.renderer.SoyException: Unable to compile Soy templates at: com.atlassian.stash.stash-web-plugin:server-soy-templates
      	at com.atlassian.soy.impl.DefaultSoyManager.render(DefaultSoyManager.java:127) ~[na:na]
      	at com.atlassian.soy.impl.DefaultSoyTemplateRenderer.render(DefaultSoyTemplateRenderer.java:52) ~[na:na]
      	at com.atlassian.stash.internal.plugin.OsgiServiceProxyFactoryImpl$DynamicServiceInvocationHandler.invoke(OsgiServiceProxyFactoryImpl.java:119) ~[OsgiServiceProxyFactoryImpl$DynamicServiceInvocationHandler.class:na]
      	at com.atlassian.soy.springmvc.SoyView.render(SoyView.java:55) ~[SoyView.class:na]
      	at com.atlassian.stash.internal.web.soy.StashSoyViewResolver$1.render(StashSoyViewResolver.java:33) ~[StashSoyViewResolver$1.class:na]
      	... 17 common frames omitted
      Caused by: com.google.template.soy.base.SoySyntaxException: Error opening Soy file C:\Program%20Files\Atlassian\Application\Stash\3.5.1\atlassian-stash\static\webpanels\stash-getting-started-panels.soy: java.io.FileNotFoundException: C:\Program%20Files\Atlassian\Application\Stash\3.5.1\atlassian-stash\static\webpanels\stash-getting-started-panels.soy (The system cannot find the path specified)
      	at com.google.template.soy.base.SoySyntaxException.createWithoutMetaInfo(SoySyntaxException.java:52) ~[na:na]
      	at com.google.template.soy.soyparse.SoyFileSetParser.parseSoyFileHelper(SoyFileSetParser.java:261) ~[na:na]
      	at com.google.template.soy.soyparse.SoyFileSetParser.parseWithVersions(SoyFileSetParser.java:213) ~[na:na]
      	at com.google.template.soy.soyparse.SoyFileSetParser.parse(SoyFileSetParser.java:173) ~[na:na]
      	at com.google.template.soy.SoyFileSet.compileToTofu(SoyFileSet.java:792) ~[na:na]
      	at com.google.template.soy.SoyFileSet.compileToTofu(SoyFileSet.java:772) ~[na:na]
      	at com.atlassian.soy.impl.DefaultSoyManager.strainTofu(DefaultSoyManager.java:213) ~[na:na]
      	at com.atlassian.soy.impl.DefaultSoyManager.access$100(DefaultSoyManager.java:31) ~[na:na]
      	at com.atlassian.soy.impl.DefaultSoyManager$1.load(DefaultSoyManager.java:71) ~[na:na]
      	at com.atlassian.soy.impl.DefaultSoyManager$1.load(DefaultSoyManager.java:67) ~[na:na]
      	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568) ~[LocalCache$LoadingValueReference.class:na]
      	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350) ~[LocalCache$Segment.class:na]
      	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313) ~[LocalCache$Segment.class:na]
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228) ~[LocalCache$Segment.class:na]
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3965) ~[LocalCache.class:na]
      	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969) ~[LocalCache.class:na]
      	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829) ~[LocalCache$LocalManualCache.class:na]
      	at com.google.common.cache.LocalCache$LocalManualCache.getUnchecked(LocalCache.java:4834) ~[LocalCache$LocalManualCache.class:na]
      	at com.atlassian.soy.impl.DefaultSoyManager.render(DefaultSoyManager.java:108) ~[na:na]
      	... 21 common frames omitted

      Notes

      • This was enforced via the installer as early as version 3.2.
      • This was not an issue in 3.4.5.
      • Alternatively allow our code to work when Stash is installed in a directory which contains spaces. Current error is with Soy rendering: "C:\Program%20Files\Atlassian\Application\Stash\3.5.1\atlassian-stash\static\webpanels\stash-getting-started-panels.soy (The system cannot find the path specified)
        at com.google.template.soy.base.SoySyntaxException.createWithoutMetaInfo(SoySyntaxException.java:52) ~[na:na]"

            [BSERV-6937] Detect and prevent startup when the installation path contains spaces and consider allowing Stash to start in a directory containing spaces

            Brent P added a comment -

            This is a bug introduced in soy templates 3.0.0 and fixed in soy templates 3.3.5.

            Brent P added a comment - This is a bug introduced in soy templates 3.0.0 and fixed in soy templates 3.3.5 .

            npellow, I reviewed the installer and it in fact checks to see if there are spaces in the installation path and asks the user to make the necessary correction. There doesn't seem to be a regression in that validation. I spoke to drohan and he thinks he might have installed Stash using the package distribution and not the installer, so he's going to try and reproduce it on his Win 7 machine to confirm.

            Juan Palacios (Inactive) added a comment - npellow , I reviewed the installer and it in fact checks to see if there are spaces in the installation path and asks the user to make the necessary correction. There doesn't seem to be a regression in that validation. I spoke to drohan and he thinks he might have installed Stash using the package distribution and not the installer, so he's going to try and reproduce it on his Win 7 machine to confirm.

            Nick added a comment -

            jpalacios - is this a regression which was introduced with the Windows installer at all ?

            Nick added a comment - jpalacios - is this a regression which was introduced with the Windows installer at all ?

              jhinch jhinch (Atlassian)
              drohan Daniel R
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: