私はRoxyデプロイヤを試しています。 Roxyアプリケーションは、デフォルトのapp-typeを使用して作成されました。新しいML 9データベースをセットアップし、デフォルトのポート(8040と8041)を使って "ml local bootstrap"を実行しましたMarklogic 9 + Roxy:Node.jsを使って作成したデータベースに接続できません
次にノードアプリケーションをセットアップしました。私は
スクリプトを実行var marklogic = require('marklogic');
var conn = {
host: '192.168.33.10',
port: 8040,
user: 'admin',
password: 'admin',
authType: 'DIGEST'
}
var db = marklogic.createDatabaseClient(conn);
db.createCollection(
'/books',
{author: 'Beryl Markham'},
{author: 'WG Sebald'}
)
.result(function(response) {
console.log(JSON.stringify(response, null, 2));
}, function (error) {
console.log(JSON.stringify(error, null, 2));
});
は次のように私にエラーを与え、次の(https://docs.marklogic.com/jsdoc/index.htmlからのサンプルコードを)試してみました:
$ node test.js
{
"message": "write document list: cannot process response with 500 status",
"statusCode": 500,
"body": "<error:error xsi:schemaLocation=\"http://marklogic.com/xdmp/error error.xsd\" xmlns:error=\"http://marklogic.com/xdmp/error\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <error:code>XDMP-IMPMODNS</error:code>\n <error:name>err:XQST0059</error:name>\n <error:xquery-version>1.0-ml</error:xquery-version>\n <error:message>Import module namespace mismatch</error:message>\n <error:format-string>XDMP-IMPMODNS: (err:XQST0059) Import module namespace http://marklogic.com/rest-api/endpoints/config does not match target namespace http://marklogic.com/rest-api/endpoints/config_DELETE_IF_UNUSED of imported module /MarkLogic/rest-api/endpoints/config.xqy</error:format-string>\n <error:retryable>false</error:retryable>\n <error:expr/>\n <error:data>\n <error:datum>http://marklogic.com/rest-api/endpoints/config</error:datum>\n <error:datum>http://marklogic.com/rest-api/endpoints/config_DELETE_IF_UNUSED</error:datum>\n <error:datum>/MarkLogic/rest-api/endpoints/config.xqy</error:datum>\n </error:data>\n <error:stack>\n <error:frame>\n <error:uri>/roxy/lib/rewriter-lib.xqy</error:uri>\n <error:line>5</error:line>\n <error:column>0</error:column>\n <error:xquery-version>1.0-ml</error:xquery-version>\n </error:frame>\n </error:stack>\n</error:error>\n"
}
私は8000ポート(ドキュメントに挿入するデフォルトのアプリケーションサーバー)を変更した場合は、期待どおりにノード関数が正しく実行されます。私は、node.jsアプリケーションで動作するように、Roxyで作成したアプリケーションサーバで何か他のものを設定する必要があるかどうかはわかりません。
エラーメッセージの「DELETE_IF_UNUSED」部分がどこから来ているのか分かりません。 Roxyが生成する設定ファイルには、このようなテキストは含まれていないようです。
編集:それは問題にした場合
<error:error xsi:schemaLocation="http://marklogic.com/xdmp/error error.xsd" xmlns:error="http://marklogic.com/xdmp/error" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error:code>XDMP-IMPMODNS</error:code>
<error:name>err:XQST0059</error:name>
<error:xquery-version>1.0-ml</error:xquery-version>
<error:message>Import module namespace mismatch</error:message>
<error:format-string>XDMP-IMPMODNS: (err:XQST0059) Import module namespace http://marklogic.com/rest-api/endpoints/config does not match target namespace http://marklogic.com/rest-api/endpoints/config_DELETE_IF_UNUSED of imported module /MarkLogic/rest-api/endpoints/config.xqy</error:format-string>
<error:retryable>false</error:retryable>
<error:expr/>
<error:data>
<error:datum>http://marklogic.com/rest-api/endpoints/config</error:datum>
<error:datum>http://marklogic.com/rest-api/endpoints/config_DELETE_IF_UNUSED</error:datum>
<error:datum>/MarkLogic/rest-api/endpoints/config.xqy</error:datum>
</error:data>
<error:stack>
<error:frame>
<error:uri>/roxy/lib/rewriter-lib.xqy</error:uri>
<error:line>5</error:line>
<error:column>0</error:column>
<error:xquery-version>1.0-ml</error:xquery-version>
</error:frame>
</error:stack>
</error:error>
、MarkLogicのバージョンが9.0から3.1である:ブラウザを介し192.168.33.10:8040にアクセスすると、私は同様のエラーでXMLを取得します。それも新鮮なインストールです。
アドバイスはありますか?
ブラウザでhttp:// localhost:8040を指定するとどうなりますか?また、Roxyプロジェクト( "ml new ...")を作成したときに、 '--app-type'に何も指定しましたか? –
いいえ、それはデフォルトのアプリケーションタイプです(私はmvcと思います)。ブラウザを介して残りのサーバーにアクセスすると同様のエラーが発生し、この情報を元の投稿に編集します。 –