Rectangle 27 0

spring java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(LjavalangString;)V?


Hi Rec Thanks for the response ,Which one are you refering to as 2.5.6 .Can you point out that .

Maven uses the principle of the "closest version". "Close" means, how many dependency steps away from your project. So if you do not explicitly include these dependencies in the correct version yet, then start doing it. Nothing is "closer" than the dependency defined in the pom itself. Excluding them can lead to problems as other dependency may need them. Otherwise, refer to this post for an example of how to exclude a dependency. I wouldn't recommend it in your situation though.

Well, look at what you posted yourself: org.springframework:spring-context:jar:2.5.6, org.springframework:spring-beans:jar:2.5.6, etc. There is even a 3.1.0.RC2 in there. All Spring dependencies should have the same version. Just add explicit dependencies on the 3.1.1 version for all of these artifacts to your pom instead of relying on transitive inclusion.

Yes Rec i understand i am missing out something here , spring-context:jar:2.5.6 or spring-beans:jar:2.5.6 is in the dependency tree , but i did not add them explicitly,I am finding trouble in removing them as i need to use 3..1.1 .could you please suggest

You are mixing Spring 3.1.1 with Spring 2.5.6. Add explicit dependencies or dependency management entries for those Spring dependencies that are still on 2.5.6 to upgrade them to 3.1.1 or downgrade your project.

Note
Rectangle 27 0

spring java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(LjavalangString;)V?


<jboss-web>
   <class-loading java2ClassLoadingCompliance="false">
      <loader-repository>
         com.example:archive=<<webarchive name>>
         <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
      </loader-repository>
   </class-loading>
<jboss-web>

I can see the below ways to identify the root cause, 1. Start the server in remote debug mode. 2. If not, may be try out jboss scoped class loading,

Which version of spring jars have you packaged as part of the war? Does it have 2.5.6? Does your war referring it @ run time from anywhere else?

Note
Rectangle 27 0

spring java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(LjavalangString;)V?


Hi Rec Thanks for the response ,Which one are you refering to as 2.5.6 .Can you point out that .

Maven uses the principle of the "closest version". "Close" means, how many dependency steps away from your project. So if you do not explicitly include these dependencies in the correct version yet, then start doing it. Nothing is "closer" than the dependency defined in the pom itself. Excluding them can lead to problems as other dependency may need them. Otherwise, refer to this post for an example of how to exclude a dependency. I wouldn't recommend it in your situation though.

Well, look at what you posted yourself: org.springframework:spring-context:jar:2.5.6, org.springframework:spring-beans:jar:2.5.6, etc. There is even a 3.1.0.RC2 in there. All Spring dependencies should have the same version. Just add explicit dependencies on the 3.1.1 version for all of these artifacts to your pom instead of relying on transitive inclusion.

Yes Rec i understand i am missing out something here , spring-context:jar:2.5.6 or spring-beans:jar:2.5.6 is in the dependency tree , but i did not add them explicitly,I am finding trouble in removing them as i need to use 3..1.1 .could you please suggest

You are mixing Spring 3.1.1 with Spring 2.5.6. Add explicit dependencies or dependency management entries for those Spring dependencies that are still on 2.5.6 to upgrade them to 3.1.1 or downgrade your project.

Note
Rectangle 27 0

spring java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(LjavalangString;)V?


<jboss-web>
   <class-loading java2ClassLoadingCompliance="false">
      <loader-repository>
         com.example:archive=<<webarchive name>>
         <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
      </loader-repository>
   </class-loading>
<jboss-web>

I can see the below ways to identify the root cause, 1. Start the server in remote debug mode. 2. If not, may be try out jboss scoped class loading,

Which version of spring jars have you packaged as part of the war? Does it have 2.5.6? Does your war referring it @ run time from anywhere else?

Note