Jump to content
Changes to the Jaspersoft community edition download ×

Error on Rest Response: no suitable HttpMessageConverter


Recommended Posts

Hi,

When i run the above code, specially the last line.

JsRestClient js = new JsRestClient(); JsServerProfile server = new JsServerProfile("xxxxxxxxxxx","http://xxxxxxxxx.xxx.xxx:8080/jasperserver",null,"xxxxxxxxxxx","xxxxxxxxxxxxx"); js.setServerProfile(server); ServerInfo rt = js.getServerInfo();

I receive the folowing two errors

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxxxx.xxxxxx/com.xxxxx.xxxxxx.projeto.MainActivity}: org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [class com.jaspersoft.android.sdk.client.oxm.server.ServerInfo] and content type [application/xml]
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
            at android.app.ActivityThread.access$600(ActivityThread.java:130)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4745)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [class com.jaspersoft.android.sdk.client.oxm.server.ServerInfo] and content type [application/xml]
            at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:102)
            at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:549)
            at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:504)
            at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:269)
            at com.jaspersoft.android.sdk.client.JsRestClient.getServerInfo(JsRestClient.java:224)
            at com.jaspersoft.android.sdk.client.JsRestClient.getServerInfo(JsRestClient.java:209)
            at com.xxxxx.xxxxxx.relatorios.Relatorio.teste(Relatorio.java:19)
            at com.xxxxx.xxxxxx.projeto.MainActivity.onCreate(MainActivity.java:22)
            at android.app.Activity.performCreate(Activity.java:5008)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
            at android.app.ActivityThread.access$600(ActivityThread.java:130)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4745)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)

I tried diferent methods, but it looks like I am forgetting something.

I'm running Jasper Server CE 6.0.1

Thanks in advance.

Paulo

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...