RequestFactory javax.validation.ValidationException NoClassDefFoundError
我将 Guice 与 GWT 2.4 一起使用,但在运行服务器时出现 javax.validation.ValidationException NoClassDefFoundError 错误。在 pom.xml
文件中,我引用了正确的依赖项:
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
但在 Eclipse 中,我在 中看不到
树。这种行为很奇怪:validation-api-1.0.0.GA.jar
>Maven 依赖关系
- 我可以找到
validation-api-1.0.0.GA-sources.jar
和javax.validation-validation-api-1.0.0.GA-sources.jar
在target
目录下。我不明白为什么它在那里。 - 在 Eclipse 的 Maven 依赖项 树中,我可以看到对 javax.validation-validation-api-1.0.0.GA-sources.jar 的引用,其中包含 5 个包,但是没有课。
在 eclipse 之外运行该应用程序是可行的。我使用 mvn gwt:run
运行它。
有什么想法吗?
I use Guice along with GWT 2.4 but I get a javax.validation.ValidationException NoClassDefFoundError
when I run the server. In the pom.xml
file I referenced the correct dependency:
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
but in Eclipse I can't see the validation-api-1.0.0.GA.jar
in the Maven Dependencies
tree. The behavior is pretty strange:
- I can find
validation-api-1.0.0.GA-sources.jar
andjavax.validation-validation-api-1.0.0.GA-sources.jar
under thetarget
directory. I don't understand why it's there. - In the
Maven Dependencies
tree of eclipse, I can see a reference tojavax.validation-validation-api-1.0.0.GA-sources.jar
which contains 5 packages but no classes.
Running the app outside eclipse works. I run it using mvn gwt:run
.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题来自于依赖项
gwt-user
,我设法通过排除对validation-api
的依赖项来修复它:The problem came from the dependency
gwt-user
, I managed to fix it by excluding the dependency onvalidation-api
: