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
Fix for issue SPR-12238 not working on IBM java_1.7_64 [SPR-12465] #17071
Comments
Juergen Hoeller commented Could you please double-check whether you upgraded all your Spring Framework modules to 4.1.2? In particular Looking at the stacktrace, it seems like the 4.1.2 version of Juergen |
Chandan commented Yes, all jars are updated. Maven entries <dependency> |
Juergen Hoeller commented Do you possibly have older versions of the jars around, brought onto your classpath transitively? The exception clearly indicates a mismatch between the jar versions there... Juergen |
Chandan commented This is all the spring related JAR (Have excluded Hibernate, JPA etc. ) --Spring Integration, Spring data JPA and Spring security module are at different version, else all at same version number. BTW, I have deployed it on tomcat and standard JDK (oracle) -it works there, only issue with IBM Java in Web Sphere container
<!-- Spring Security Starts-->
<!-- Spring Security Ends--><!-- Spring core and Spring MVC -->
<!-- SPRING DATA START-->
<!-- SPRING DATA END -->
<!-- SPRING AOP ENDS--->
|
Juergen Hoeller commented On review, I still have no idea why you would see such a NoSuchMethodError between Spring jars - since it is clearly referring from spring-websocket to spring-context there, which we always co-release, so they can't be out of sync as long as you're declaring the same Spring version there, which you do as expected. Your dependency declarations look alright, except maybe for AspectJ which you should really upgrade to 1.7.4 or even 1.8.4 at this point. However, that won't be the cause of that NoSuchMethodError... There is definitely an outdated spring-context jar on your WebSphere classpath; I just wonder where it is hiding? Juergen |
Chandan commented Can spring-security be the issue, current release is 3.2.5.RELEASE which has dependencies on 3.2.8 versions of many Jar .. |
Chandan commented BTW, I confirmed, there is no other APP using spring, in fact its the only app sitting inside WebSphere. Atleast there is no possibility of picking it up outside lib, if it helps I can publish the exact versions from lib folder |
Chandan commented List of Jars |
Chandan commented Also tried BOM approach for spring, but no luck |
Chandan commented Did some further testing, it's not only for 4.1.2., it for 4.0.6 and above. If I use 4.0.1 or 4.0.2 ..it works perfect and there is no error. Badly stuck on that, need some pointers to move ahead. Any Idea or checklist which I can perform on Websphere to figure out conflict? |
Juergen Hoeller commented We introduced that call from Generally, an obvious problem is that you have old Spring Framework jars on the classpath. None of those pre-4.1.2 jars should be there: spring-aop-3.2.8, spring-expression-3.2.8, spring-jdbc-3.1.2, spring-orm-3.1.2, spring-tx-3.1.2... Those are all outdated and should point to the 4.1.2 versions instead. That said, funnily enough, you do have spring-context-4.1.2 on your classpath, so the right version for the actual jar affected here. Nevertheless, your stacktrace clearly indicates a call to an old version of spring-context.jar... You could verify at runtime where the Juergen |
Chandan commented I used BOM and now following are the libs exactly on same version spring-websocket-4.1.2.RELEASE Additionally Spring Security Libs (Current GA) This runs me into another issues, According to issue reported here http://stackoverflow.com/questions/24674760/org-springframework-beans-factory-annotation-injectionmetadata-needsrefresh , it is again is due to Spring 4.1 dependency .. Now all the Spring Jars are at same level! Just reiterating, no other app is deployed in container neither WebSphere has any dependency on Spring .. following are my JPA related JARs -but acording to above link it's due to spring 4.* mismatch DB related JARs Since my app is not getting deployed, I am unable to get any details of which class loaders used |
Juergen Hoeller commented A personal note: Sorry for your suffering there... This is the first time in a long while that I'm hearing about so much class loader setup pain! This is a different kind of mismatch now: This time, it's with an old version of spring-beans.jar... Apparently, your new spring-context.jar is being picked up now but an old version of spring-beans is still hiding somewhere and getting picked up in favor of your application-provided spring-beans.jar... To be on the safe side, could you double-check your class loader settings to be PARENT_LAST (or equivalent in the WebSphere world), so that your application-provided jars will override any other jars elsewhere in the server's class loader hierarchy? Juergen |
Bulk closing outdated, unresolved issues. Please, reopen if still relevant. |
Chandan opened SPR-12465 and commented
I updated my Spring to 41.2, but it's throwing error about missing method setRemoveOnCancelPolicy in ThreadPoolTaskSchedulerfailing.
I am using IBM provided Java (version java_1.7_64). and my container is Web Sphere. Asked here as well http://stackoverflow.com/questions/27107825/spring-build-4-1-2-is-throwing-error-about-missing-method-setremoveoncancelpolic. Following is the stack trace
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport.defaultSockJsTaskScheduler()] threw exception; nested exception is java.lang.NoSuchMethodError: org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.setRemoveOnCancelPolicy(Z)V
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1025)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:921)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.jav
Affects: 4.1.2
Reference URL: http://stackoverflow.com/questions/27107825/spring-build-4-1-2-is-throwing-error-about-missing-method-setremoveoncancelpolic
Issue Links:
The text was updated successfully, but these errors were encountered: