Announcement Announcement Module
Collapse
No announcement yet.
Failed to initialize interceptor chain Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Failed to initialize interceptor chain

    i got this trouble when i run the spring-ldap-person sample.
    mine env is window+tomcat.
    here is the stack:

    2007-06-21 10:10:47,218 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed>
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'serverContext' defined in ServletContext resource [/WEB-INF/apacheDsContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [javax.naming.InitialContext]: Constructor threw exception; nested exception is org.apache.directory.server.core.interceptor.Inter ceptorException: Failed to initialize interceptor chain. [Root exception is java.lang.NullPointerException]
    Caused by:
    org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [javax.naming.InitialContext]: Constructor threw exception; nested exception is org.apache.directory.server.core.interceptor.Inter ceptorException: Failed to initialize interceptor chain. [Root exception is java.lang.NullPointerException]
    Caused by:
    org.apache.directory.server.core.interceptor.Inter ceptorException: Failed to initialize interceptor chain. [Root exception is java.lang.NullPointerException]
    at org.apache.directory.server.core.interceptor.Inter ceptorChain.init(InterceptorChain.java:274)
    at org.apache.directory.server.core.DefaultDirectoryS ervice.initialize(DefaultDirectoryService.java:822 )
    at org.apache.directory.server.core.DefaultDirectoryS ervice.startup(DefaultDirectoryService.java:229)
    at org.apache.directory.server.core.jndi.AbstractCont extFactory.getInitialContext(AbstractContextFactor y.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.ja va:223)
    at javax.naming.InitialContext.<init>(InitialContext. java:197)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
    at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:85)
    at org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:87)
    at org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:186)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:799)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:717)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:384)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:156)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:160)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:287)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:244)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:187)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 49)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3831)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4323)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:823)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:595)
    at org.apache.catalina.core.StandardHostDeployer.inst all(StandardHostDeployer.java:277)
    at org.apache.catalina.core.StandardHost.install(Stan dardHost.java:832)
    at org.apache.catalina.startup.HostConfig.deployDirec tories(HostConfig.java:701)
    at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:432)
    at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:983)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:349)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:478)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:480)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:425)
    Caused by: java.lang.NullPointerException
    at org.apache.directory.server.core.ServerUtils.getAt tribute(ServerUtils.java:54)
    at org.apache.directory.server.core.partition.impl.bt ree.LeafEvaluator.evalEquality(LeafEvaluator.java: 301)
    at org.apache.directory.server.core.partition.impl.bt ree.LeafEvaluator.evaluate(LeafEvaluator.java:121)
    at org.apache.directory.server.core.partition.impl.bt ree.ExpressionEvaluator.evaluate(ExpressionEvaluat or.java:103)
    at org.apache.directory.server.core.partition.impl.bt ree.ExpressionEnumerator$2.assertCandidate(Express ionEnumerator.java:257)
    at org.apache.directory.server.core.partition.impl.bt ree.IndexAssertionEnumeration.prefetch(IndexAssert ionEnumeration.java:161)
    at org.apache.directory.server.core.partition.impl.bt ree.IndexAssertionEnumeration.<init>(IndexAssertio nEnumeration.java:66)
    at org.apache.directory.server.core.partition.impl.bt ree.ExpressionEnumerator.enumConj(ExpressionEnumer ator.java:270)
    at org.apache.directory.server.core.partition.impl.bt ree.ExpressionEnumerator.enumerate(ExpressionEnume rator.java:134)
    at org.apache.directory.server.core.partition.impl.bt ree.DefaultSearchEngine.search(DefaultSearchEngine .java:136)
    at org.apache.directory.server.core.partition.impl.bt ree.BTreePartition.search(BTreePartition.java:404)
    at org.apache.directory.server.core.partition.Default PartitionNexus.search(DefaultPartitionNexus.java:8 63)
    at org.apache.directory.server.core.referral.Referral Service.init(ReferralService.java:175)
    at org.apache.directory.server.core.interceptor.Inter ceptorChain.register0(InterceptorChain.java:436)
    at org.apache.directory.server.core.interceptor.Inter ceptorChain.register(InterceptorChain.java:395)
    at org.apache.directory.server.core.interceptor.Inter ceptorChain.init(InterceptorChain.java:260)
    ... 51 more

    i need some help! thanks in adv.

  • #2
    This is probably caused by the temporary apacheDS data file being corrupt. Try removing the directory Documents and settings\[user]\Local Settings\Temp\ldaptemplate_apacheds

    Comment


    • #3
      thanks for ur advice, Mr. Arthursson. i tryed ur method, but it didn't work!
      i cleaned my temp files, and restored my ApahceDS, still got this error!
      got any other advice, Mr. Arthursson?

      by the way, mine ApacheDS's version is 1.0.0.

      Comment


      • #4
        You could also try deleting the ldaptemplate_apacheds directory in Tomcat's temp dir, as well as the ldap-person in Tomcat's work/Catalina/localhost directory.

        Comment


        • #5
          thanks a lot, ulsa! it works now!
          but why this happened? do i have to delete temp files everytime?

          Comment


          • #6
            I can't say for sure, but I believe we got this problem when we upgraded from an ApacheDS release candidate to 1.0.0. Perhaps you have run the sample application with an earlier release of Spring LDAP before?

            You should not have to do this every time, but if you run into problems with Tomcat, deleting files from the work and temp dirs usually does the trick.

            Comment

            Working...
            X