ModuleDependencyException:Module Magnolia Standard Templating Kit(1.4.4 版)依赖于 dms 1.5/* 版,未找到
Posted
技术标签:
【中文标题】ModuleDependencyException:Module Magnolia Standard Templating Kit(1.4.4 版)依赖于 dms 1.5/* 版,未找到【英文标题】:ModuleDependencyException: Module Magnolia Standard Templating Kit (version 1.4.4) is dependent on dms version 1.5/*, which was not found 【发布时间】:2014-04-30 12:56:01 【问题描述】:在 Eclipse 中,我创建了一个 maven 项目“magnolia-empty-webapp”,我想使用magnolia STK
。我添加magnolia STK dependency
如下:
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-standard-templating-kit</artifactId>
<version>1.4.4</version>
之后我成功安装了项目(right mousclick on the project ->run as -> maven install
)
现在当我使用 apache tomcat 服务器运行项目时,我收到以下错误:
Apr 30, 2014 2:44:22 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Common Files\Lenovo;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\Lenovo\Access Connections\;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\Common Files\Lenovo;C:\work\apache-maven-2.2.1\bin;C:\msysgit\bin;C:\Program Files\Java\jre6\bin;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Windows Live\Shared;C:\work\filevault\vault-cli-2.3.6\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;.
Apr 30, 2014 2:44:22 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]Server/Service/Engine/Host/Context Setting property 'source' to 'org.eclipse.jst.j2ee.server:magnolia-empty-webapp' did not find a matching property.
Apr 30, 2014 2:44:22 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Apr 30, 2014 2:44:22 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Apr 30, 2014 2:44:22 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 643 ms
Apr 30, 2014 2:44:22 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 30, 2014 2:44:22 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Apr 30, 2014 2:44:27 PM org.apache.catalina.startup.TldConfig tldScanWebXml
WARNING: Failed to process TLD with path [cmsfn-taglib] and URI [/WEB-INF/cmsfn-taglib.tld]
java.net.MalformedURLException
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:544)
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:357)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:271)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:569)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
... 26 more
Apr 30, 2014 2:44:27 PM org.apache.catalina.startup.TldConfig tldScanWebXml
WARNING: Failed to process TLD with path [cms-util-taglib] and URI [/WEB-INF/cms-util-taglib.tld]
java.net.MalformedURLException
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:544)
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:357)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:271)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:569)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
... 26 more
Apr 30, 2014 2:44:27 PM org.apache.catalina.startup.TldConfig tldScanWebXml
WARNING: Failed to process TLD with path [cms-taglib] and URI [/WEB-INF/cms-taglib.tld]
java.net.MalformedURLException
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:544)
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:357)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:271)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:569)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
... 26 more
Apr 30, 2014 2:44:28 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class info.magnolia.cms.servlets.MgnlServletContextListener
java.lang.RuntimeException: info.magnolia.module.model.reader.ModuleDependencyException: Module Magnolia Standard Templating Kit (version 1.4.4) is dependent on dms version 1.5/*, which was not found.
at info.magnolia.cms.beans.config.PropertiesInitializer.loadAllModuleProperties(PropertiesInitializer.java:153)
at info.magnolia.cms.beans.config.PropertiesInitializer.loadAllProperties(PropertiesInitializer.java:119)
at info.magnolia.cms.servlets.MgnlServletContextListener.contextInitialized(MgnlServletContextListener.java:192)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: info.magnolia.module.model.reader.ModuleDependencyException: Module Magnolia Standard Templating Kit (version 1.4.4) is dependent on dms version 1.5/*, which was not found.
at info.magnolia.module.model.reader.DependencyCheckerImpl.checkSpecificDependency(DependencyCheckerImpl.java:75)
at info.magnolia.module.model.reader.DependencyCheckerImpl.checkDependencies(DependencyCheckerImpl.java:58)
at info.magnolia.module.ModuleManagerImpl.loadDefinitions(ModuleManagerImpl.java:140)
at info.magnolia.cms.beans.config.PropertiesInitializer.loadAllModuleProperties(PropertiesInitializer.java:148)
... 12 more
这是我的完整 pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>magnolia-project</artifactId>
<groupId>info.magnolia</groupId>
<version>4.4.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>magnolia-empty-webapp</artifactId>
<packaging>war</packaging>
<name>magnolia-empty-webapp</name>
<description>The basic Magnolia webapp on which projects can depend.</description>
<profiles>
<profile>
<id>with-optional-modules</id>
<dependencies>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-workflow</artifactId>
<version>$project.version</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-samples</artifactId>
<version>$project.version</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-demo-project</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-dms</artifactId>
<version>1.5</version>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-templating</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-core</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-admininterface</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-taglib-utility</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-taglib-cms</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-cache</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-exchange-simple</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-gui</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-jaas</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-fckeditor</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-mail</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-store-client</artifactId>
<version>4.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils-log4j</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-standard-templating-kit</artifactId>
<version>1.4.4</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>info.magnolia</groupId> -->
<!-- <artifactId>magnolia-module-dms</artifactId> -->
<!-- <version>1.5.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>info.magnolia.themes.blue</groupId> -->
<!-- <artifactId>magnolia-theme-blue</artifactId> -->
<!-- <version>1.0.0-SNAPSHOT</version> -->
<!-- </dependency> -->
</dependencies>
<build>
<resources>
<resource>
<!-- these are the resources copied by the remote-resources-plugin -->
<directory>$basedir/target/maven-shared-archive-resources</directory>
<excludes>
<exclude>**/*</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/cache</directory>
</fileset>
<fileset>
<directory>src/main/webapp/logs</directory>
</fileset>
<fileset>
<directory>src/main/webapp/repositories</directory>
</fileset>
<fileset>
<directory>src/main/webapp/templates</directory>
</fileset>
<fileset>
<directory>src/main/webapp/tmp</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webResources>
<resource>
<!-- these are the resources copied by the remote-resources-plugin -->
<directory>$basedir/target/maven-shared-archive-resources</directory>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
</configuration>
</plugin>
<plugin>
<groupId>net.sf.alchim</groupId>
<artifactId>winstone-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<goals>
<goal>embed</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>magnolia.nexus.public</id>
<url>http://nexus.magnolia-cms.com/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>magnolia</id>
<url>http://repo.magnolia-cms.com/m2</url>
</pluginRepository>
</pluginRepositories>
</project>
有什么想法吗?
【问题讨论】:
【参考方案1】:为什么要注释掉对 DMS 的依赖? STK 需要 DMS 才能正常运行,而这正是错误消息所说的。通过取消注释
<!-- <dependency> -->
<!-- <groupId>info.magnolia</groupId> -->
<!-- <artifactId>magnolia-module-dms</artifactId> -->
<!-- <version>1.5.2</version> -->
<!-- </dependency> -->
您应该能够摆脱该错误。 IIRC 还有很多其他模块需要。
上面的替代方法是将 eclipse 配置为使用 with-optional-modules 配置文件运行构建,但随后您也会获得演示模块,这可能不是您想要的。
有关完整的依赖项列表,您可以在 /META-INF/magnolia/standard-templating-kit.xml 中查看模块 jar 文件的内部。此文件包含运行时依赖项列表。或者您可以查看 stk-bundle 的 pom 以查看它在创建 bundle 时包含哪些其他模块。
HTH, 一月
【讨论】:
以上是关于ModuleDependencyException:Module Magnolia Standard Templating Kit(1.4.4 版)依赖于 dms 1.5/* 版,未找到的主要内容,如果未能解决你的问题,请参考以下文章