1

WELD 001303 の問題を引き起こす get リクエストを発行しようとしています。@Path("/test") @RequestScoped public class TestRest {

    @EJB
    HelloWorldInterface helloWorld;

    @GET
    @Path("/get")
    public Response get() {
        return Response.status(201).entity(helloWorld.sayHello()).build();
    }

    @POST
    @Path("/post")
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_JSON)
    public Response post(String request) {
        String answer = helloWorld.sayHello() + request;
        return Response.status(201).entity(answer).build();
    }

}

使用: mss-1.7.0FINAL-jboss-as-7.1.1.FINAL からhttp://sourceforge.net/projects/mobicents/files/Mobicents%20Sip%20Servlets/Mobicents%20Sip%20Servlets%201.7.0.FINAL/

sip サポートには、この MSS パッケージが必要です。

Sourecodeとしての私のプロジェクトと.warとしてのプロジェクト

ワークフロー:

1. install mss package

2. start mss/jboss server with sip support (standalone-sip.xml) and deploy project

3. open http://127.0.0.1:8080/my-sipapp/rest/test/get

--> `org.jboss.resteasy.spi.UnhandledException: org.jboss.weld.context.ContextNotActiveException: WELD-001303 スコープ タイプ javax.enterprise.context.RequestScoped org.jboss.resteasy.core.SynchronousDispatcher のアクティブなコンテキストがありません。 handleApplicationException(SynchronousDispatcher.java:340) org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) org.jboss.resteasy. core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) org. jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.サービス (ServletContainerDispatcher.java:208) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java: 50) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) 根本原因62) 根本原因62) 根本原因

org.jboss.weld.context.ContextNotActiveException: WELD-001303 スコープ タイプ javax.enterprise.context.RequestScoped org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:598) org.jboss.weld. bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:71) org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) com.mycompany.app.rest.TestRest$Proxy$_$$ WeldClientProxy .get(TestRest$Proxy$$$_WeldClientProxy.java) sun.reflect.NativeMethodAccessorImpl.invoke0(ネイティブ メソッド) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect .Method.invoke(Method.java:601) org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) org.jboss .resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) ) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher. java:55) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) org.jboss.weld.servlet. ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)`plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) `plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) `

4

1 に答える 1