Pentaho

 View Only
Expand all | Collapse all

Pentaho 9.4 - LDAP Input

This thread has been viewed 53 times
  • 1.  Pentaho 9.4 - LDAP Input

    Posted 03-14-2023 11:19

    Hello,

    I'm running into a strange problem with the LDAP Input in Pentaho CE 9.4.  A simple Test connection works fine in 9.3, but erred out in 9.4 with:

    Root exception is java.lang.ClassNotFoundException: org.pentaho.di.trans.steps.ldapinput.store.CustomSocketFactory

    Is there any additional plugin I need to download?

    Thank you in advance for any help.



    ------------------------------
    Duy Duong
    Systems Engineer
    University of Minnesota
    ------------------------------


  • 2.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-14-2023 12:49

    Hi Duy,

    this looks like a classloading problem. Could you provide the full stacktrace of error? 



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 3.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-14-2023 13:04

    Hi Petr,

    Here's the error in details:

    javax.naming.CommunicationException: OOO.OOO.edu:636 [Root exception is java.lang.ClassNotFoundException: org.pentaho.di.trans.steps.ldapinput.store.CustomSocketFactory]
    OOO.OOO.edu:636


        at org.pentaho.di.trans.steps.ldapinput.LdapProtocol.connect(LdapProtocol.java:149)
        at org.pentaho.di.trans.steps.ldapinput.LDAPConnection.connect(LDAPConnection.java:130)
        at org.pentaho.di.ui.trans.steps.ldapinput.LDAPInputDialog.test(LDAPInputDialog.java:1240)
        at org.pentaho.di.ui.trans.steps.ldapinput.LDAPInputDialog.access$1400(LDAPInputDialog.java:88)
        at org.pentaho.di.ui.trans.steps.ldapinput.LDAPInputDialog$15.handleEvent(LDAPInputDialog.java:1160)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
        at org.pentaho.di.ui.trans.steps.ldapinput.LDAPInputDialog.open(LDAPInputDialog.java:1221)
        at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:120)
        at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:9025)
        at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:3286)
        at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:784)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:200)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
        at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1432)
        at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:8160)
        at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9542)
        at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:722)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
    Caused by: org.pentaho.di.core.exception.KettleException:
    javax.naming.CommunicationException: OOO.OOO.edu:636 [Root exception is java.lang.ClassNotFoundException: org.pentaho.di.trans.steps.ldapinput.store.CustomSocketFactory]
    OOO.OOO.edu:636

        at org.pentaho.di.trans.steps.ldapinput.LdapProtocol.doConnect(LdapProtocol.java:129)
        at org.pentaho.di.trans.steps.ldapinput.LdapProtocol.connect(LdapProtocol.java:138)
        ... 29 more
    Caused by: javax.naming.CommunicationException: OOO.OOO.edu:636 [Root exception is java.lang.ClassNotFoundException: org.pentaho.di.trans.steps.ldapinput.store.CustomSocketFactory]
        at java.naming/com.sun.jndi.ldap.Connection.<init>(Connection.java:252)
        at java.naming/com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:137)
        at java.naming/com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1616)
        at java.naming/com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2847)
        at java.naming/com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:348)
        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxFromUrl(LdapCtxFactory.java:266)
        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:226)
        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:284)
        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:185)
        at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:115)
        at java.naming/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:730)
        at java.naming/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
        at java.naming/javax.naming.InitialContext.init(InitialContext.java:236)
        at java.naming/javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)
        at org.pentaho.di.trans.steps.ldapinput.LdapProtocol.createLdapContext(LdapProtocol.java:120)
        at org.pentaho.di.trans.steps.ldapinput.LdapProtocol.doConnect(LdapProtocol.java:127)
        ... 30 more
    Caused by: java.lang.ClassNotFoundException: org.pentaho.di.trans.steps.ldapinput.store.CustomSocketFactory
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:398)
        at java.naming/com.sun.jndi.ldap.VersionHelper.loadClass(VersionHelper.java:107)
        at java.naming/com.sun.jndi.ldap.Connection.createSocket(Connection.java:290)
        at java.naming/com.sun.jndi.ldap.Connection.<init>(Connection.java:231)
        ... 45 more



    ------------------------------
    Duy Duong
    Systems Engineer
    University of Minnesota
    ------------------------------



  • 4.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-14-2023 13:14

    One question yet, are you running on JDK 8 or JDK 11? 



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 5.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-14-2023 13:22

    Hi

    I tested both 9.4 and 9.3 on JDK11.

    OpenJDK 64-Bit Server VM Corretto-11.0.18.10.1



    ------------------------------
    Duy Duong
    Systems Engineer
    University of Minnesota
    ------------------------------



  • 6.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-14-2023 13:48

    Which protocol are you configured? Can you use LDAP TLS? I'm thinking that SSL settings does not work in v9.4 now, TLS would be.



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 7.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-14-2023 13:59

    I'm using LDAP SSL.  Unfortunately, our server only accept LDAP SSL and not TLS.

    Do you know if this is a bug in 9.4? and it would be fixed in a near future?

    Thanks!



    ------------------------------
    Duy Duong
    Systems Engineer
    University of Minnesota
    ------------------------------



  • 8.  RE: Pentaho 9.4 - LDAP Input
    Best Answer

    Posted 03-14-2023 16:12

    I understand. Any plugins was separated from base code in v9.4. So this is a design concept problem IMHO.

    I have one solution now for you.

    • Move 2 jar files from plugins/ldap-plugins directory to base lib directory.
    • Set or reconfigure env property 
      PENTAHO_DI_JAVA_OPTIONS=-DKETTLE_PLUGIN_CLASSES=org.pentaho.di.trans.steps.ldapinput.LDAPInputMeta

    Check if this works.



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 9.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-14-2023 16:36

    Hi Petr,

    Confirm the solution works.  Thank you very much for your help!!!



    ------------------------------
    Duy Duong
    Systems Engineer
    University of Minnesota
    ------------------------------



  • 10.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-14-2023 16:44

    You are welcome. ;-)



    ------------------------------
    Petr Prochazka
    Systems Engineer
    P.V.A. systems s.r.o.
    ------------------------------



  • 11.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-15-2023 07:08

    Yes, it looks like you need to download and install the "LDAP Input/Output custom store plugins" plugin in Pentaho CE 9.4. This plugin includes the missing class "org.pentaho.di.trans.steps.ldapinput.store.CustomSocketFactory" that the error message is referencing. Once you have installed the plugin, try running the Test connection again to see if the issue is resolved.    Krowd Darden



    ------------------------------
    sara foster
    Client Relations Manager
    foodcahin
    ------------------------------



  • 12.  RE: Pentaho 9.4 - LDAP Input

    Posted 03-16-2023 11:00

    Hi Sara,

    Is the "LDAP Input/Output custom store plugins" plugin different than the ldap-plugins in the plugins folder?

    The Plugin Browser shows both LDAPInput and LDAPOutput point to the jar files in the ldap-plugins folder, but LDAP Input doesn't work for me until the work-around from Petr.



    ------------------------------
    Duy Duong
    Systems Engineer
    University of Minnesota
    ------------------------------