To run the sample 'article(comes bundled with spring-ldap1.3.1)', i am using
apacheds1.5.5 and
spring2.5.6.sec01
Spring-ldap 1.3.1.
While running this application, i am getting the following error
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'contextSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/directory/server/core/schema/bootstrap/NisSchema
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:380)
at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 45)
at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(St andardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(St andardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(Unkn own Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/apache/directory/server/core/schema/bootstrap/NisSchema
at org.springframework.ldap.test.TestContextSourceFac toryBean.createInstance(TestContextSourceFactoryBe an.java:96)
at org.springframework.beans.factory.config.AbstractF actoryBean.afterPropertiesSet(AbstractFactoryBean. java:130)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1335)
... 23 more
Caused by: java.lang.ClassNotFoundException: org.apache.directory.server.core.schema.bootstrap. NisSchema
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1676)
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1521)
... 27 more
The Spring-test uses "org.apache.directory.server.core.schema.bootstrap .NisSchema" .class file. But this is not present in apache-ds. Instead NisSchema is in "org.apache.directory.server.schema.bootstrap.NisS chema"
So suggest a work around.
Please some one suggest what jar files to use for running this sample.


Reply With Quote
