Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 998143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:08:47+00:00 2026-05-16T07:08:47+00:00

Good morning / afternoon, I have a problem with LDAP connector, when I use

  • 0

Good morning / afternoon,

I have a problem with LDAP connector, when I use it in my unit test no problem, but when it was called in a application server environment, it seems to have classpath issue, but this class is delivred with java 1.6.17 (version I use).

I use spring-ldap to initiate my connection.

public static LdapContextSource getLdapContextSource(final String url, final String base) throws Exception {
    LdapContextSource ldapContextSource = new LdapContextSource();

    ldapContextSource.setUrl(url);
    ldapContextSource.setBase(base);
    ldapContextSource.setPooled(true);
    //ldapContextSource.setContextFactory(LdapCtxFactory.class);

    ldapContextSource.afterPropertiesSet();

    return ldapContextSource;
}

Here is the log :

2010-08-10 09:46:38,183 : StandardWrapperValve.invoke : Servlet.service() for servlet default threw exception
java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at org.ow2.easybeans.loader.EasyBeansClassLoader.findClass(EasyBeansClassLoader.java:134)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
    at org.ow2.easybeans.loader.EasyBeansClassLoader.loadClass(EasyBeansClassLoader.java:238)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at org.springframework.ldap.core.support.AbstractContextSource.class$(AbstractContextSource.java:67)
    at org.springframework.ldap.core.support.AbstractContextSource.<clinit>(AbstractContextSource.java:67)
    at org.zenithar.security.connectors.impl.ldap.LdapContextFactory.getLdapContextSource(LdapContextFactory.java:16)

Thanks for all.
Regards.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:08:48+00:00Added an answer on May 16, 2026 at 7:08 am

    I found the solution ^^

    It was a problem with Jonas 5 wich is an app server running on OSGI platform.
    My application is a common core jar (containing spring context with DAO) shared by 3 wars. It seems that the JVM used to host the common core is not the same as used for the 3 wars.

    I add to my felix-config.properties

    org.osgi.framework.bootdelegation=....
        sun.util.calendar; \
        com.sun.jndi.ldap; \
        version="1.5.0"
    

    And

    org.osgi.framework.bootdelegation=com.sun.corba, \
    ....
    com.sun.jndi.ldap.*
    

    So that I can load com.sun.jndi.ldap.LdapCtxFactory in my Common Core.

    Thanks for your help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good morning/afternoon, Not so much a problem but more of a query. If I
Good morning, I have to use the properties from DeviceNetworkInformation in my application. (http://msdn.microsoft.com/en-us/library/microsoft.phone.net.networkinformation.devicenetworkinformation(v=vs.92).aspx)
Good Morning/Afternoon all, I have a ASP:grid which displays current versions of Terms and
Good morning / afternoon, I have a very simple MS Access DB and I
Good morning, I have problem with using MasterPage and jQuery. I using jQuery UI
Good morning everyone, I tried to sleep over my problem, but I am stuck
Good morning/afternoon/evening, Internet. I am currently developing a wap game and have encountered a
Good Morning, I have an application which allows users to slide values for different
Good Morning, I have Stuck in a strange problem. I want to open PDF
Good morning/afternoon/evening guys Here is the thing. I'm making a registering gsp that it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.