directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Derricutt (JIRA)" <>
Subject [jira] Commented: (DIRSERVER-1273) ClassCastException's when adding an entry
Date Thu, 02 Oct 2008 21:37:44 GMT


Mark Derricutt commented on DIRSERVER-1273:

One thing to note - when I initially setup the embedded ApacheDS server as part of my tests,
creating entries worked fine, this problem must started happening yesterday.

The maven dependencies used in my project include:



The following Apache repositories are also enabled:

      <releases />
      <name>Apache Incubating Repository</name>
      <snapshots />
      <name>Maven Snapshots</name>

> ClassCastException's when adding an entry
> -----------------------------------------
>                 Key: DIRSERVER-1273
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.5.4
>         Environment: I'm using ApacheDS 1.5.4 from a TestNG based unit test (adapted
from the AbstractServerTest provided by ApacheDS).
>            Reporter: Mark Derricutt
> Somehow I've hit the following exception when adding an entry to my (embedded) ApacheDS
> 2008-10-02 16:13:19,182 ERROR [pool-9-thread-7] handlers.ReferralAwareRequestHandler
- OTHER: failed for     Add Request :
> ClientEntry
>     dn:,,,
>     objectclass: smxparty
>     smxpartyid: 2000114
> : java.lang.Long cannot be cast to java.lang.String
> java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
>     at
>     at
>     at
>     at
> I'm assuming the problem here is triggering on the smxpartyid attribute, which is defined
> dn: m-oid=, ou=attributeTypes, cn=smx3, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid:
> m-name: smxpartyid
> m-equality: integerMatch
> m-syntax:
> m-length: 0
> In code, this is being setup and passed to LDAP as String's:
>             final Attributes attributes = new BasicAttributes();
>             attributes.put(new BasicAttribute("objectclass", "smxparty"));
>             attributes.put(new BasicAttribute("smxpartyid", party.getId().toString()));
> At what point is ApacheDS converting this to a Long (is this based on the m-equality:
integerMatch?).  I assume the code should be falling into something other than NormalizingComparator
(or NormalizingComparator shouldn't assume String's).

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

View raw message