2

MDX クエリを処理し、Mondrian スキーマで定義された OLAP キューブからデータをフェッチし、クエリされたデータを表示するためにフロントエンド GUI アプリケーションが必要とする XMLA を返すために、Mondrian サーバー Web アプリケーションを稼働させています。

それはすべてうまくいきますが、今私はパーミッションロールを追加しようとしています.非常に紛らわしい問題に遭遇しました.

これは、別のパラメーター「ロール」を追加して送信するのと同じくらい簡単だと思いました。ただし、これにより奇妙なエラーが発生します。

私は SmartGWT を使用して Mondrian XMLA サービスに接続しています。

    public static OlapConnection getConnection() throws Exception {
    Class.forName("org.olap4j.driver.xmla.XmlaOlap4jDriver");
    java.util.Properties p = new Properties();
    String role = "role1";
    p.put("server", "http://domain.be:8080/mondrian/xmla");
    p.put("user", "user");
    p.put("password", "password");
    p.put("role","\""+role+"\"");
    String dbUrl = "jdbc:xmla:";
    Connection connectionXMLA = DriverManager.getConnection(dbUrl, p);
    OlapWrapper wrapper = (OlapWrapper) connectionXMLA;
    OlapConnection olapConnection = wrapper.unwrap(OlapConnection.class);
    return olapConnection;

ロールは、次のように、キューブも保持するスキーマで定義されます。

<Role name="role1">
<SchemaGrant access="none">
      <CubeGrant cube="VehicleSales" access="all"/>
  <CubeGrant cube="Contract" access="none"/>
</SchemaGrant>

<Role name="role2">
<SchemaGrant access="none">
      <CubeGrant cube="VehicleSales" access="none"/>
  <CubeGrant cube="Contract" access="all"/>
</SchemaGrant>

「ロール」パラメーターを使用すると、次のエラーが発生します。

12:30:50.930 [エラー] [smartgwtolap] 12:30:50.928:TMR9:WARN:RPCManager:org.olap4j.OlapException: XMLA

プロバイダーは例外を与えました:

<faultcode>
    SOAP-ENV:Server.00HSBB01
</faultcode>
<faultstring>
    XMLA SOAP Body processing error
</faultstring>
<faultactor>
    Mondrian
</faultactor>
<detail>
    <XA:error xmlns:XA="mondrian sourceforge net">
        <code>
            00HSBB01
        </code>
        <desc>
            The Mondrian XML: Mondrian Error:Internal error: Rowset 'DISCOVER_PROPERTIES' does not support property 'Roles'
        </desc>
    </XA:error>
</detail>
 </SOAP-ENV:Fault>

リクエスト: DISCOVER_PROPERTIES "role1" データ未定義 - 応答: {operationId: "listCubes_fetch", clientContext: Obj, context: Obj, transactionNum: 0, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{"data":"org.o... "[1497], xmlHttpRequest: Obj, transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, data: "org.olap4j.OlapException: XMLAプロバイダー ..."[1243]、invalidateCache: false、isDSResponse: true、queueStatus: -1、startRow: 0、endRow: 0、totalRows: 0} com.smartgwt.client.core.JsObject$SGWT_WARN: 12:30: 50.928:TMR9:WARN:RPCManager:org.olap4j. 00HSBB01 モンドリアン XML: モンドリアン エラー: 内部エラー: 行セット 'DISCOVER_PROPERTIES' はプロパティ 'Roles' をサポートしていません
リクエスト: DISCOVER_PROPERTIES "role1" データ未定義 - 応答: {operationId: "listCubes_fetch", clientContext: Obj, context: Obj, transactionNum: 0, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{"data":"org.o... "[1497], xmlHttpRequest: Obj, transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, data: "org.olap4j.OlapException: XMLA provider ..."[1243]、invalidateCache: false、isDSResponse: true、queueStatus: -1、startRow: 0、endRow: 0、totalRows: 0} at sun.reflect.NativeConstructorAccessorImpl.

「foo」や「bar」などのその他のランダム パラメータは、エラーをまったく返さず、単に無視されます。したがって、「役割」は間違いなく何かを引き起こしますが、残念ながら私が扱えるものは何もありません。

洞察を提供できる人はいますか?とても感謝しています。役割を引数として受け入れる Pentaho XmlaHandler について何かを見つけましたが、これは Mondrian の内部で使用されるものであり、必ずしも SmartGWT ですぐに使用できるものではないようです。

読んでくれてありがとう!

編集

以下のスニペットはエラーを返します。

java.lang.RuntimeException: org.olap4j.OlapException: データベース製品名の取得に失敗しました。

        Connection connectionXMLA = DriverManager.getConnection(dbUrl, p);
    OlapWrapper wrapper = (OlapWrapper) connectionXMLA;
    OlapConnection olapConnection = wrapper.unwrap(OlapConnection.class);
    String role = "role2";
    olapConnection.setRoleName(role);
    return olapConnection;

getAvailableRoleNames() 関数は、スキーマ ファイルで指定された役割を返します。setRoleName(role) 部分をコメントアウトすると、問題なく動作します。

4

1 に答える 1