2016-04-12 45 views
1

Spring 4.2.5 sürümünü ve 3.0.5 sürümünün tüm döşemelerini kullanıyorum. maven de başarılı inşa etti. Ama uygulama başlarken java.lang.NoClassDefFoundError: org/apache/tiles/TilesApplicationContext hatası alıyorum.java.lang.NoClassDefFoundError: org/apache/fayans/TilesApplicationContext

Projemde "TilesApplicationContext" sınıfında arama yapmayı denedim ve bunun spring-webmvc -4.2.5.jar dosyasında ve TilesApplicationContext'in fayans-api-2.2.2 sürümüne ve fayans-api kullanana kadar orada bulunduğunu buldum. -3.0.5

Bu konuda bana yardımcı olabilecek herhangi biri olabilir. I 3.0.5 kavanozları ve "web uygulama config.xml" dosya "org sürüm fayans ilave gibi,

<?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/xsd/maven-4.0.0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
<name>MyProject</name> 
<description>This is the ${project.name} project.</description> 
<groupId>org.apache.maven</groupId> 
<artifactId>MyProject</artifactId> 
<version>0.0.1-SNAPSHOT</version> 
<packaging>war</packaging> 
    <build> 
    <finalName>MyProject</finalName> 
    </build> 
<dependencies> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.8.1</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-webmvc-portlet</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-context-support</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-jdbc</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-webmvc</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-web</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-core</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-beans</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-context</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-tx</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-orm</artifactId> 
     <version>4.2.5.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>commons-logging</groupId> 
     <artifactId>commons-logging</artifactId> 
     <version>1.2</version> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>javax.servlet-api</artifactId> 
     <version>3.1.0</version> 
    </dependency> 
    <dependency> 
     <groupId>commons-dbcp</groupId> 
     <artifactId>commons-dbcp</artifactId> 
     <version>1.4</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.tiles</groupId> 
     <artifactId>tiles-api</artifactId> 
     <version>3.0.5</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.tiles</groupId> 
     <artifactId>tiles-core</artifactId> 
     <version>3.0.5</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.tiles</groupId> 
     <artifactId>tiles-servlet</artifactId> 
     <version>3.0.5</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.tiles</groupId> 
     <artifactId>tiles-el</artifactId> 
     <version>3.0.5</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.tiles</groupId> 
     <artifactId>tiles-jsp</artifactId> 
     <version>3.0.5</version> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-api</artifactId> 
     <version>1.7.6</version> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-nop</artifactId> 
     <version>1.6.1</version> 
     <exclusions> 
       <exclusion> 
        <groupId>org.slf4j</groupId> 
        <artifactId>slf4j-api</artifactId> 
       </exclusion> 
      </exclusions> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-api</artifactId> 
     <version>1.7.6</version> 
    </dependency> 
    <dependency> 
     <groupId>ch.qos.logback</groupId> 
     <artifactId>logback-core</artifactId> 
     <version>1.1.1</version> 
    </dependency> 

    <dependency> 
     <groupId>ch.qos.logback</groupId> 
     <artifactId>logback-classic</artifactId> 
     <version>1.1.1</version> 
    </dependency> 

    <dependency> 
     <groupId>ch.qos.logback</groupId> 
     <artifactId>logback-access</artifactId> 
     <version>1.1.1</version> 
    </dependency> 
    <dependency> 
     <groupId>javax.activation</groupId> 
     <artifactId>activation</artifactId> 
     <version>1.1.1</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.velocity</groupId> 
     <artifactId>velocity</artifactId> 
     <version>1.6.2</version> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>jstl</artifactId> 
     <version>1.2</version> 
    </dependency> 
    <dependency> 
     <groupId>taglibs</groupId> 
     <artifactId>standard</artifactId> 
     <version>1.1.2</version> 
    </dependency> 
    <dependency> 
     <groupId>aspectj</groupId> 
     <artifactId>aspectjrt</artifactId> 
     <version>1.5.4</version> 
    </dependency> 
    <dependency> 
     <groupId>net.sf.sojo</groupId> 
     <artifactId>sojo</artifactId> 
     <version>0.5.0</version> 
    </dependency> 
    <dependency> 
     <groupId>net.sf.spring-json</groupId> 
     <artifactId>spring-json</artifactId> 
     <version>1.3.1</version> 
      <exclusions> 
       <exclusion> 
        <groupId>net.sf.sojo</groupId> 
        <artifactId>sojo-optional</artifactId> 
       </exclusion> 
       <exclusion> 
        <groupId>org.springframework</groupId> 
        <artifactId>spring</artifactId> 
       </exclusion> 
      </exclusions> 
    </dependency> 
    <dependency> 
     <groupId>org.javassist</groupId> 
     <artifactId>javassist</artifactId> 
     <version>3.14.0-GA</version> 
    </dependency> 
    </dependencies> 
    </project> 

cevap

3

Çekirdek kavanoz ayıklama sonra çözelti Bulunan: aşağıdakı benim maven konfigürasyonudur. tiles3 .TilesConfigurer "org.springframework.web.servlet.view. tiles2 .TilesConfigurer" olarak kullanıldı. Bunu değiştirdikten sonra sorunsuz çalışır.