New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overloaded setters break Spring XML usage #752
Comments
Faced same problem. I now use the advised factory method, like this: <property name="initVersion" value="#{T(org.flywaydb.core.api.MigrationVersion).fromVersion('1.0')}" /> |
Thanks for reporting and investigating this! I'm not currently sure what the best way to address this would be. I see a couple of options:
Thoughts? |
might be the best to just document the workarround for now |
Are there any updates on any decisions with this issue? |
It would be awesome if you could manage to adhere to the JavaBeans convention. This would resolve this problem cluster. See: Juergen Hoeller said in https://jira.spring.io/browse/SPR-4931
|
Special thanks to @dharrigan for sponsoring the fix of this issue! |
Hi, Confirmation. (See Screenshot) I guess it'll be with you next week sometime. -=david=- On 5 December 2014 at 11:58, Axel Fontaine notifications@github.com wrote:
I prefer encrypted and signed messages. KeyID: B20A22F9 "It is not usually until you've built and used a version of the program No trees were harmed in the sending of this message, however, a number of |
Setting the initVersion property for the xml bean definition of Flyway causes a org.springframework.beans.ConversionNotSupportedException on app start.
Here's what my config looks like:
This config used to work in v2.3 but now breaks after upgrading to 3.0
Everything works fine if I remove the setting of initVersion. Setting initVersion in java, using flyway.setInitVersion("1") for example, also works fine.
Here's the stack trace:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [spring/databaseMigrations.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'org.flywaydb.core.api.MigrationVersion' for property 'initVersion'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [org.flywaydb.core.api.MigrationVersion] for property 'initVersion': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:912)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:855)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:770)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:486)
The text was updated successfully, but these errors were encountered: