Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.9.2
Description
Stash fails to startup if audit.highest.priority.to.log is set with an unsupported value.
This is a configuration setting that controls how many audit events get logged in your STASH_HOME/log/audit/atlassian-stash-audit*.log.
Problem:
If the value attributed to that parameter isn't one of the supported values Stash will fail to come up. Stash doesn't check that before trying to convert it to an enum value.
Here are the supported values:
atlassian-stash.log
# Defines the lowest priority audit events that will be logged. This does not affect items stored in the audit log UI. # Accepted values are: HIGH, MEDIUM, LOW and NONE. Setting the value to HIGH will result in only HIGH level events being logged # NONE will cause no events to be logged. MEDIUM will only allow events with a priority of MEDIUM and HIGH to be logged. audit.highest.priority.to.log=HIGH
PS: 'low' is in unsupported and it will fail. It needs to be in all caps.
Log of the failure:
2014-12-22 15:06:08,392 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditEventListener': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.atlassian.stash.internal.audit.AuditEventListener.setPriorityToLog(com.atlassian.stash.audit.Priority); nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'com.atlassian.stash.audit.Priority'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [com.atlassian.stash.audit.Priority]: no matching editors or conversion strategy found at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[AutowiredAnnotationBeanPostProcessor.class:4.1.1.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) ~[AbstractApplicationContext.class:4.1.1.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) ~[AbstractApplicationContext.class:4.1.1.RELEASE] at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.1.FR] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71] ... 16 frames trimmed Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.atlassian.stash.internal.audit.AuditEventListener.setPriorityToLog(com.atlassian.stash.audit.Priority); nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'com.atlassian.stash.audit.Priority'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [com.atlassian.stash.audit.Priority]: no matching editors or conversion strategy found at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) ~[AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.class:4.1.1.RELEASE] ... 5 common frames omitted Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'com.atlassian.stash.audit.Priority'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [com.atlassian.stash.audit.Priority]: no matching editors or conversion strategy found at org.springframework.beans.TypeConverterSupport.doConvert(TypeConverterSupport.java:74) ~[TypeConverterSupport.class:4.1.1.RELEASE] at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:47) ~[TypeConverterSupport.class:4.1.1.RELEASE] ... 5 common frames omitted Caused by: java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [com.atlassian.stash.audit.Priority]: no matching editors or conversion strategy found at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:287) ~[TypeConverterDelegate.class:4.1.1.RELEASE] at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:107) ~[TypeConverterDelegate.class:4.1.1.RELEASE] at org.springframework.beans.TypeConverterSupport.doConvert(TypeConverterSupport.java:64) ~[TypeConverterSupport.class:4.1.1.RELEASE] ... 6 common frames omitted
Attachments
Issue Links
- mentioned in
-
Page Loading...