directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre-Arnaud Marcelot (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DIRAPI-70) Ldap filter syntax which represent a binary value using escape sequence syntax
Date Thu, 16 Feb 2012 08:15:02 GMT

     [ https://issues.apache.org/jira/browse/DIRAPI-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pierre-Arnaud Marcelot updated DIRAPI-70:
-----------------------------------------

    Summary: Ldap filter syntax which represent a binary value using escape sequence syntax
 (was: Ldap filter syntax wich represent a binary value using escape sequence syntax)
    
> Ldap filter syntax which represent a binary value using escape sequence syntax
> ------------------------------------------------------------------------------
>
>                 Key: DIRAPI-70
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-70
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M8
>         Environment: java version "1.6.0_26"
> Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
> Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
> Debian Squeeze
>            Reporter: Anthony Prades
>
> Using ldap-api to search an object using a binary value.
> Using ldap filter syntax wich represent this binary value using escape sequence syntax.
> Filter is ok when I'm using ldapsearch.
> Getting a java exception:
> LdapNetworkConnection WARN - org.apache.directory.shared.ldap.codec.api.MessageEncoderException:
ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL The PDU buffer size is too small !
> org.apache.mina.filter.codec.ProtocolEncoderException: org.apache.directory.shared.ldap.codec.api.MessageEncoderException:
ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL The PDU buffer size is too small !
> 	at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:355)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:509)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1400(DefaultIoFilterChain.java:46)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:808)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.filterWrite(DefaultIoFilterChain.java:734)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:509)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireFilterWrite(DefaultIoFilterChain.java:501)
> 	at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:490)
> 	at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:435)
> 	at org.apache.directory.ldap.client.api.LdapNetworkConnection.searchAsync(LdapNetworkConnection.java:1694)
> 	at org.apache.directory.ldap.client.api.LdapNetworkConnection.search(LdapNetworkConnection.java:1729)
> 	at org.apache.directory.ldap.client.api.LdapNetworkConnection.search(LdapNetworkConnection.java:1625)
> 	at org.apache.directory.ldap.client.api.LdapNetworkConnection.search(LdapNetworkConnection.java:1635)
> 	at net.bluemind.lib.ldap.ad.tests.ADTests.testSimpleEscapedString(ADTests.java:464)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at junit.framework.TestCase.runTest(TestCase.java:168)
> 	at junit.framework.TestCase.runBare(TestCase.java:134)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:124)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243)
> 	at junit.framework.TestSuite.run(TestSuite.java:238)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> 	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
> 	at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
> 	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> 	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> Caused by: org.apache.directory.shared.ldap.codec.api.MessageEncoderException: ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL
The PDU buffer size is too small !
> 	at org.apache.directory.shared.ldap.codec.api.LdapEncoder.encodeMessage(LdapEncoder.java:213)
> 	at org.apache.directory.shared.ldap.codec.protocol.mina.LdapProtocolEncoder.encode(LdapProtocolEncoder.java:61)
> 	at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:322)
> 	... 51 more
> Here is my JUnit test to reproduce this issue:
> public void testSimpleEscapedString() {
> 		LdapConnection ldapCon = connectAd(true);
> 		try {
> 			// Real value \01\a1\52\44\9e\19\23\40\a3\05\08\0e\11\1c\17\e3 - ok with ldapsearch,
exception with ldap-api
> 			EntryCursor result = ldapCon.search("CN=Users,DC=myDomain,DC=loc",
> 					"(objectGUID=\\af)", SearchScope.SUBTREE, "objectsid",
> 					"objectguid");
> 			int count = 0;
> 			while (result.next()) {
> 				count++;
> 				Entry entry = result.get();
> 				System.out.println(entry.getDn());
> 			}
> 			System.out.println(count + " entries found !");
> 		} catch (Exception e) {
> 			e.printStackTrace();
> 			fail("Test thrown an exception");
> 		}
> 	}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message