2016-07-13 4 views
1

enter image description here私は[http://localhost:8080/saiku/rest/saiku/api/query/execute]のクエリを実行するためのAPIを持っており、入力をアプリケーション/ jsonとして渡します。POSTMANを使用してサイクのEXECUTE APIを

ボディ

{ 
    "name": "0A470887-83B3-BCCD-A01C-1AC522C394A6", 
    "queryModel": { 
     "axes": { 
      "FILTER": { 
       "mdx": null, 
       "filters": [], 
       "sortOrder": null, 
       "sortEvaluationLiteral": null, 
       "hierarchizeMode": null, 
       "location": "FILTER", 
       "hierarchies": [], 
       "nonEmpty": false, 
       "aggregators": [] 
      }, 
      "COLUMNS": { 
       "mdx": null, 
       "filters": [], 
       "sortOrder": null, 
       "sortEvaluationLiteral": null, 
       "hierarchizeMode": null, 
       "location": "COLUMNS", 
       "hierarchies": [], 
       "nonEmpty": true, 
       "aggregators": [] 
      }, 
      "ROWS": { 
       "mdx": null, 
       "filters": [], 
       "sortOrder": null, 
       "sortEvaluationLiteral": null, 
       "hierarchizeMode": null, 
       "location": "ROWS", 
       "hierarchies": [ 
        { 
         "name": "[Date].[Time]", 
         "levels": { 
          "Year": { 
           "name": "Year" 
          } 
         }, 
         "cmembers": {} 
        } 
       ], 
       "nonEmpty": true, 
       "aggregators": [] 
      } 
     }, 
     "visualTotals": false, 
     "visualTotalsPattern": null, 
     "lowestLevelsOnly": false, 
     "details": { 
      "axis": "COLUMNS", 
      "location": "BOTTOM", 
      "measures": [ 
       { 
        "name": "Average Magnitude", 
        "type": "EXACT" 
       } 
      ] 
     }, 
     "calculatedMeasures": [], 
     "calculatedMembers": [] 
    }, 
    "queryType": "OLAP", 
    "type": "QUERYMODEL", 
    "cube": { 
     "uniqueName": "[earthquakes].[Global Earthquakes].[Global Earthquakes].[Earthquakes]", 
     "name": "Earthquakes", 
     "connection": "earthquakes", 
     "catalog": "Global Earthquakes", 
     "schema": "Global Earthquakes", 
     "caption": null, 
     "visible": false 
    }, 
    "mdx": null, 
    "parameters": {}, 
    "plugins": {}, 
    "properties": { 
     "saiku.olap.query.automatic_execution": true, 
     "saiku.olap.query.nonempty": true, 
     "saiku.olap.query.nonempty.rows": true, 
     "saiku.olap.query.nonempty.columns": true, 
     "saiku.ui.render.mode": "table", 
     "saiku.olap.query.filter": true, 
     "saiku.olap.result.formatter": "flattened", 
     "org.saiku.query.explain": true, 
     "saiku.olap.query.drillthrough": true, 
     "org.saiku.connection.scenario": false 
    }, 
    "metadata": {} 
} 

私はAPIは、私は、このような

SEVERE: Mapped exception to response: 500 (Internal Server Error) 
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class org.saiku.web.rest.objects.resultset.QueryResult, and Java type class org.saiku.web.rest.objects.resultset.QueryResult, and MIME media type application/octet-stream was not found. 

SEVERE: A message body writer for Java class org.saiku.olap.query2.ThinQuery, and Java type class org.saiku.olap.query2.ThinQuery, and MIME media type application/octet-stream was not found. 
The registered message body writers compatible with the MIME media type are: 
*/* -> 
    com.sun.jersey.core.impl.provider.entity.FormProvider 
    com.sun.jersey.core.impl.provider.entity.MimeMultipartProvider 
    com.sun.jersey.core.impl.provider.entity.StringProvider 
    com.sun.jersey.core.impl.provider.entity.ByteArrayProvider 
    com.sun.jersey.core.impl.provider.entity.FileProvider 
    com.sun.jersey.core.impl.provider.entity.InputStreamProvider 
    com.sun.jersey.core.impl.provider.entity.DataSourceProvider 
    com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General 
    com.sun.jersey.core.impl.provider.entity.ReaderProvider 
    com.sun.jersey.core.impl.provider.entity.DocumentProvider 
    com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider 
    com.sun.jersey.core.impl.provider.entity.SourceProvider$SourceWriter 
    com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General 
    com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$General 
    com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General 
    com.sun.jersey.json.impl.provider.entity.JSONWithPaddingProvider 
    com.sun.jersey.server.impl.template.ViewableMessageBodyWriter 
    com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider 
    com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General 
    com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General 
    com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General 
    com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General 
    com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy 
application/octet-stream -> 
    com.sun.jersey.core.impl.provider.entity.ByteArrayProvider 
    com.sun.jersey.core.impl.provider.entity.FileProvider 
    com.sun.jersey.core.impl.provider.entity.InputStreamProvider 
    com.sun.jersey.core.impl.provider.entity.DataSourceProvider 
    com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider 

としてエラーが発生しました。しかし、それはローカルホストのWebに正常に動作している手段がヒットしたらPOSTMANではなくアプリケーションである

答えて

1

私は私の場合、これは私のprobs1を解決している同じ問題に直面している。http://localhost:8080/saiku/rest/saiku/username/query/queryname/、 2. http://localhost:8080/saiku/rest/saiku/api/query/execute/。 投稿者の電話をかけているときは、クエリの名前は同じである必要があります。 apiの場合2 querynameの値は入力Json(パラメータとしての名前)です。

関連する問題