directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DIRSERVER-1158) ClassCastException while handling binary value
Date Tue, 01 Apr 2008 13:46:24 GMT

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

Emmanuel Lecharny resolved DIRSERVER-1158.
------------------------------------------

    Resolution: Invalid

There are many errors in this test case :
- if you use dcObject objectclass, then the entry *must* contains a dc attributeType
- the makeYear attributeType must receive an Integer, but JNDI does not know how to transfer
1990 to the ldap server as an int. It *must* be sent as a String ("1990") because JNDI has
no idea that the attribute is a binary value.
- BasicAttributes() *must* be used with 'true', otherwise the data are considered as case
sensitive
- the second test fails because the 'model' attributeType is considered to be an OctetString,
wich must be encoded in BER, which is not the case for 'Buick". Its syntax should not be OctetString
if it's a String, but something like PrintableString.

After applying those modifications, the first test passed just well. I didn't passed the second
one, due to a lack of time, but it should be OK.

> ClassCastException while handling binary value
> ----------------------------------------------
>
>                 Key: DIRSERVER-1158
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1158
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: r640455 of bigbang-with-dependencies, r640484 of studio trunk
>            Reporter: David Montag
>            Assignee: Emmanuel Lecharny
>            Priority: Critical
>             Fix For: 1.5.2
>
>         Attachments: ServerBinaryValueTest.java, ServerBinaryValueTest.ldif
>
>
> Setting an attribute to an octet string produces an exception on the server:
> java.lang.ClassCastException: java.lang.String
>         at org.apache.directory.server.core.entry.ServerBinaryValue.normalize(ServerBinaryValue.java:190)
>         at org.apache.directory.server.core.entry.ServerBinaryValue.getNormalizedValueReference(ServerBinaryValue.java:234)
>         at org.apache.directory.server.core.entry.ServerBinaryValue.hashCode(ServerBinaryValue.java:476)
>         at java.util.HashMap.containsKey(HashMap.java:377)
>         at java.util.HashSet.contains(HashSet.java:182)
>         at org.apache.directory.server.core.entry.DefaultServerAttribute.add(DefaultServerAttribute.java:664)
>         at org.apache.directory.server.core.entry.DefaultServerAttribute.add(DefaultServerAttribute.java:775)
>         at org.apache.directory.server.core.entry.ServerEntryUtils.toServerAttribute(ServerEntryUtils.java:153)
>         at org.apache.directory.server.core.entry.ServerEntryUtils.toModification(ServerEntryUtils.java:418)
>         at org.apache.directory.server.core.entry.ServerEntryUtils.toServerModification(ServerEntryUtils.java:483)
>         at org.apache.directory.server.core.jndi.ServerDirContext.modifyAttributes(ServerDirContext.java:225)
>         at org.apache.directory.server.ldap.support.DefaultModifyHandler.modifyMessageReceived(DefaultModifyHandler.java:83)
>         at org.apache.directory.server.ldap.support.ModifyHandler.messageReceived(ModifyHandler.java:38)
>         at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:141)
>         at org.apache.directory.server.ldap.LdapServer$LdapProtocolHandler.messageReceived(LdapServer.java:1095)
>         at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
>         at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
>         at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
>         at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
>         at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:58)
>         at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:180)
>         at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
>         at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
>         at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
>         at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
>         at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)
> The error occurs here:
> normalizedValue = ( byte[] ) normalizer.normalize( getCopy() );
> See the attached test case. It also covers https://issues.apache.org/jira/browse/DIRSERVER-1156.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message