Announcement Announcement Module
Collapse
No announcement yet.
@Configuration support in dm Server M6 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Configuration support in dm Server M6

    Hello,

    I'm using @Configuration classes in one of my bundles (say bundle "configBdl") . The @Configuration class is scanned and recognized using the standard xml bootstrap config
    Code:
    ...
    <context:annotation-config />
    <context:component-scan base-package="package.with.config.class" />
    ...
    The manifest of my bundle contains the following imports
    Code:
    ...
    Import-Package: net.sf.cglib.core;version="2.1",net.
     sf.cglib.proxy;version="2.1",net.sf.cglib.reflect;version="2.1"
    ...
    The bundle repository of my dm server installation contains the bundle "com.springsource.net.sf.cglib-2.1.3.jar".

    The above setup worked without problems in dm server M4. Using the M6 however I get the following error when bundle "configBdl" starts:
    Code:
    [2009-11-03 12:56:27.295] Thread-3                     <DE0061E> Start failed for bundle 'configBdl' version '0.4'. java.lang.IllegalStateException: CGLIB is required to process @Configuration classes. Either add CGLIB to the classpath or remove the following @Configuration bean definitions: [restBaseFormConfiguration, restBaseConverterConfiguration]
    	at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:257)
    	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:147)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:479)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:467)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:395)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:281)
    	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
    	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)
    	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
    	at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)
    	at com.springsource.kernel.dmfragment.internal.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:83)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:619)
    Versions used:
    • dm Server M6 (with Spring 3.0.0.RC1)
    • CGLib 2.1.3

    Does anybody use a similar setup / encounter the same problems?

    Kind Regards
    Harald

  • #2
    Hi, Harald,

    Yes, I ran into that: See http://forum.springsource.org/showthread.php?t=79641 and https://issuetracker.springsource.com/browse/DMS-1930.

    Hope that helps.
    Karen

    Comment


    • #3
      Hi Karen,

      thanks a lot for your reply. Adding the cglib bundle to com.springsource.kernel.region.bundles in com.springsource.kernel.launch.properties solved my problem!

      There should really be some kind of documentation about the resolution of optional dependencies.

      Harald

      Comment


      • #4
        Sorry you hit this problem. Documentation is unfortunately lower priority than getting the code to release candidate status. When we implement DMS-1930 configuration of the user region will be simpler to document and understand. Meanwhile I'd urge you to vote for DMS-1930 as I want to make sure it is addressed sooner rather than later.

        Comment


        • #5
          DMS-1930 workaround

          In DMS M6, I used your workaround for DMS-1930 to get cglib 2.1.3 to load from the com.springsource.kernel.region.bundles section of lib/com.springsource.kernel.launch.properties (to enable remote messaging proxies for spring-flex).

          Since DMS-1930 was fixed, the com.springsource.kernel.region.bundles section is gone from launch.properties. Any idea how to force same behavior with the new properties files?

          Comment


          • #6
            The property was moved to the com.springsource.kernel.userregion.properties file and renamed, although its contents should look familiar.

            The rationale is that if we eventually support multiple user regions, this property is specific to a particular user region.

            Comment

            Working...
            X