dm Server
  1. dm Server
  2. DMS-2490

@Configurable doesn't work with ServerOsgiBundleXmlWebApplicationContext

    Details

    • Type: Defect Defect
    • Status: Done Done
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 2.0.0.RC1, 2.0.0.RELEASE, 2.0.1.RELEASE
    • Fix Version/s: Sprint 27, 2.0.2.RELEASE
    • Component/s: None
    • Labels:
      None
    • Environment:
      • Windows XP
      • STS 2.3.2.RELEASE
      • Springsource DM Server 2.0 (1.0)
      • Springframework 3.0 (2.5)

      Description

      I have a problem with using @Configurable annotated beans in a web application (war bundle).
      Everything works fine without contextClass parameter in web.xml

      <context-param>
      	<param-name>contextClass</param-name>
      	<param-value>com.springsource.server.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
      </context-param>
      

      If contextClass paramter is present in web.xml I'm getting exception:

      start-signalling-6 org.springframework.web.context.ContextLoader
      Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.weaving.AspectJWeavingEnabler#0': Initialization of bean failed; nested exception is
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.springframework.osgi.util.BundleDelegatingClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:spring-agent.jar

      As far as I know I need to have ServerOsgiBundleXmlWebApplicationContext defined in web.xml while it enables

      <reference ... />

      Please see attached simple application, which is not working either on Springsource DM 2.0 or 1.0.
      After removing ServerOsgiBundleXmlWebApplicationContext @Configurable works as expected.

        Activity

          People

          • Assignee:
            Glyn Normington (c)
            Reporter:
            Igor Banduric
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date:

              Time Tracking

              Estimated:
              Original Estimate - 8.5h
              8.5h
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 5h 35m Time Not Required
              5h 35m