You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Marcos Mendez <ma...@jitisoft.com> on 2013/09/23 22:57:04 UTC

binary field + xml file

Hi,

I'm trying to save an xml (svg) file into a binary field in ADS. For some reason I'm getting a class cast exception. 

javax.naming.NamingException: [LDAP: error code 80 - OTHER: failed for MessageType : MODIFY_REQUEST
Message ID : 3
    Modify Request
        Object : 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=testme,dc=com'
            Modification[0]
                Operation :  add
                Modification
binary_field: '0x3C 0x3F 0x78 0x6D 0x6C 0x20 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x3D 0x22 0x31 ...'
org.apache.directory.api.ldap.model.message.ModifyRequestImpl@e9f9ec97    ManageDsaITImpl Control
        Type OID    : '2.16.840.1.113730.3.4.2'
        Criticality : 'false'
'
: null:
java.lang.ClassCastException
]; remaining name 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=test-me,dc=com'

We've saved a png with no issues, so I don't understand what could be the problem. Any ideas?

Regards,
Marcos


Re: binary field + xml file

Posted by Kiran Ayyagari <ka...@apache.org>.
I suspect that your attribute definition is incorrect
can you share the schema definition of this attribute
in which you are trying to store the binary value


On Tue, Sep 24, 2013 at 2:27 AM, Marcos Mendez <ma...@jitisoft.com> wrote:

> Hi,
>
> I'm trying to save an xml (svg) file into a binary field in ADS. For some
> reason I'm getting a class cast exception.
>
> javax.naming.NamingException: [LDAP: error code 80 - OTHER: failed for
> MessageType : MODIFY_REQUEST
> Message ID : 3
>     Modify Request
>         Object :
> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=testme,dc=com'
>             Modification[0]
>                 Operation :  add
>                 Modification
> binary_field: '0x3C 0x3F 0x78 0x6D 0x6C 0x20 0x76 0x65 0x72 0x73 0x69 0x6F
> 0x6E 0x3D 0x22 0x31 ...'
> org.apache.directory.api.ldap.model.message.ModifyRequestImpl@e9f9ec97
>  ManageDsaITImpl Control
>         Type OID    : '2.16.840.1.113730.3.4.2'
>         Criticality : 'false'
> '
> : null:
> java.lang.ClassCastException
> ]; remaining name
> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=test-me,dc=com'
>
> We've saved a png with no issues, so I don't understand what could be the
> problem. Any ideas?
>
> Regards,
> Marcos
>
>


-- 
Kiran Ayyagari
http://keydap.com

Re: binary field + xml file

Posted by Marcos Mendez <ma...@jitisoft.com>.
thank you!

On Sep 23, 2013, at 5:53 PM, Kiran Ayyagari wrote:

> the syntax and equality match are wrong, should be like
> 
> dn: m-oid=2.5.6.71.12,ou=attributeTypes,cn=testcore,ou=schema
> objectclass: top
> objectclass: metaAttributeType
> objectclass: metaTop
> m-oid: 2.5.6.71.12
> m-collective: FALSE
> m-description: Single binary string for signatures
> m-equality: octetStringMatch
> m-name: binary_field
> m-nousermodification: FALSE
> m-obsolete: FALSE
> m-singlevalue: TRUE
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.40
> m-usage: USER_APPLICATIONS
> 
> 
> On Tue, Sep 24, 2013 at 3:13 AM, Marcos Mendez <ma...@jitisoft.com> wrote:
> 
>> ok. here's the part of the schema...
>> 
>> version: 1
>> 
>> dn: m-oid=2.5.6.71.12,ou=attributeTypes,cn=testcore,ou=schema
>> objectclass: top
>> objectclass: metaAttributeType
>> objectclass: metaTop
>> m-oid: 2.5.6.71.12
>> m-collective: FALSE
>> m-description: Single binary string for signatures
>> m-equality: caseIgnoreMatch
>> m-name: binary_field
>> m-nousermodification: FALSE
>> m-obsolete: FALSE
>> m-singlevalue: TRUE
>> m-substr: caseIgnoreSubstringsMatch
>> m-syntax: 1.3.6.1.4.1.1466.115.121.1.23
>> m-usage: USER_APPLICATIONS
>> 
>> 
>> anything obvious?
>> 
>> On Sep 23, 2013, at 5:34 PM, Marcos Mendez wrote:
>> 
>>> we're using M14... i'm trying to get our ADS admin to get the schema.
>>> 
>>> On Sep 23, 2013, at 5:17 PM, Emmanuel Lecharny wrote:
>>> 
>>>> Hi Marcos,
>>>> 
>>>> Which ads versiob are you using ?
>>>> 
>>>> On Monday, September 23, 2013, Marcos Mendez <ma...@jitisoft.com>
>> wrote:
>>>>> Hi,
>>>>> 
>>>>> I'm trying to save an xml (svg) file into a binary field in ADS. For
>> some
>>>> reason I'm getting a class cast exception.
>>>>> 
>>>>> javax.naming.NamingException: [LDAP: error code 80 - OTHER: failed for
>>>> MessageType : MODIFY_REQUEST
>>>>> Message ID : 3
>>>>>  Modify Request
>>>>>      Object :
>>>> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=testme,dc=com'
>>>>>          Modification[0]
>>>>>              Operation :  add
>>>>>              Modification
>>>>> binary_field: '0x3C 0x3F 0x78 0x6D 0x6C 0x20 0x76 0x65 0x72 0x73 0x69
>>>> 0x6F 0x6E 0x3D 0x22 0x31 ...'
>>>>> org.apache.directory.api.ldap.model.message.ModifyRequestImpl@e9f9ec97
>>>> ManageDsaITImpl Control
>>>>>      Type OID    : '2.16.840.1.113730.3.4.2'
>>>>>      Criticality : 'false'
>>>>> '
>>>>> : null:
>>>>> java.lang.ClassCastException
>>>>> ]; remaining name
>>>> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=test-me,dc=com'
>>>>> 
>>>>> We've saved a png with no issues, so I don't understand what could be
>> the
>>>> problem. Any ideas?
>>>>> 
>>>>> Regards,
>>>>> Marcos
>>>>> 
>>>>> 
>>>> 
>>>> --
>>>> Regards,
>>>> Cordialement,
>>>> Emmanuel Lécharny
>>>> www.iktek.com
>>> 
>> 
>> 
> 
> 
> -- 
> Kiran Ayyagari
> http://keydap.com


Re: binary field + xml file

Posted by Kiran Ayyagari <ka...@apache.org>.
the syntax and equality match are wrong, should be like

dn: m-oid=2.5.6.71.12,ou=attributeTypes,cn=testcore,ou=schema
objectclass: top
objectclass: metaAttributeType
objectclass: metaTop
m-oid: 2.5.6.71.12
m-collective: FALSE
m-description: Single binary string for signatures
m-equality: octetStringMatch
m-name: binary_field
m-nousermodification: FALSE
m-obsolete: FALSE
m-singlevalue: TRUE
m-syntax: 1.3.6.1.4.1.1466.115.121.1.40
m-usage: USER_APPLICATIONS


On Tue, Sep 24, 2013 at 3:13 AM, Marcos Mendez <ma...@jitisoft.com> wrote:

> ok. here's the part of the schema...
>
> version: 1
>
> dn: m-oid=2.5.6.71.12,ou=attributeTypes,cn=testcore,ou=schema
> objectclass: top
> objectclass: metaAttributeType
> objectclass: metaTop
> m-oid: 2.5.6.71.12
> m-collective: FALSE
> m-description: Single binary string for signatures
> m-equality: caseIgnoreMatch
> m-name: binary_field
> m-nousermodification: FALSE
> m-obsolete: FALSE
> m-singlevalue: TRUE
> m-substr: caseIgnoreSubstringsMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.23
> m-usage: USER_APPLICATIONS
>
>
> anything obvious?
>
> On Sep 23, 2013, at 5:34 PM, Marcos Mendez wrote:
>
> > we're using M14... i'm trying to get our ADS admin to get the schema.
> >
> > On Sep 23, 2013, at 5:17 PM, Emmanuel Lecharny wrote:
> >
> >> Hi Marcos,
> >>
> >> Which ads versiob are you using ?
> >>
> >> On Monday, September 23, 2013, Marcos Mendez <ma...@jitisoft.com>
> wrote:
> >>> Hi,
> >>>
> >>> I'm trying to save an xml (svg) file into a binary field in ADS. For
> some
> >> reason I'm getting a class cast exception.
> >>>
> >>> javax.naming.NamingException: [LDAP: error code 80 - OTHER: failed for
> >> MessageType : MODIFY_REQUEST
> >>> Message ID : 3
> >>>   Modify Request
> >>>       Object :
> >> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=testme,dc=com'
> >>>           Modification[0]
> >>>               Operation :  add
> >>>               Modification
> >>> binary_field: '0x3C 0x3F 0x78 0x6D 0x6C 0x20 0x76 0x65 0x72 0x73 0x69
> >> 0x6F 0x6E 0x3D 0x22 0x31 ...'
> >>> org.apache.directory.api.ldap.model.message.ModifyRequestImpl@e9f9ec97
> >> ManageDsaITImpl Control
> >>>       Type OID    : '2.16.840.1.113730.3.4.2'
> >>>       Criticality : 'false'
> >>> '
> >>> : null:
> >>> java.lang.ClassCastException
> >>> ]; remaining name
> >> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=test-me,dc=com'
> >>>
> >>> We've saved a png with no issues, so I don't understand what could be
> the
> >> problem. Any ideas?
> >>>
> >>> Regards,
> >>> Marcos
> >>>
> >>>
> >>
> >> --
> >> Regards,
> >> Cordialement,
> >> Emmanuel Lécharny
> >> www.iktek.com
> >
>
>


-- 
Kiran Ayyagari
http://keydap.com

Re: binary field + xml file

Posted by Marcos Mendez <ma...@jitisoft.com>.
ok. here's the part of the schema...

version: 1

dn: m-oid=2.5.6.71.12,ou=attributeTypes,cn=testcore,ou=schema
objectclass: top
objectclass: metaAttributeType
objectclass: metaTop
m-oid: 2.5.6.71.12
m-collective: FALSE
m-description: Single binary string for signatures
m-equality: caseIgnoreMatch
m-name: binary_field
m-nousermodification: FALSE
m-obsolete: FALSE
m-singlevalue: TRUE
m-substr: caseIgnoreSubstringsMatch
m-syntax: 1.3.6.1.4.1.1466.115.121.1.23
m-usage: USER_APPLICATIONS


anything obvious?

On Sep 23, 2013, at 5:34 PM, Marcos Mendez wrote:

> we're using M14... i'm trying to get our ADS admin to get the schema.
> 
> On Sep 23, 2013, at 5:17 PM, Emmanuel Lecharny wrote:
> 
>> Hi Marcos,
>> 
>> Which ads versiob are you using ?
>> 
>> On Monday, September 23, 2013, Marcos Mendez <ma...@jitisoft.com> wrote:
>>> Hi,
>>> 
>>> I'm trying to save an xml (svg) file into a binary field in ADS. For some
>> reason I'm getting a class cast exception.
>>> 
>>> javax.naming.NamingException: [LDAP: error code 80 - OTHER: failed for
>> MessageType : MODIFY_REQUEST
>>> Message ID : 3
>>>   Modify Request
>>>       Object :
>> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=testme,dc=com'
>>>           Modification[0]
>>>               Operation :  add
>>>               Modification
>>> binary_field: '0x3C 0x3F 0x78 0x6D 0x6C 0x20 0x76 0x65 0x72 0x73 0x69
>> 0x6F 0x6E 0x3D 0x22 0x31 ...'
>>> org.apache.directory.api.ldap.model.message.ModifyRequestImpl@e9f9ec97
>> ManageDsaITImpl Control
>>>       Type OID    : '2.16.840.1.113730.3.4.2'
>>>       Criticality : 'false'
>>> '
>>> : null:
>>> java.lang.ClassCastException
>>> ]; remaining name
>> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=test-me,dc=com'
>>> 
>>> We've saved a png with no issues, so I don't understand what could be the
>> problem. Any ideas?
>>> 
>>> Regards,
>>> Marcos
>>> 
>>> 
>> 
>> -- 
>> Regards,
>> Cordialement,
>> Emmanuel Lécharny
>> www.iktek.com
> 


Re: binary field + xml file

Posted by Marcos Mendez <ma...@jitisoft.com>.
we're using M14... i'm trying to get our ADS admin to get the schema.

On Sep 23, 2013, at 5:17 PM, Emmanuel Lecharny wrote:

> Hi Marcos,
> 
> Which ads versiob are you using ?
> 
> On Monday, September 23, 2013, Marcos Mendez <ma...@jitisoft.com> wrote:
>> Hi,
>> 
>> I'm trying to save an xml (svg) file into a binary field in ADS. For some
> reason I'm getting a class cast exception.
>> 
>> javax.naming.NamingException: [LDAP: error code 80 - OTHER: failed for
> MessageType : MODIFY_REQUEST
>> Message ID : 3
>>    Modify Request
>>        Object :
> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=testme,dc=com'
>>            Modification[0]
>>                Operation :  add
>>                Modification
>> binary_field: '0x3C 0x3F 0x78 0x6D 0x6C 0x20 0x76 0x65 0x72 0x73 0x69
> 0x6F 0x6E 0x3D 0x22 0x31 ...'
>> org.apache.directory.api.ldap.model.message.ModifyRequestImpl@e9f9ec97
> ManageDsaITImpl Control
>>        Type OID    : '2.16.840.1.113730.3.4.2'
>>        Criticality : 'false'
>> '
>> : null:
>> java.lang.ClassCastException
>> ]; remaining name
> 'uid=ztest,ou=testUsers,ou=users,dc=security,dc=test-me,dc=com'
>> 
>> We've saved a png with no issues, so I don't understand what could be the
> problem. Any ideas?
>> 
>> Regards,
>> Marcos
>> 
>> 
> 
> -- 
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com


Re: binary field + xml file

Posted by Emmanuel Lecharny <el...@apache.org>.
Hi Marcos,

Which ads versiob are you using ?

On Monday, September 23, 2013, Marcos Mendez <ma...@jitisoft.com> wrote:
> Hi,
>
> I'm trying to save an xml (svg) file into a binary field in ADS. For some
reason I'm getting a class cast exception.
>
> javax.naming.NamingException: [LDAP: error code 80 - OTHER: failed for
MessageType : MODIFY_REQUEST
> Message ID : 3
>     Modify Request
>         Object :
'uid=ztest,ou=testUsers,ou=users,dc=security,dc=testme,dc=com'
>             Modification[0]
>                 Operation :  add
>                 Modification
> binary_field: '0x3C 0x3F 0x78 0x6D 0x6C 0x20 0x76 0x65 0x72 0x73 0x69
0x6F 0x6E 0x3D 0x22 0x31 ...'
> org.apache.directory.api.ldap.model.message.ModifyRequestImpl@e9f9ec97
 ManageDsaITImpl Control
>         Type OID    : '2.16.840.1.113730.3.4.2'
>         Criticality : 'false'
> '
> : null:
> java.lang.ClassCastException
> ]; remaining name
'uid=ztest,ou=testUsers,ou=users,dc=security,dc=test-me,dc=com'
>
> We've saved a png with no issues, so I don't understand what could be the
problem. Any ideas?
>
> Regards,
> Marcos
>
>

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com