Announcement Announcement Module

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Handler Error when trying to deploy Spring application on Equinox Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handler Error when trying to deploy Spring application on Equinox

    We have a Spring application that works perfectly with Tomcat 5.5.26 without any OSGi artifacts. I am now trying to deploy the same application (with changes mentioned below) on Equinox. As per the documentation, I have done the following:
    1. Started equinox and deployed required Spring DM bundles alongwith catalina services.
    2. Modified my web.xml as per the documentation
    3. Updated MANIFEST.MF to the one attached

    After crossing some hurdles, I am stuck with following error. Any suggestion is greatly appreciated.

    Timer-2 ERROR [context.ContextLoader] - Context initialization failed
    org.springframework.beans.factory.BeanDefinitionSt oreException: Unexpected exception parsing XML document from URL [bundleentry://31/WEB-INF/test-service.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [ aceHandler] for namespace []: problem with handler class file or dependent class; nested exception is java.lang.VerifyError: (class: org/springframework/security/config/LdapProviderBeanDefinitionParser, method: parse signature: (Lorg/w3c/dom/Element;Lorg/springframework/beans/factory/xml/ParserContextLorg/springframework/beans/factory/config/BeanDefinition Incompatible object argument for function call at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio

  • #2
    Hi rajubanna,

    It seems that Spring can't find spring.handlers and spring.schemas files for Spring Security within the spring-security.jar file within your Spring DM powered Web bundle.

    My suggestion is to define all your dependencies using OSGi and not as internal jar files for your bundle with the Bundle-Classpath header. The idea is to provision the container with all tools you need as OSGi bundles.

    I use this approach and I make work the Spring Security configuration based on the security namespace.

    Hope it helps you!


    • #3
      Adding to what Thierry said, it seems that you are using different versions of the same library within the same application. Potentially, you are nesting some libraries inside some bundles while using other libraries as full bundles. This causes class conflict as indicated by the VerifyError in your stacktrace.


      • #4
        Thanks a lot for your suggestions. I was able to solve the issue on same lines. I had spring security jar in WEB-INF/lib folder which wasn't working. Then I deployed the jar as a bundle but did not remove it from WEB-INF/lib folder that resulted in VerifyError. After removing the spring-security jars from my application's WEB-INF/lib folder, the issue got resolved.

        Thanks again for all your help.