码头 - noSuchMethodError
运行 mvn jetty:run-war 时出现以下错误:(
2009-11-14 15:19:28.459:/:INFO: Initializing Spring root WebApplicationContext
* ERROR 15:19:28,491 Context initialization failed (ContextLoader.java [main])
java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.makeAccessible(Ljava/lang/reflect/Constructor;)V
...
不包括整个堆栈跟踪)
我知道代码没有任何问题,因为它在 Windows 和 OSX 中都运行得很好。现在我使用 Ubuntu karmic koala 并通过 apt-get 安装了 maven,是否有什么我忘记在 Linux 中配置以使其工作?执行 mvn clean install 时我没有收到任何错误。
有人吗?
I get the following error when running mvn jetty:run-war
:
2009-11-14 15:19:28.459:/:INFO: Initializing Spring root WebApplicationContext
* ERROR 15:19:28,491 Context initialization failed (ContextLoader.java [main])
java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.makeAccessible(Ljava/lang/reflect/Constructor;)V
...
(Not including the whole stacktrace)
I know that there is nothing wrong with the code as it works perfectly fine both in Windows and OSX. Right now Im using Ubuntu karmic koala and installed maven through apt-get, could there be something that I have forgotten to configure in linux to make it work? I dont get any errors when doing mvn clean install.
Anyone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一定是某个地方存在兼容性不匹配的情况。也许您的本地存储库包含某些 jar 的“过时”版本。我建议使用新鲜干净的本地存储库重试。
首先,制作备份副本:
然后重试。
There must be a compatibility mismatch somewhere. Maybe your local repository contains a "stale" version of some jar. I'd suggest to retry with a fresh and clean local repository.
First, make a backup copy:
Then, try again.
我认为问题出在本地存储库上。
我猜你的 Maven 存储库会像 root/.m2/repository 一样存储
旧的 jar 可能是问题
我猜你已经编写了 Jetty 依赖项,如下所示
检查“mvn install”是否成功然后运行 Jetty。
I think the issue is with local repository.
I guess your maven repo would have stored like root/.m2/repository
Old jar may be the issue
I guess you have written Jetty depandencies like below
Check if the the "mvn install" is a Sucess then run Jetty.