TOMCAT在更新web.xml时显示java.lang.IndexOutOfBoundsException [英] TOMCAT showing java.lang.IndexOutOfBoundsException on updating web.xml

查看:249
本文介绍了TOMCAT在更新web.xml时显示java.lang.IndexOutOfBoundsException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我更新web.xml时,都会出现此错误

Whenever I update web.xml it is giving me this error

在以下过程中发生内部错误:" Tomcat v7.0的更新状态 本地主机上的服务器....java.lang.IndexOutOfBoundsException"

"An internal error occurred during: "Updating status for Tomcat v7.0 Server at localhost...". java.lang.IndexOutOfBoundsException"

我使用默认配置的apache tomcat 7.当我在端口8080(家用计算机)上使用tomcat,然后使用8080端口将该项目导入到我的办公室计算机时,开始出现此问题. 除此之外,其他所有内容都是相同的.

I am using apache tomcat 7 with default configuration. This problem started when I was using tomcat on port 8080(home computer) and then i imported that project to my office computer with port 8080. Other than this everything is same.

我在下面做了

  1. 重新创建的Maven存储库.
  2. 重新配置的服务器

推荐答案

我遇到了这个问题,我通过添加jax-rs api解决了该问题,并且工作正常.

I was having that problem and I solved it adding jax-rs api and works fine.

有错误:

        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>2.24</version>
        </dependency>
        <!-- Added -->
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
            <version>2.0.1</version>
        </dependency>

这篇关于TOMCAT在更新web.xml时显示java.lang.IndexOutOfBoundsException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆