ModuleDependencyException:模块Magnolia标准模板工具包(版本1.4.4)依赖于dms版本1.5 / *,但未找到

时间:2014-04-30 12:56:02

标签: tomcat magnolia

在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 Server运行项目时,出现以下错误:

    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

这是我的complett 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 个答案:

答案 0 :(得分: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, 扬