views:

689

answers:

3

I am trying to deploy a spring 3 application on GlassFish v2.1 and am getting the following error:

APPLICATION_CONTEXT_ID_PREFIX at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:431)

I found advice on the spring forum http://forum.springsource.org/showthread.php?t=79929 which says that there is probably another version of spring in the classpath. I am using maven-2 for my dependency management, and there are no other versions of spring in the dependency graph. I also checked the sun updatecenter, which has an option of installing the spring framework 2.5.4, and it is not installed.

I do not know if this can affect it, but I also have the latest version of JBoss Guvnor and Hudson deployed on the application server.

Update: I undeployed all the other applications and restarted. This did not fix.

Any hints, direction, advice would be greatly appreciated!

A: 

I installed glassfish v3, deployed the application and it worked. However, this answer is sub-prime. If someone knows how to find or fix the problem on glassfish v2.1, please answer.

Matthew Sowders
A: 

What first comes to mind is that you have a transistive dependency. This means that one of the dependencies in your pom file loads a lib which is of another version then you wish for. You can check all your dependency including the transistive ones with mvn dependency:tree. If you find one then use the exlusion tag in the engaged dependency. Good luck!

Jaco van der Nat
A: 

Make sure you don't have Spring installed in the update center. I was able to make progress by uninstalling that (uses version 2.5.6).

James