我正在尝试在 GlassFish v2.1 上部署 spring 3 应用程序,但收到以下错误:
APPLICATION_CONTEXT_ID_PREFIX at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:431)
我在 spring 论坛上找到了建议 http://forum.springsource.org/showthread.php?t=79929 表示类路径中可能存在另一个版本的 spring。我使用 maven-2 进行依赖管理,并且依赖关系图中没有其他版本的 spring。我又查了sun updatecenter,里面有安装spring框架2.5.4的选项,也没有安装。
我不知道这是否会影响它,但我还在应用程序服务器上部署了最新版本的JBoss Guvnor和Hudson。
更新:我取消部署所有其他应用程序并重新启动。这没有解决。
任何提示、方向、建议将不胜感激!
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!
发布评论
评论(3)
我安装了 glassfish v3,部署了应用程序并且它工作了。然而,这个答案是次贷。如果有人知道如何查找或解决 glassfish v2.1 上的问题,请回答。
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.
首先想到的是你有一个传递依赖。这意味着您的 pom 文件中的依赖项之一会加载一个您想要的另一个版本的库。您可以使用 mvn dependency:tree 检查所有依赖项,包括传递依赖项。
如果找到,则在参与的依赖项中使用排除标签。
祝你好运!
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!
确保您没有在更新中心安装 Spring。我通过卸载它(使用版本 2.5.6)取得了进展。
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).