少しでも参考になればと思い書き込みました。要するに、私は com.unboundid.ldap.sdk を使用しようとしています (ただし、必要ではありません。Oracle の javax.naming.ldap.* を使用した場合と同じ問題が発生します)。次のエラー:
スレッド「メイン スレッド」での例外 java.lang.AssertionError:結果 EndTransactionExtendedResult(resultCode=2 (プロトコル エラー)、diagnosticMessage='プロトコル エラー')には、予期された結果コード '0 (成功)' がありませんでした。com.unboundid.util.LDAPTestUtils.assertResultCodeEquals(LDAPTestUtils.java:1484) で pkg.Main.main(Main.java:116) で
私のプログラムは次のとおりです(https://www.unboundid.com/products/ldap-sdk/docs/javadoc/com/unboundid/ldap/sdk/extensions/StartTransactionExtendedRequest.htmlの簡単な例を使用しています):
public class Main {
public static void main( String[] args ) throws LDAPException {
LDAPConnection connection = null;
try {
connection = new LDAPConnection("***", ***, "***", "***");
} catch (LDAPException e1) {
e1.printStackTrace();
}
// Use the start transaction extended operation to begin a transaction.
StartTransactionExtendedResult startTxnResult;
try
{
startTxnResult = (StartTransactionExtendedResult)
connection.processExtendedOperation(
new StartTransactionExtendedRequest());
// This doesn't necessarily mean that the operation was successful, since
// some kinds of extended operations return non-success results under
// normal conditions.
}
catch (LDAPException le)
{
// For an extended operation, this generally means that a problem was
// encountered while trying to send the request or read the result.
startTxnResult = new StartTransactionExtendedResult(
new ExtendedResult(le));
}
LDAPTestUtils.assertResultCodeEquals(startTxnResult, ResultCode.SUCCESS);
ASN1OctetString txnID = startTxnResult.getTransactionID();
// At this point, we have a transaction available for use. If any problem
// arises, we want to ensure that the transaction is aborted, so create a
// try block to process the operations and a finally block to commit or
// abort the transaction.
boolean commit = false;
try
{
// do nothing
}
finally
{
// Commit or abort the transaction.
EndTransactionExtendedResult endTxnResult;
try
{
endTxnResult = (EndTransactionExtendedResult)
connection.processExtendedOperation(
new EndTransactionExtendedRequest(txnID, commit));
}
catch (LDAPException le)
{
endTxnResult = new EndTransactionExtendedResult(new ExtendedResult(le));
}
LDAPTestUtils.assertResultCodeEquals(endTxnResult, ResultCode.SUCCESS);
}
}
}
ご覧のとおり、私はトランザクションで何もしません。開始してロールバックするだけですが、まだ機能していません。接続は問題なく、トランザクション ID = F10285501E20C32AE040A8C0070F7502 を受け取りましたが、常に同じです- すべてが問題ですか??? 「//何もしない」場合は、何らかのアクションの例外に置き換えます: 実行したくない.
OID の問題だと思い始めていますが、何が問題なのかわかりません... OID は WebLogic サーバー上にあり、そのバージョンは次のとおりです。
バージョン情報
ODSM 11.1.1.6.0
OID 11.1.1.6.0
データベース 11.2.0.2.0
すべてのアイデアは高く評価されます。