#1 2015-01-27 09:21:02

cedispin
Member
Registered: 2014-12-12

LDAP Version 2.2.1 Import Error

Hi

I am trying import my user of th LDAP with the script ldapimport.groovy with the settings below:

lul.setProviderUrl("ldap://10.10.10.1:389");
lul.setSecurityPrincipal("CN=cedispin,OU=Users,DC=lab,DC=com");
lul.setSecurityCredentials("teste");

lul.setLdapBase("OU=Users,DC=lab,DC=com");

but after runned script showed me that error:

Jan 27, 2015 7:06:25 AM net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor invoke
INFO: Intercepted NonFatalException
net.datenwerke.gxtdto.client.servercommunication.exceptions.ServerCallFailedException
    at net.datenwerke.rs.terminal.server.terminal.TerminalRpcServiceImpl.doExecute(TerminalRpcServiceImpl.java:190)
    at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110)
    at net.datenwerke.rs.terminal.server.terminal.TerminalRpcServiceImpl.execute(TerminalRpcServiceImpl.java:153)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
    at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89)
    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.util.NoSuchElementException
    at java.util.ArrayList$Itr.next(ArrayList.java:834)
    at net.datenwerke.rs.scripting.service.scripting.terminal.commands.ExecScriptCommand.execute(ExecScriptCommand.java:140)
    at net.datenwerke.rs.terminal.service.terminal.ExecuteCommandConfigImpl.execute(ExecuteCommandConfigImpl.java:27)
    at net.datenwerke.rs.terminal.service.terminal.TerminalSession.execute(TerminalSession.java:147)
    at net.datenwerke.rs.terminal.service.terminal.TerminalSession.execute(TerminalSession.java:110)
    at net.datenwerke.rs.terminal.server.terminal.TerminalRpcServiceImpl.doExecute(TerminalRpcServiceImpl.java:172)
    ... 45 more

Does you have a suggestion?

tks

Cadu

Offline

#2 2015-01-27 17:25:17

tomharney
Member
Registered: 2014-03-11

Re: LDAP Version 2.2.1 Import Error

Try taking a look at the LDAP filters further down in the code.

private String ldapFilter = "(employeeID=*)";

This is what I use since the objectClass isn't consistent in our LDAP tree.

Do you have an LDAP explorer/browser?  You may want to explore the LDAP schema to familiarize yourself with its contents.

I use SoftTerra LDAP browser:  http://www.ldapadministrator.com/softer … rowser.htm

UPDATE:

It might also be the attributes of the object.  Something like this:

		/* copy User attributes */
		node.setFirstname(getStringAttribute(sr, "givenName"));
		node.setLastname(getStringAttribute(sr, "sn"));
		node.setUsername(getStringAttribute(sr, "sAMAccountName"));

Last edited by tomharney (2015-01-28 02:12:03)

Offline

#3 2015-01-28 09:37:20

cedispin
Member
Registered: 2014-12-12

Re: LDAP Version 2.2.1 Import Error

Tom

Thank you for your information

I see my LDAP and the User attributes was correct!

The object class in LDAP are:

objectClass    top
objectClass    person
objectClass    organizationalPerson
objectClass    user

I tested the ldap filter with parameters below:

private String ldapFilter = "((objectClass=user))";
private String ldapFilter = "(|(objectClass=person)(objectClass=user))";
private String ldapFilter ="(&(objectClass=user)(sAMAccountName=*))";
private String ldapFilter ="((sAMAccountName=*))";

And with these seetings the error is same.

Do you have other suggestion?

Tks

Cadu

Offline

#4 2015-01-28 14:02:45

tomharney
Member
Registered: 2014-03-11

Re: LDAP Version 2.2.1 Import Error

Did you look at your LDAP tree using a browser?

Keep in mind there are key differences between the objectClass and attributes.

objectClass is the container and attributes are bits of information attached to the object such as Name, Address, Phone Number, etc.

I suggest browsing your tree to verify both the objectClass as well as the attributes available to you.

Offline

#5 2015-01-28 20:46:26

cedispin
Member
Registered: 2014-12-12

Re: LDAP Version 2.2.1 Import Error

Yes, I looked my LDAP tree,

And my ObjectClass are these. And these three attributes there are information.

Tks

Offline

#6 2015-01-31 10:34:43

cedispin
Member
Registered: 2014-12-12

Re: LDAP Version 2.2.1 Import Error

Hi

Are there any suggestion about this issue?

I need to implement the LDAP authentication in my customere.

Regards

Cadu

Offline

#7 2015-02-01 18:15:15

Thorsten J. Krause
Guest

Re: LDAP Version 2.2.1 Import Error

Hi,

sorry to chime in that late: The problem here actually has nothing to do with the script itself: The message you get indicates that the exec command wasn't able to find the file specified.
So check that you placed the script in the correct folder and you give the correct filename to the exec command. You can use [tab] for autocompletion of commands and paths in the terminal, that should also help.

Cheers,
Thorsten

Board footer

Powered by FluxBB