-
Notifications
You must be signed in to change notification settings - Fork 38.5k
@PropertySources fails on JDK 7 due to @Repeatable [SPR-11086] #15712
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
Comments
Juergen Hoeller commented The trick is that the JDK itself - ever since some JDK 5 update back then, and definitely since JDK 6 - ignores annotations that are not present in the classpath at class load time, at least for standard class loading purposes. So if you got a ClassNotFoundException, where specifically did that come from? Our ASM-based component scanning maybe, or some reflection-based algorithm? We should be able to ignore such non-present annotations there as well. Juergen |
Juergen Hoeller commented Running our spring-context test suite (which includes Once again, it would be really good to know where that ClassNotFoundException above came from! Even just the stacktrace would be really helpful. Juergen |
Matthias Köster commented Hi Jürgen, We experienced the problem on the computer (Mac OS X) of a colleague of mine. He send me an example project, but today I wasn't able to reproduce the problem on my machine (Mac OS X too). We keep in touch with you, but it's very unlikely that we can provide further information this week. Thanks a lot for following up so quickly! Regards, |
Rafał Borowiec commented Hi, I also experienced the mentioned problem. As a matter of fact, I described this on my blog (before noticing this issue). http://blog.codeleak.pl/2013/11/how-to-propertysource-annotations-in.html In case you need more details let me know. |
Phil Webb commented Thanks Rafał Borowiec, Would you be able to attach the full stacktrace from the snippet that is on your site? |
Rafał Borowiec commented Hi,
2013-11-13 20:49:47.377 [main] ERROR o.s.t.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@6c5cce75] to prepare test instance [pl.codeleak.t.account.UserAuthenticationIntegrationTest@40f69ae7]
Using javac 1.7.0_09 to compile java sources
I hope it helps. |
Matthias Köster commented If I remember it correctly we had the same exception trace. And WE also trief to update an existing spring 3 application to 4RC1. And it worked with a milestone prior to RC1. That's why I commented on Phil's commit on github. |
Matthias Köster commented Our stripped down example. My colleague was able to reproduce the problem by running "mvn jetty:run" on his MacBook. But unfortunately I wasn't able to reproduce it on my MacBook :-( |
Matthias Köster commented We get the following stack trace if we run our test app with "mvn jetty:run": [INFO] Scanning for projects... 2013-11-13 21:12:44.742:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.m.p.JettyWebAppContext@4b38117e{/spring-test,file:/Users/Domi/Documents/dev/springtest/src/main/webapp/,STARTING}{file:/Users/Domi/Documents/dev/springtest/src/main/webapp/} I also attached our stripped down example as springtest.zip. My colleague was able to reproduce the problem by running "mvn jetty:run" on his MacBook. But unfortunately I wasn't able to reproduce it on my MacBook :-( |
Juergen Hoeller commented Funnily enough, it seems to be our own ConfigurationClassParser not adhering to that rule of ignoring non-loadable annotation types... To be fixed for RC2. Juergen |
Juergen Hoeller commented Fixed for 4.0 RC2 now, through ignoring non-loadable annotations in SourceClass.getAnnotations() and therefore in the collectImports algorithm. So aside from the use of Juergen |
Stevo Slavić commented I just reproduced this issue with Spring 4.0.1.RELEASE, spring-scala 1.0.0.RC1, scala 2.10.3, sbt 0.13.1, on Windows 7 and JDK 1.7 update 45. Compilation of my
Seems scala compiler doesn't ignore missing annotations (see https://issues.scala-lang.org/browse/SI-7751) |
Phil Webb opened SPR-11086 and commented
e95bd9e#commitcomment-4547605
Attachments:
Issue Links:
Referenced from: commits ddebda1
0 votes, 7 watchers
The text was updated successfully, but these errors were encountered: