Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnknownChangeSet processed back to the client as a 404 error #22

Open
darmbrust opened this issue Jul 26, 2013 · 0 comments
Open

UnknownChangeSet processed back to the client as a 404 error #22

darmbrust opened this issue Jul 26, 2013 · 0 comments

Comments

@darmbrust
Copy link
Contributor

Was trying to post a ValueSetDefinition to the server with this code:

ValueSetDefinition vsd = new ValueSetDefinition();

        vsd.setAbout("test code");
        vsd.setFormalName("testDef");



        ValueSetReference vsr = new ValueSetReference();
        vsr.setContent("testValueSet");
        vsr.setUri("valueSetURI-1");
        vsd.setDefinedValueSet(vsr);
        vsd.setDocumentURI("testDefURI");

        SourceAndNotation san = new SourceAndNotation();
        san.setSourceLanguage(new OntologyLanguageReference("en"));
        san.setSourceDocument("Dans Imagination");
        san.setSourceAndNotationDescription("Just test data");

        vsd.setSourceAndNotation(san);


        ValueSetDefinitionEntry vsde = new ValueSetDefinitionEntry();
        SpecificEntityList entityList = new SpecificEntityList();
        URIAndEntityName entity = new URIAndEntityName();
        entity.setUri("http://192.168.0.78:8080/codesystem/SNOMEDCT/version/2012_01_31/entity/102716002");
        entityList.addReferencedEntity(entity);
        vsde.setEntityList(entityList);
        vsde.setOperator(SetOperator.UNION);
        vsde.setEntryOrder(1l);
        vsd.addEntry(vsde);


        Cts2RestClient rc =  Cts2RestClient.instance();
        rc.postCts2Resource("http://localhost:8080/valuesetdefinition", vsd);

It results in a "404 Not Found" error back to the client.

The server reports:

ERROR: org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver - Invoking request method resulted in exception : public edu.mayo.cts2.framework.model.service.exception.CTS2Exception edu.mayo.cts2.framework.webapp.rest.controller.AbstractController.handleException(javax.servlet.http.HttpServletResponse,javax.servlet.http.HttpServletRequest,java.lang.RuntimeException)
java.lang.IllegalStateException: Unsupported argument [java.lang.RuntimeException] for @ExceptionHandler method: public edu.mayo.cts2.framework.model.service.exception.CTS2Exception edu.mayo.cts2.framework.webapp.rest.controller.AbstractController.handleException(javax.servlet.http.HttpServletResponse,javax.servlet.http.HttpServletRequest,java.lang.RuntimeException)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.resolveHandlerArguments(AnnotationMethodHandlerExceptionResolver.java:264)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:135)
        at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136)
        at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:1097)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:921)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1360)
        at edu.mayo.cts2.framework.webapp.rest.filter.AcceptHeaderAdjustingFilter.doFilter(AcceptHeaderAdjustingFilter.java:63)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
        at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
        at edu.mayo.cts2.framework.webapp.rest.filter.jsonp.JsonpCallbackFilter.doFilter(JsonpCallbackFilter.java:95)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
        at edu.mayo.cts2.framework.webapp.rest.osgi.OsgiExtensionPointFilterProxy.doFilter(OsgiExtensionPointFilterProxy.java:94)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
        at org.eclipse.jetty.server.Server.handle(Server.java:349)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:910)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
        at java.lang.Thread.run(Thread.java:722)

Internally, the debugger told me the server actually was trying to throw an UnknownChangeSet exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant