Announcement Announcement Module
Collapse
No announcement yet.
Domain driven design in Spring DM Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Domain driven design in Spring DM

    Hi,

    We are currently porting an existing application to Spring DM. The application is based on the principles of DDD and makes use of the @configurable annotation. Althrough this works outside OSGi, I've been unable to make this work within OSGi.

    The main issue that arises is that I can't seem to get the AspectJ LTW to work. Although,I added the VM argument "javaagent:spring-agent.jar", I get the following error:

    ERROR [org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext] - Post refresh error
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.springframework.osgi.util.BundleDelegatingClas sLoader] 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
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:445)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:383)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:353)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 45)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:169)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:242)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:400)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:736)
    at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.completeRefres h(AbstractDelegatedExecutionApplicationContext.jav a:248)
    at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor$CompleteRefreshTask.run(DependencyWaiterApp licationContextExecutor.java:136)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.IllegalStateException: ClassLoader [org.springframework.osgi.util.BundleDelegatingClas sLoader] 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
    at org.springframework.context.weaving.DefaultContext LoadTimeWeaver.setBeanClassLoader(DefaultContextLo adTimeWeaver.java:82)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1244)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:438)
    ... 12 more

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:383)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:353)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 45)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:169)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:242)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:400)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:736)
    at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.completeRefres h(AbstractDelegatedExecutionApplicationContext.jav a:248)
    at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor$CompleteRefreshTask.run(DependencyWaiterApp licationContextExecutor.java:136)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.IllegalStateException: ClassLoader [org.springframework.osgi.util.BundleDelegatingClas sLoader] 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
    at org.springframework.context.weaving.DefaultContext LoadTimeWeaver.setBeanClassLoader(DefaultContextLo adTimeWeaver.java:82)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1244)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:438)


    Is there anyone that has been able to make this work in an osgi environment, without using OSGi extension like AOSGi or AJEER?

    Thx in advance,
    Volvin
Working...
X