You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Mark Derricutt (JIRA)" <ji...@apache.org> on 2008/10/02 23:23:44 UTC
[jira] Created: (DIRSERVER-1273) ClassCastException's when adding
an entry
ClassCastException's when adding an entry
-----------------------------------------
Key: DIRSERVER-1273
URL: https://issues.apache.org/jira/browse/DIRSERVER-1273
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 server:
2008-10-02 16:13:19,182 ERROR [pool-9-thread-7] handlers.ReferralAwareRequestHandler - OTHER: failed for Add Request :
ClientEntry
dn: 1.3.6.1.4.1.28416.2.2.2.131=2000114,2.5.4.11=customers,2.5.4.11=smx,2.5.4.10=smx
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 org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer.normalize(DeepTrimToLowerNormalizer.java:59)
at org.apache.directory.shared.ldap.schema.CachingNormalizer.normalize(CachingNormalizer.java:99)
at org.apache.directory.shared.ldap.schema.NormalizingComparator.compare(NormalizingComparator.java:74)
at org.apache.directory.server.schema.SerializableComparator.compare(SerializableComparator.java:99)
I'm assuming the problem here is triggering on the smxpartyid attribute, which is defined as:
dn: m-oid=1.3.6.1.4.1.28416.2.2.2.131, ou=attributeTypes, cn=smx3, ou=schema
objectclass: metaAttributeType
objectclass: metaTop
objectclass: top
m-oid: 1.3.6.1.4.1.28416.2.2.2.131
m-name: smxpartyid
m-equality: integerMatch
m-syntax: 1.3.6.1.4.1.1466.115.121.1.27
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.
[jira] Commented: (DIRSERVER-1273) ClassCastException's when adding
an entry
Posted by "Mark Derricutt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636515#action_12636515 ]
Mark Derricutt commented on DIRSERVER-1273:
-------------------------------------------
Looks like this issue may have been caused by my tests creating two partitions with the same identifier - once I fixed that this problem seems to have disappeared.
> ClassCastException's when adding an entry
> -----------------------------------------
>
> Key: DIRSERVER-1273
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1273
> 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 server:
> 2008-10-02 16:13:19,182 ERROR [pool-9-thread-7] handlers.ReferralAwareRequestHandler - OTHER: failed for Add Request :
> ClientEntry
> dn: 1.3.6.1.4.1.28416.2.2.2.131=2000114,2.5.4.11=customers,2.5.4.11=smx,2.5.4.10=smx
> 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 org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer.normalize(DeepTrimToLowerNormalizer.java:59)
> at org.apache.directory.shared.ldap.schema.CachingNormalizer.normalize(CachingNormalizer.java:99)
> at org.apache.directory.shared.ldap.schema.NormalizingComparator.compare(NormalizingComparator.java:74)
> at org.apache.directory.server.schema.SerializableComparator.compare(SerializableComparator.java:99)
> I'm assuming the problem here is triggering on the smxpartyid attribute, which is defined as:
> dn: m-oid=1.3.6.1.4.1.28416.2.2.2.131, ou=attributeTypes, cn=smx3, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.28416.2.2.2.131
> m-name: smxpartyid
> m-equality: integerMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.27
> 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.
[jira] Resolved: (DIRSERVER-1273) ClassCastException's when adding
an entry
Posted by "Mark Derricutt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Derricutt resolved DIRSERVER-1273.
---------------------------------------
Resolution: Won't Fix
User error :(
> ClassCastException's when adding an entry
> -----------------------------------------
>
> Key: DIRSERVER-1273
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1273
> 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 server:
> 2008-10-02 16:13:19,182 ERROR [pool-9-thread-7] handlers.ReferralAwareRequestHandler - OTHER: failed for Add Request :
> ClientEntry
> dn: 1.3.6.1.4.1.28416.2.2.2.131=2000114,2.5.4.11=customers,2.5.4.11=smx,2.5.4.10=smx
> 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 org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer.normalize(DeepTrimToLowerNormalizer.java:59)
> at org.apache.directory.shared.ldap.schema.CachingNormalizer.normalize(CachingNormalizer.java:99)
> at org.apache.directory.shared.ldap.schema.NormalizingComparator.compare(NormalizingComparator.java:74)
> at org.apache.directory.server.schema.SerializableComparator.compare(SerializableComparator.java:99)
> I'm assuming the problem here is triggering on the smxpartyid attribute, which is defined as:
> dn: m-oid=1.3.6.1.4.1.28416.2.2.2.131, ou=attributeTypes, cn=smx3, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.28416.2.2.2.131
> m-name: smxpartyid
> m-equality: integerMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.27
> 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.
[jira] Closed: (DIRSERVER-1273) ClassCastException's when adding an
entry
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny closed DIRSERVER-1273.
----------------------------------------
closed
> ClassCastException's when adding an entry
> -----------------------------------------
>
> Key: DIRSERVER-1273
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1273
> 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 server:
> 2008-10-02 16:13:19,182 ERROR [pool-9-thread-7] handlers.ReferralAwareRequestHandler - OTHER: failed for Add Request :
> ClientEntry
> dn: 1.3.6.1.4.1.28416.2.2.2.131=2000114,2.5.4.11=customers,2.5.4.11=smx,2.5.4.10=smx
> 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 org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer.normalize(DeepTrimToLowerNormalizer.java:59)
> at org.apache.directory.shared.ldap.schema.CachingNormalizer.normalize(CachingNormalizer.java:99)
> at org.apache.directory.shared.ldap.schema.NormalizingComparator.compare(NormalizingComparator.java:74)
> at org.apache.directory.server.schema.SerializableComparator.compare(SerializableComparator.java:99)
> I'm assuming the problem here is triggering on the smxpartyid attribute, which is defined as:
> dn: m-oid=1.3.6.1.4.1.28416.2.2.2.131, ou=attributeTypes, cn=smx3, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.28416.2.2.2.131
> m-name: smxpartyid
> m-equality: integerMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.27
> 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.
[jira] Commented: (DIRSERVER-1273) ClassCastException's when adding
an entry
Posted by "Mark Derricutt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636478#action_12636478 ]
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:
<properties>
<apacheds-version>1.5.4</apacheds-version>
</properties>
<dependency>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-server-unit</artifactId>
<version>${apacheds-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-schema-registries</artifactId>
<version>${apacheds-version}</version>
</dependency>
<dependency>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-schema-bootstrap</artifactId>
<version>${apacheds-version}</version>
</dependency>
The following Apache repositories are also enabled:
<repository>
<releases />
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
<repository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots />
<id>apache.org</id>
<name>Maven Snapshots</name>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
</repository>
> ClassCastException's when adding an entry
> -----------------------------------------
>
> Key: DIRSERVER-1273
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1273
> 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 server:
> 2008-10-02 16:13:19,182 ERROR [pool-9-thread-7] handlers.ReferralAwareRequestHandler - OTHER: failed for Add Request :
> ClientEntry
> dn: 1.3.6.1.4.1.28416.2.2.2.131=2000114,2.5.4.11=customers,2.5.4.11=smx,2.5.4.10=smx
> 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 org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer.normalize(DeepTrimToLowerNormalizer.java:59)
> at org.apache.directory.shared.ldap.schema.CachingNormalizer.normalize(CachingNormalizer.java:99)
> at org.apache.directory.shared.ldap.schema.NormalizingComparator.compare(NormalizingComparator.java:74)
> at org.apache.directory.server.schema.SerializableComparator.compare(SerializableComparator.java:99)
> I'm assuming the problem here is triggering on the smxpartyid attribute, which is defined as:
> dn: m-oid=1.3.6.1.4.1.28416.2.2.2.131, ou=attributeTypes, cn=smx3, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.28416.2.2.2.131
> m-name: smxpartyid
> m-equality: integerMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.27
> 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.