[
https://issues.apache.org/jira/browse/DIRAPI-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14202465#comment-14202465
]
lucas theisen commented on DIRAPI-200:
--------------------------------------
I am getting the same protocol error running on Linux with Java 7
{code}
[ltheisen ldap-client-test]$ mvn -Dtest=LdapConnectionPoolTest#testRebindNoPool
test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Directory LDAP Client API test 2.0.0-M18-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-remote-resources-plugin:1.2.1:process (default) @
ldap-client-test ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
ldap-client-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @
ldap-client-test ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @
ldap-client-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @
ldap-client-test ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ ldap-client-test ---
[INFO] Surefire report directory:
/home/ltheisen/svn/trunk-with-dependencies/apacheds/ldap-client-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.directory.shared.client.api.LdapConnectionPoolTest
Iteration # 0
Failure after 36 iterations
org.apache.directory.api.ldap.model.exception.LdapProtocolErrorException:
PROTOCOL_ERROR: The server will disconnect!
at
org.apache.directory.api.ldap.model.message.ResultCodeEnum.processResponse(ResultCodeEnum.java:2163)
at
org.apache.directory.ldap.client.api.AbstractLdapConnection.bind(AbstractLdapConnection.java:129)
at
org.apache.directory.ldap.client.api.AbstractLdapConnection.bind(AbstractLdapConnection.java:112)
at
org.apache.directory.shared.client.api.LdapConnectionPoolTest.testRebindNoPool(LdapConnectionPoolTest.java:264)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at
org.apache.directory.server.core.integ.FrameworkRunner.runChild(FrameworkRunner.java:379)
at
org.apache.directory.server.core.integ.FrameworkRunner.runChild(FrameworkRunner.java:56)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at
org.apache.directory.server.core.integ.FrameworkRunner.run(FrameworkRunner.java:154)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:254)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:149)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.068 sec <<<
FAILURE! - in org.apache.directory.shared.client.api.LdapConnectionPoolTest
testRebindNoPool(org.apache.directory.shared.client.api.LdapConnectionPoolTest)
Time elapsed: 0.582 sec <<< ERROR!
org.apache.directory.api.ldap.model.exception.LdapProtocolErrorException:
PROTOCOL_ERROR: The server will disconnect!
at
org.apache.directory.api.ldap.model.message.ResultCodeEnum.processResponse(ResultCodeEnum.java:2163)
at
org.apache.directory.ldap.client.api.AbstractLdapConnection.bind(AbstractLdapConnection.java:129)
at
org.apache.directory.ldap.client.api.AbstractLdapConnection.bind(AbstractLdapConnection.java:112)
at
org.apache.directory.shared.client.api.LdapConnectionPoolTest.testRebindNoPool(LdapConnectionPoolTest.java:264)
Results :
Tests in error:
LdapConnectionPoolTest.testRebindNoPool:264 ยป LdapProtocolError
PROTOCOL_ERROR...
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.191s
[INFO] Finished at: Fri Nov 07 14:00:04 EST 2014
[INFO] Final Memory: 19M/196M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on
project ldap-client-test: There are test failures.
[ERROR]
[ERROR] Please refer to
/home/ltheisen/svn/trunk-with-dependencies/apacheds/ldap-client-test/target/surefire-reports
for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
{code}
> unBind() followed by bind() on the same connection may throw an
> IllegalStateException
> -------------------------------------------------------------------------------------
>
> Key: DIRAPI-200
> URL: https://issues.apache.org/jira/browse/DIRAPI-200
> Project: Directory Client API
> Issue Type: Bug
> Affects Versions: 1.0.0-M23
> Reporter: lucas theisen
>
> Not sure if this even should be allowed but the fact that it can result in an
> exception is disconcerting. I added a test case to
> {{LdapConnectionPoolTest}} (with the {{unBind()}} currently commented out)
> that can be used to reproduce this issue.
> The main question here, in my mind, is whether or not this should be allowed.
> If not allowed, we should immediately throw a more reasonable exception if
> any operation is attempted on an {{LdapConnection}} that has had {{unBind()}}
> called on it. Perhaps still an {{IllegalStateException}}, but maybe with a
> message stating _connection no longer valid after unBind()_. More
> importantly, this should happen every time, rather than just when the race
> condition bears its ugly face. For more discussion, see [this email
> chain|http://mail-archives.apache.org/mod_mbox/directory-dev/201407.mbox/%3CEE6ADC61AF2D71408E4FA7F9517DB7710A9C07E5%40IMCMBX03.MITRE.ORG%3E].
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)