Skip to content
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

Unexpected proxy created - breaks context creation [SPR-10793] #15419

Closed
spring-projects-issues opened this issue Jul 30, 2013 · 2 comments
Closed
Labels
status: bulk-closed

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jul 30, 2013

Michał Politowski opened SPR-10793 and commented

The attached project, when run with mvn test, demonstrates the problem.

A bean foo is advised by DummyAspect that is configured @Around("bean(foo)").
There is also <jdbc:embedded-database> configured with a <jdbc:script>.
And creation of the database fails because unepectedly the script resource bean is proxied:

Tests in error: 
  fails(pl.meep.BugTest): Error creating bean with name 'dataSource': Cannot create inner bean '(inner bean)' of type [org.springframework.jdbc.datasource.init.CompositeDatabasePopulator] while setting bean property 'databasePopulator';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.jdbc.datasource.init.ResourceDatabasePopulator] while setting bean property 'populators' with key [0];
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed;
nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'sun.proxy.$Proxy6 implementing java.lang.Cloneable,java.io.Serializable,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised' to required type 'org.springframework.core.io.Resource[]' for property 'scripts';
nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [sun.proxy.$Proxy6 implementing java.lang.Cloneable,java.io.Serializable,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [org.springframework.core.io.Resource] for property 'scripts[0]': PropertyEditor [org.springframework.core.io.ResourceEditor] returned inappropriate value of type [sun.proxy.$Proxy6 implementing java.lang.Cloneable,java.io.Serializable,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised]

Affects: 3.2.3

Attachments:

1 votes, 4 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Aug 13, 2013

Phil Webb commented

#332

@spring-projects-issues spring-projects-issues added type: bug status: waiting-for-triage and removed type: bug labels Jan 11, 2019
@rstoyanchev rstoyanchev added status: bulk-closed and removed status: waiting-for-triage labels Jan 11, 2019
@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jan 12, 2019

Bulk closing outdated, unresolved issues. Please, reopen if still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: bulk-closed
Projects
None yet
Development

No branches or pull requests

2 participants