[英]Get JAX-RS (Resteasy) @Path annotation value from ClientRequestContext/ClientRequestFilter/similar when intercepted
[英]NoClassDefFoundError when using resteasy @Path annotation
我有一个带有RestPath的@Path
注释的Controller类。 它正常运行。
但是,当我从位于另一个项目(包含在该项目构建路径)中的BaseController扩展此类时,在尝试引用BaseController时出现NoClassDefFoundError
错误。
作品:
@Path("/")
public class Controller {...}
作品:
@Path("/")
public class Controller extends BaseController {...} //BaseControler from the same project
作品:
public class Controller extends BaseController {...} //BaseControler from other project
不工作: (NoClassDefFoundError)
@Path("/")
public class Controller extends BaseController {...} //BaseControler from other project
有什么想法吗?
您的问题可能与以下问题相同: Java项目无法引用另一个项目在这种情况下,“ OtherProjectClass”无法成立。
问题是您部署的内容不包含BaseController.class
文件。 为了对其进行测试:解压缩(部署)已部署的war
, jar
或ear
文件,并检查BaseController.class
文件是否在正确的位置。 该文件很可能不存在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.