3 Replies Latest reply on Oct 30, 2015 9:32 AM by Ramesh Reddy

    Rest web service returns error

    Mirco Marchitiello Newbie

      Hi,

      I've built a very simple Model View ,a Procedure, and I've deployed a rest WAR as described in http://blog.everythingjboss.org/articles/Generating-Web-Services-for-View-Models-JDV/

       

      The whole thing works perfectly until the result is somehow big (it seems when the response >30k bytes ) , in that case I get an error like the following:

       

      14:47:10,300 SEVERE [org.teiid.rest] (http-/0.0.0.0:8080-2) null Exception in execute: {0}: java.lang.Throwable: java.sql.SQLException: java.lang.IllegalArgumentException: Null charset name

          at org.teiid.rest.services.TeiidRSProviderPost.execute(TeiidRSProviderPost.java:116) [classes:]

          at org.teiid.rest.services.provaExpWS2ModelView.FattureViewProc(provaExpWS2ModelView.java:95) [classes:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_60]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_60]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_60]

          at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]

          at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-15.jar:7.5.0.Final-redhat-15]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]

      Caused by: java.sql.SQLException: java.lang.IllegalArgumentException: Null charset name

          at org.teiid.rest.services.TeiidRSProviderPost.handleResult(TeiidRSProviderPost.java:167) [classes:]

          at org.teiid.rest.services.TeiidRSProviderPost.execute(TeiidRSProviderPost.java:112) [classes:]

          ... 29 more

      Caused by: java.lang.IllegalArgumentException: Null charset name

          at java.nio.charset.Charset.lookup(Charset.java:457) [rt.jar:1.8.0_60]

          at java.nio.charset.Charset.forName(Charset.java:528) [rt.jar:1.8.0_60]

          at org.teiid.query.function.source.XMLSystemFunctions.serialize(XMLSystemFunctions.java:1101) [org.teiid.runtime.client_9.0.3.Final-v20150810-1438-B1157.jar:]

          at org.teiid.rest.services.TeiidRSProviderPost.handleResult(TeiidRSProviderPost.java:165) [classes:]

          ... 30 more

       

       

      If I test the procedure from the designer I get the result without any problem

      Could it be a size or timeout problem ?

       

      thanks,

      Mirco