mburbidg
May 28th, 2008, 11:54 PM
Consider the following stack trace
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'fileShareRepository' defined in URL [bundleentry://27/WEB-INF/newClientAPI-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LinkedMap
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:881)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:837)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:440)
I'm using Spring-DM with the web support. I have a war that uses Spring-MVC and the rest of the Spring Framework. To get rid of the above stack trace I have to place the following entry in the manifest for my bundle.
Import-Package: org.apache.commons.collections.map
Of course there are many other things in my import. What I don't understand, given the stack trace is why my bundle has to include this in it's imports. It doesn't use it directly. It is used by one of the Spring bundles. Do I have to import all packages that my bundle, uses and then recursively or transitively import all packages imported by any bundles my bundle imports. This seems unwieldy. Am I missing something?
Thanks,
Michael-
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'fileShareRepository' defined in URL [bundleentry://27/WEB-INF/newClientAPI-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LinkedMap
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:881)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:837)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:440)
I'm using Spring-DM with the web support. I have a war that uses Spring-MVC and the rest of the Spring Framework. To get rid of the above stack trace I have to place the following entry in the manifest for my bundle.
Import-Package: org.apache.commons.collections.map
Of course there are many other things in my import. What I don't understand, given the stack trace is why my bundle has to include this in it's imports. It doesn't use it directly. It is used by one of the Spring bundles. Do I have to import all packages that my bundle, uses and then recursively or transitively import all packages imported by any bundles my bundle imports. This seems unwieldy. Am I missing something?
Thanks,
Michael-