我正在尝试使用开花(v.1.2.3)的木兰(v 4.4.6)进行春季整合。安装并重新启动tomcat之后,我看到一个错误:(任何想法如何解决此问题?)

2012-01-27 11:05:56,733 INFO  info.magnolia.cms.beans.config.MIMEMapping        :

Registering event listener for MIMEMapping
2012-01-27 11:05:56,735 INFO  info.magnolia.cms.beans.config.ConfigLoader       : Configuration loaded (took 7 seconds)
2012-01-27 11:05:56,926 WARN  gnolia.content2bean.impl.Content2BeanProcessorImpl: can't resolve class for node /server/filters/cms/blossom
java.lang.NoClassDefFoundError: org/springframework/core/NestedIOException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at info.magnolia.objectfactory.DefaultClassFactory.forName(DefaultClassFactory.java:52)
        at info.magnolia.content2bean.impl.Content2BeanTransformerImpl.resolveType(Content2BeanTransformerImpl.java:110)
        at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toBean(Content2BeanProcessorImpl.java:77)
        at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toMap(Content2BeanProcessorImpl.java:178)
        at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toBean(Content2BeanProcessorImpl.java:94)
        at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toMap(Content2BeanProcessorImpl.java:178)
        at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toBean(Content2BeanProcessorImpl.java:94)
        at info.magnolia.content2bean.impl.Content2BeanProcessorImpl.toBean(Content2BeanProcessorImpl.java:68)
        at info.magnolia.content2bean.Content2BeanUtil.toBean(Content2BeanUtil.java:149)
        at info.magnolia.content2bean.Content2BeanUtil.toBean(Content2BeanUtil.java:135)
        at info.magnolia.cms.filters.MgnlMainFilter.createRootFilter(MgnlMainFilter.java:151)
...
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.springframework.core.NestedIOException
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
        ... 45 more

最佳答案

我遇到了同样的问题,我通过将以下依赖项添加到自定义模块中来解决了这个问题:

org.springframework:spring-webmvc
org.springframework:spring-core
org.springframework:spring-web


我不确定是否所有这些依赖项都是必需的。查看开花的pom.xml(http://svn.magnolia-cms.com/view/community/modules/blossom/magnolia-module-blossom/trunk/pom.xml),spring-webmvc具有scope="provided",其中表示spring-mvc打算以一种或另一种形式提供。但至少它可以与那些显式依赖项一起使用

09-04 10:06