LDAP Input Step always converting LDAP attributes to String?

649 views
Skip to first unread message

Thomas Starl

unread,
May 5, 2010, 5:53:44 AM5/5/10
to kettle-developers
Hi all!

I'm currently having the following problem:
I try to read the "GUID" attribute from a Novell eDirectory server via
the "LDAP Input" Step in PDI.

However, I seem to be unable to access/cast this attribute to its
proper value.
I tried the following approaches:
a) "Calculator" step: Using the "Byte to Hex" calculation
b) "Select values" step: Chaning the meta-data
c) "Modified JavaScript Value" Step: Using the Apache-Commons Codec
Library to convert the attribute (see: http://wiki.pentaho.com/display/EAI/Migrating+JavaScript+fro...)

I also tried to switch the data-type in the LDAP Input step from
"Binary" to "String" and vice versa...
didn't change anything.

After these tries I've had a look at src\org\pentaho\di\trans\steps
\ldapinput\LDAPInput.java and to me it seems, that the attributes,
read from LDAP are always cast to String before doing the specified
conversion (see lines 76 and 170)

Could this be?
Anyone got some ideas/ hints on this topic?

In "Preview" Mode I always see values like '[B@104bce3' which is the
String-representation of the
byte-array I assume.

Cheers, Tom

--
You received this message because you are subscribed to the Google Groups "kettle-developers" group.
To post to this group, send email to kettle-d...@googlegroups.com.
To unsubscribe from this group, send email to kettle-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en.

Matt Casters

unread,
May 5, 2010, 6:12:35 AM5/5/10
to kettle-d...@googlegroups.com
Hi Tom,

'[B@104bce3' : this is indeed the java way of representing a byte array (byte[])
Looks like this is a problem of the "LDAP Input" step. Please file a bug report over at http://jira.pentaho.org/browse/PDI
Next time you have a question like this, feel free to post on our user forums: http://forums.pentaho.org/

Good luck,
Matt
--
Matt Casters <mcas...@pentaho.org>
Chief Data Integration
Fonteinstraat 70, 9400 OKEGEM - Belgium - Cell : +32 486 97 29 37
Pentaho : The Commercial Open Source Alternative for Business Intelligence

Thomas Starl

unread,
May 5, 2010, 6:30:49 AM5/5/10
to kettle-developers
Matt,

>
> '[B@104bce3' : this is indeed the java way of representing a byte array (byte[])
> Looks like this is a problem of the "LDAP Input" step.  Please file a bug report over athttp://jira.pentaho.org/browse/PDI
> Next time you have a question like this, feel free to post on our user forums:http://forums.pentaho.org/
>

I already had posted on the forums, but it seems no one ever had to do
such thing ;)
However, I filed a bug in JIRA: http://jira.pentaho.com/browse/PDI-3824

Thank you for your quick reply.
Reply all
Reply to author
Forward
0 new messages