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

atlas-sdk fails to launch stash after atlas-clean if stash plugin has UPM code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Tracked Elsewhere
    • Medium
    • None
    • None
    • Plugin Development
    • None

    Description

      The plugin works fine when the stash is setup with the right UPM already, but it is not fine with a clean stash loaded after an atlas-clean has been run on the directory.

      Not only does the plugin fail to load, but the Stash fails to load also and I'm redirected to:

      I find this problem regardless of which upm version I indicate. I've tried whichever one comes with the stash, 2.7.8, and 2.7.10. Doesn't seem to matter what the pom says. Currently, I have it setup like so:

          <properties>
              <stash.version>1.2.4</stash.version>
              <stash.data.version>1.2.4</stash.data.version>
              <amps.version>4.1.2</amps.version>
              <plugin.testrunner.version>1.1</plugin.testrunner.version>          
      <atlassian.templaterenderer.version>1.0.5</atlassian.templaterenderer.ve
      rsion>  
               <appfusions.product.name>Stash Connector for IBM Sametime</appfusions.product.name>
           <upm.license.compatibility.version>2.7.10</upm.license.compatibility.ver
      sion>
              <sal.api.version>2.4.0</sal.api.version>
          </properties>
      
      

      The only workaround I've found is to comment out the UPM code from the plugin, launch the stash, install the latest UPM directly, uncomment my UPM code, and update with atlas-cli 'pi'. This is really a problem for plugin testing. I've had to make do with using atlas-run-standalone in some cases to do basic testing of the plugin, and is especially nasty around release time.

      My colleague ran into this problem as well with a different plugin, although he had good luck with just specifying the UPM version. I have not had such luck. His experiences documented here:
      https://answers.atlassian.com/questions/100333/stash-plugin-with-license-api-failed-to-parse-auditlogentry

      I'm using the latest atlas-sdk (4.1.2) and I found this problem occurred with 4.1.1 as well.

      Oh, and here's the stack trace from the console:

      [INFO] [talledLocalContainer] Exception in thread "Spring executor 6" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'linkBuilder' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [com.atlassian.upm.PluginAccessorAndController]: : Error creating bean with name 'pluginAccessorAndController' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.atlassian.upm.log.AuditLogService]: : Error creating bean with name 'auditLogService' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.upm.log.PluginSettingsAuditLogService]: Constructor threw exception; nested exception is java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"username":"Stash","date":1348131582755,"i18nKey":"upm.auditLog.upm.startup","entryType":"UPM_STARTUP","params":[]}; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditLogService' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.upm.log.PluginSettingsAuditLogService]: Constructor threw exception; nested exception is java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"username":"Stash","date":1348131582755,"i18nKey":"upm.auditLog.upm.startup","entryType":"UPM_STARTUP","params":[]}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pluginAccessorAndController' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.atlassian.upm.log.AuditLogService]: : Error creating bean with name 'auditLogService' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.upm.log.PluginSettingsAuditLogService]: Constructor threw exception; nested exception is java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"username":"Stash","date":1348131582755,"i18nKey":"upm.auditLog.upm.startup","entryType":"UPM_STARTUP","params":[]}; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditLogService' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.upm.log.PluginSettingsAuditLogService]: Constructor threw exception; nested exception is java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"username":"Stash","date":1348131582755,"i18nKey":"upm.auditLog.upm.startup","entryType":"UPM_STARTUP","params":[]}
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      [INFO] [talledLocalContainer] 	at java.security.AccessController.doPrivileged(Native Method)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
      [INFO] [talledLocalContainer] 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
      [INFO] [talledLocalContainer] 	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
      [INFO] [talledLocalContainer] 	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
      [INFO] [talledLocalContainer] 	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
      [INFO] [talledLocalContainer] 	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
      [INFO] [talledLocalContainer] 	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
      [INFO] [talledLocalContainer] 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      [INFO] [talledLocalContainer] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      [INFO] [talledLocalContainer] 	at java.lang.Thread.run(Thread.java:680)
      [INFO] [talledLocalContainer] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pluginAccessorAndController' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.atlassian.upm.log.AuditLogService]: : Error creating bean with name 'auditLogService' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.upm.log.PluginSettingsAuditLogService]: Constructor threw exception; nested exception is java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"username":"Stash","date":1348131582755,"i18nKey":"upm.auditLog.upm.startup","entryType":"UPM_STARTUP","params":[]}; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditLogService' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.upm.log.PluginSettingsAuditLogService]: Constructor threw exception; nested exception is java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"username":"Stash","date":1348131582755,"i18nKey":"upm.auditLog.upm.startup","entryType":"UPM_STARTUP","params":[]}
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      [INFO] [talledLocalContainer] 	at java.security.AccessController.doPrivileged(Native Method)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:671)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:610)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:622)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:584)
      [INFO] [talledLocalContainer] 	... 22 more
      [INFO] [talledLocalContainer] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditLogService' defined in URL [bundle://51.0:0/META-INF/spring/atlassian-plugins-components.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.upm.log.PluginSettingsAuditLogService]: Constructor threw exception; nested exception is java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"username":"Stash","date":1348131582755,"i18nKey":"upm.auditLog.upm.startup","entryType":"UPM_STARTUP","params":[]}
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      [INFO] [talledLocalContainer] 	at java.security.AccessController.doPrivileged(Native Method)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:671)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:610)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:622)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:584)
      [INFO] [talledLocalContainer] 	... 38 more
      [INFO] [talledLocalContainer] Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.upm.log.PluginSettingsAuditLogService]: Constructor threw exception; nested exception is java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"username":"Stash","date":1348131582755,"i18nKey":"upm.auditLog.upm.startup","entryType":"UPM_STARTUP","params":[]}
      [INFO] [talledLocalContainer] 	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:248)
      [INFO] [talledLocalContainer] 	... 53 more
      [INFO] [talledLocalContainer] Caused by: java.lang.RuntimeException: Failed to parse AuditLogEntry from JSON string: {"username":"Stash","date":1348131582755,"i18nKey":"upm.auditLog.upm.startup","entryType":"UPM_STARTUP","params":[]}
      [INFO] [talledLocalContainer] 	at com.atlassian.upm.log.PluginSettingsAuditLogService$4.apply(PluginSettingsAuditLogService.java:504)
      [INFO] [talledLocalContainer] 	at com.atlassian.upm.log.PluginSettingsAuditLogService$4.apply(PluginSettingsAuditLogService.java:495)
      [INFO] [talledLocalContainer] 	at com.google.common.collect.Iterators$8.next(Iterators.java:782)
      [INFO] [talledLocalContainer] 	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:644)
      [INFO] [talledLocalContainer] 	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
      [INFO] [talledLocalContainer] 	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)
      [INFO] [talledLocalContainer] 	at com.google.common.collect.Lists.newArrayList(Lists.java:138)
      [INFO] [talledLocalContainer] 	at com.google.common.collect.Collections2$FilteredCollection.toArray(Collections2.java:228)
      [INFO] [talledLocalContainer] 	at java.util.ArrayList.<init>(ArrayList.java:131)
      [INFO] [talledLocalContainer] 	at com.google.common.collect.Lists.newArrayList(Lists.java:119)
      [INFO] [talledLocalContainer] 	at com.google.common.collect.Ordering.sortedCopy(Ordering.java:512)
      [INFO] [talledLocalContainer] 	at com.atlassian.upm.log.PluginSettingsAuditLogService.purgeEntriesAndTransform(PluginSettingsAuditLogService.java:510)
      [INFO] [talledLocalContainer] 	at com.atlassian.upm.log.PluginSettingsAuditLogService.saveEntryAndPurge(PluginSettingsAuditLogService.java:440)
      [INFO] [talledLocalContainer] 	at com.atlassian.upm.log.PluginSettingsAuditLogService.logI18nMessageWithUsername(PluginSettingsAuditLogService.java:118)
      [INFO] [talledLocalContainer] 	at com.atlassian.upm.log.PluginSettingsAuditLogService.<init>(PluginSettingsAuditLogService.java:97)
      [INFO] [talledLocalContainer] 	at com.atlassian.upm.log.PluginSettingsAuditLogService.<init>(PluginSettingsAuditLogService.java:104)
      [INFO] [talledLocalContainer] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      [INFO] [talledLocalContainer] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      [INFO] [talledLocalContainer] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      [INFO] [talledLocalContainer] 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      [INFO] [talledLocalContainer] 	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
      [INFO] [talledLocalContainer] 	... 55 more
      [INFO] [talledLocalContainer] Caused by: org.codehaus.jackson.map.JsonMappingException: Can not construct instance of com.atlassian.upm.api.log.EntryType from String value 'UPM_STARTUP': value not one of declared Enum instance names
      [INFO] [talledLocalContainer]  at [Source: java.io.StringReader@ef45815; line: 1, column: 78]
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.deser.StdDeserializationContext.weirdStringException(StdDeserializationContext.java:243)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:74)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:23)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:299)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:899)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObjectUsingNonDefault(BeanDeserializer.java:733)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:683)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2723)
      [INFO] [talledLocalContainer] 	at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1854)
      [INFO] [talledLocalContainer] 	at com.atlassian.upm.log.PluginSettingsAuditLogService$4.apply(PluginSettingsAuditLogService.java:500)
      [INFO] [talledLocalContainer] 	... 75 more
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              laura.kolker Laura Kolker
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: