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

Atlassian JIRA | Thiago Bomfim [Atlassian] | 2 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rp and poroszd . Or join the community to write better ones.
  1. 0

    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: {noformat:title=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 {noformat} *PS:* 'low' is in *unsupported* and it will fail. It needs to be in all caps. *Log of the failure:* {noformat} 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 {noformat}

    Atlassian JIRA | 2 years ago | Thiago Bomfim [Atlassian]
    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
  2. 0

    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: {noformat:title=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 {noformat} *PS:* 'low' is in *unsupported* and it will fail. It needs to be in all caps. *Log of the failure:* {noformat} 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 {noformat}

    Atlassian JIRA | 2 years ago | Thiago Bomfim [Atlassian]
    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
  3. 0
    samebug tip
    Spring expects that the EntityManagerFactory has to be called "entityManagerFactory". It uses convention over configuration to make it easier to use.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    Check Servers Launch Configuration in Eclipse. See the details below.
  6. 0
    samebug tip
    Add slf4j dependency to your pom.xml

  1. rp 2 times, last 3 months ago
  2. asdasd 2 times, last 6 months ago
  3. Tahir 4 times, last 7 months ago
  4. fima 25 times, last 6 months ago
  5. Shadd518 63 times, last 7 months ago
22 more registered users
17 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Spring Beans
    AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues
    1. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)[AutowiredAnnotationBeanPostProcessor.class:4.1.1.RELEASE]
    1 frame
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)[AbstractApplicationContext.class:4.1.1.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)[AbstractApplicationContext.class:4.1.1.RELEASE]
    2 frames
  4. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:158)[servlet-api.jar:3.1.FR]
    1 frame
  5. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[na:1.7.0_71]
    1 frame