Jump to content
We've recently updated our Privacy Statement, available here ×

aqab0n

Members
  • Posts

    2
  • Joined

  • Last visited

aqab0n's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi everyone, I'm using Open-LDAP as datasource to connect to a LDAP directory. When a field contains special chars the LDAP search encodes the value in base64. I know how to decode base64 in iReport but the problem is: I don't know when(!) I have to decode the string. Example: 1. Name = Barney 2. Name = Lilly 3. Name = Rööbin 4. Name = Ted Open-LDAP returns: 1. Name = Barney 2. Name = Lilly 3. Name = Vhc3VyZS4= (not actual base64, just example) 4. Name = Ted Now I use as regular expression to check if the returned value is encoded. If Yes I decode it. $F{givenName}.trim().matches("(([A-Za-z0-9+=/]+=)?){1}")?(new String(new sun.misc.BASE64Decoder().decodeBuffer($F{givenName}), "UTF-8" )):$F{givenName} So far so good. The big problem is that there are also base64 strings that look like normal decoded strings so my regex doesn't match: QSO8dHRnZW5iYWNo That makes my regex useless and I can't use it to determine if a value is base64 encoded. What can I do now? How can I decode base64 correctly? I thought about a Scriptlet but I didn't find any good tutorial as I don't know how to use it and I can't find the needed class: JRDefaultScriptlet Help me please. Thank you! Post Edited by aqab0n at 06/21/2012 14:41
  2. Hey there, I am trying to connect to a LDAP datebase. I'm using the jdbc-ldap bridge from http://www.openldap.org/ . What I did so far: I added those two .jar files to the iReport Classpath: jdbcLdap.jar ldap.jarThen I added a new database-driver. I used the jdbsLdap.jar. For the driver-class I hit "Search" which gives me: com.octetstring.jdbcLdap.sql.JdbcLdapDriver So far so good. Now I am trying to add a new datesource. I chose the "Database JDBC Connection" with following properties: JDBC driver: com.octetstring.jdbcLdap.sql.JdbcLdapDriver (the same as the one that gave me the "Search" - button, even it's not in the dropdown but that seems to be normal) JDBC URL: jdbc:ldap://lxild05.stvd.lan:389 No server-adress No database No user No password When I click "Test" I got this error: NoClassDefFoundError!! Check your classpath! com/novell/ldap/LDAPException So what is wrong? Are the properties wrong? I never worked with LDAP before so I am not really sure, about those. My admin gave me this: Server: LXILD05.stvd.lan Port: 389 LDAP my-domain.com -> Tree Persons -> NE-Import can you help me? Thanks! €dit: I got it :). the properties were wrong not the classpath. correct JDBC url had to be: jdbc:ldap://LXILD05.stvd.lan:389/DC=Persons,DC=NE-Import Post Edited by aqab0n at 05/21/2012 16:27
×
×
  • Create New...