当前位置: 首页 > 知识库问答 >
问题:

使用tomcat 7容器配置Weld 2.0项目时出错

法浩壤
2023-03-14

尝试在tomcat7下部署war项目,我面临以下问题/错误:

(只有使用weld servlet 1.1.12 final i才能部署该项目)

信息:validateJarFile(c:\\workspace_plataforma_arq.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\educaCao_empreendora\web-inf\lib\jboss-el-api_3.0_spec-1.0.alpha1.jar)-未加载jar。参见Servlet规范2.3,第9.7.2节。违规类:javax/el/expression.class Jun 11,2013年4:47:05 PM org.apache.catalina.loader.webappclassloader validateJarFile信息:validateJarFile(C:\Java\workspace_plataforma_arq.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\educacao_empreendora\web-inf\lib\weld-servlet-2.0.1.final.jar)-未加载jar。参见Servlet规范2.3,第9.7.2节。违规类:javax/el/expression.class

POM:

<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>
    <groupId>br.com.infosolo</groupId>
    <artifactId>empreed</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>Empre</name>
    <description>Empre</description>
    <properties>
        <deltaspike.version>0.4</deltaspike.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.7</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.1.18</version>
        </dependency>
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.1.18</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>3.5</version>
        </dependency>
        <!-- <dependency> <groupId>org.primefaces.extensions</groupId> <artifactId>primefaces-extensions</artifactId> 
            <version>0.7.0-SNAPSHOT</version> </dependency> -->
        <dependency>
            <groupId>org.primefaces.themes</groupId>
            <artifactId>bootstrap</artifactId>
            <version>1.0.9</version>
        </dependency>

        <!-- WELD CONFIG CDI -->
        <!-- dependency> <groupId>org.jboss.weld.servlet</groupId> <artifactId>weld-servlet</artifactId> 
            <version>1.1.12.Final</version> </dependency -->

        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <scope>provided</scope>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.weld.servlet</groupId>
            <artifactId>weld-servlet</artifactId>
            <version>2.0.1.Final</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-core</artifactId>
            <version>2.0.1.Final</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.el</groupId>
                    <artifactId>el-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.jboss.weld.servlet</groupId>
            <artifactId>weld-servlet-core</artifactId>
            <version>2.0.1.Final</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.el</groupId>
                    <artifactId>el-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- FIM WELD CONFIG -->

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.2</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.2.2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.deltaspike.core</groupId>
            <artifactId>deltaspike-core-api</artifactId>
            <version>${deltaspike.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.deltaspike.core</groupId>
            <artifactId>deltaspike-core-impl</artifactId>
            <version>${deltaspike.version}</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.deltaspike.modules</groupId>
            <artifactId>deltaspike-jpa-module-api</artifactId>
            <version>${deltaspike.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.deltaspike.modules</groupId>
            <artifactId>deltaspike-jpa-module-impl</artifactId>
            <version>${deltaspike.version}</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.0.0.GA</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.0.0.GA</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>4.0.1.Final</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.0.1.Final</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate.common</groupId>
            <artifactId>hibernate-commons-annotations</artifactId>
            <version>4.0.1.Final</version>
        </dependency>

        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>2.1.7</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.9</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>3.9</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.1</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.4</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.6.4</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>

        <!-- dependency> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> 
            <version>2.2</version> <scope>provided</scope> </dependency -->



        <dependency>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.0-beta-1</version>
            <type>maven-plugin</type>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>3.1.3.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>3.1.3.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>3.1.3.RELEASE</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <warName>empreend</warName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.0-beta-1</version>
                <configuration>
                    <path>/educacaoempreendedora</path>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>central</id>
            <name>Maven Central Repository</name>
            <url>http://repo1.maven.org/maven2</url>
        </repository>

        <repository>
            <id>public</id>
            <name>Public Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
        </repository>

        <repository>
            <id>apache</id>
            <name>apache</name>
            <url>http://repo.maven.apache.org/maven2/</url>
        </repository>

        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>prime-repo</id>
            <name>PrimeFaces Maven Repository</name>
            <url>http://repository.primefaces.org</url>
            <layout>default</layout>
        </repository>

        <repository>
            <id>sonatype-oss-public</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>public</id>
            <name>Public Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
        </pluginRepository>
        <pluginRepository>
            <id>apache.snapshots</id>
            <name>Apache Snapshots</name>
            <url>http://repository.apache.org/content/groups/snapshots-group/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
    <organization>
        <name>Infosolo LTDA</name>
        <url>www.infosolo.com.br</url>
    </organization>
</project>

共有1个答案

樊腾
2023-03-14

我发现weld-servlet-2.0.1.final不会被加载,因为它捆绑了一个冒犯性的包javax.el。使用Weld-Servlet-2.0.0.SP1。

 类似资料:
  • 我不理解收到的错误消息,也不知道如何解决它。当我尝试构建项目时,我看到以下错误: 我正在使用带有Ionic框架的Cordova。

  • 我是npm和Angular 2的新手,我正在尝试使用Angular/CLI建立一个新的Angular 2项目。 我当前正在运行: Node V8.9.3 npm V5.6.0 Windows 10 首先,我运行,看起来安装得很好。然后我转到我想启动项目的文件夹,运行,但不断得到这个错误。 npm警告已弃用angular-cli@1.0.0-beta.22-1:angular-cli已重命名为@An

  • 我正在使用本地竹配置项生成IPA文件。竹作业能够从Git存储库中获取项目并成功地构建它,但在将其导出为IPA文件时,我遇到了路径问题。 Validate/users/admin/library/developer/xcode/deriveddata/stackapp-cmvkahtnfpsmsmecbxrmhrwzekn/BUILD/products/release-iphoneOS/stacka

  • 在Windows机器上,我在Eclipse的Gradle项目中使用Groovy已有一段时间了。现在我正在尝试为Linux机器进行配置。(Linux Mint MATE)<代码>uname-a给出: Linuxmike-纬度-E6410 4.4.0-53-通用#74-Ubuntu SMP Fri Dec 2 15:58:04 UTC 2016 i686 i686 GNU/Linux 日蚀氧气。使用以

  • 我正在MacOS上尝试在Android模拟器上运行react native(0.59.9)应用程序。我用巫师整合了哨兵。在iPhone上运行良好。在Android上,会出现这种情况: 我尝试使用react-native run-android运行应用程序 配置项目“:@sentry_react-native”时出现问题。未找到SDK位置。使用local.properties文件中的sdk.dir或

  • 项目配置 项目配置 配置简介 CAT上项目名称:项目接入CAT后的唯一标识,来识别自己 事业部:项目所属事业部 产品线:项目所属产品线 负责人:项目负责人,该项不做为告警联系人 项目组邮件:项目负责人邮件,或项目组产品线邮件,多个邮箱由英文逗号分割,不要留有空格;作为发送告警邮件、微信的依据 项目组号码:项目负责人手机号;多个号码由英文逗号分隔,不要留有空格;作为发送告警短信的依据 机器分组配置