Results 1 to 6 of 6

Thread: @Configuration support in dm Server M6

  1. #1
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    9

    Default @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. #2
    Join Date
    Oct 2009
    Posts
    5

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    9

    Default

    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

  4. #4
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    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.
    Glyn Normington
    SpringSource

  5. #5
    Join Date
    Oct 2008
    Location
    Santa Fe, NM
    Posts
    18

    Default 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?

  6. #6
    Join Date
    Oct 2008
    Location
    Winchester, UK
    Posts
    535

    Default

    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.
    Glyn Normington
    SpringSource

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •