当前位置: 首页 > 知识库问答 >
问题:

RestEasy,JBoss Seam神秘异常

吴哲
2023-03-14

我在一个JBoss Seam应用程序中使用RestEasy,我得到了一个奇怪的异常,这个异常信息不是很丰富。我的Seam 2.2.2.ga应用程序中有以下罐子:

  • jaxrs-api-2.2.0.ga.jar
  • resteasy-jaxrs-2.2.0.ga.jar
  • jboss-seam-resteasy-2.2.0.ga.jar
@Path("/chartSvc")
@Stateless
@Name("chartAction")
@Scope(ScopeType.CONVERSATION)
public class ChartAction implements Serializable, ChartActionLocal{

public ChartAction() {}

@GET
@Path("/populateChart")
@Produces("text/plain")
public String populateChart() {
String chartData = generateDummyChartData();
return chartData;
}
javax.servlet.ServletException: Servlet execution threw an exception
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
    org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:63)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
    org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
    org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
    org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
    org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
root cause

java.lang.NoSuchMethodError: org.jboss.resteasy.specimpl.PathSegmentImpl.parseSegments(Ljava/lang/String;)Ljava/util/List;
    org.jboss.seam.resteasy.ResteasyResourceAdapter.extractUriInfo(ResteasyResourceAdapter.java:198)
    org.jboss.seam.resteasy.ResteasyResourceAdapter$1.process(ResteasyResourceAdapter.java:128)
    org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
    org.jboss.seam.resteasy.ResteasyResourceAdapter.getResource(ResteasyResourceAdapter.java:121)
    org.jboss.seam.servlet.SeamResourceServlet.service(SeamResourceServlet.java:80)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
    org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:63)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
    org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
    org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
    org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
    org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

共有1个答案

陈富
2023-03-14

问题是rest Easy-jaxrs.jar和jboss-seam-resteasy.jar之间的版本不兼容。jboss-seam-resteasy.jar的版本是2.2.0.ga,Rest室-jaxrs.jar也是。但是,您需要resteasy-jaxrs.jar-1.1-rc2.jar来与jboss-seam-resteasy-2.2.0.ga.jar一起工作。那个罐子的更换解决了我的问题。

 类似资料:
  • 我使用的是MGSplitViewClass(链接),我很难正确设置UICollectionView的大小。在上述拆分视图中,我在主视图中有一组四个UIView,其中包含更健壮的视图(表视图、标签组和集合视图)。 首先,我尝试在nib中添加UICollectionView,并通过编程创建了一个集合视图控制器,并将其连接到nib的集合视图。我一试collectionViewController,这就失

  • 我有一个使用RESTEasy的简单客户端,如下所示: 服务器配置为在以及一条有用的信息。正在抛出一个。除了包装在中之外,我如何使捕获异常并以字符串形式返回响应的有用消息。我尝试了各种实现,但似乎都是正确的。上述代码从未调用。我错过了什么? 我目前的解决方法是使用,然后执行并将原始状态填充到响应实体中。这样我就避免了异常抛出。

  • 在通过RabbitMQ发送数据时,我使用XStream1.4.8对XML进行序列化。在某些情况下,会将类名添加到生成的XML中,从而中断反序列化。我最难解释的问题是,在生产中,某个XML值不会生成异常,而在dev中,我会得到一个异常。 在开发中,我从来没有看到额外的类提到。我可以通过删除字符串“”和关闭标记来“修复”这一点,但我想要理解。 实际上我并不关心在线交换的数据格式是什么。类名是否存在对我

  • 最近,使用Angular6,我开始在浏览器控制台中观察到异常糟糕的stacktrace描述: 错误错误:"[Object Object]" < br > resolve promise < br > http://localhost:8080/poly fills . js:3136:31 resolve promise < br > http://localhost:8080/poly fill

  • 我正在尝试用Resteasy实现一个RESTFULL服务。当我试图在Tomcat Server7.0中运行时,iam出现异常。请在下面找到详细信息。