小编4_y*_*4_y的帖子

Eclipse - Tomcat 7 - 发布时的java.lang.IndexOutOfBoundsException

我有一个使用maven的Webproject,当我尝试将它部署到Tomcat 7时,我收到以下消息:

Publishing failed
Could not publish to the server.
java.lang.IndexOutOfBoundsException
Could not publish server configuration: myworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\server.xml (The system cannot find the path specified.). 
myworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\server.xml (The system cannot find the path specified.)
Run Code Online (Sandbox Code Playgroud)

当我在'myworkpace.metadata.logs'中查看tomcat的日志文件时,我看到以下内容:

!ENTRY org.eclipse.wst.server.core 4 0 2013-11-22 13:36:40.128
!MESSAGE Publishing failed
!SUBENTRY 1 org.eclipse.wst.server.core 4 0 2013-11-22 13:36:40.128
!MESSAGE Could not publish to the server.
!STACK 0
java.lang.IndexOutOfBoundsException
    at java.io.BufferedInputStream.read(BufferedInputStream.java:338)
    at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(Util.java:498)
    at org.eclipse.jdt.core.ToolFactory.createDefaultClassFileReader(ToolFactory.java:269)
    at org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities.isEJBArchive(JavaEEArchiveUtilities.java:900)
    at org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities.refineForJavaEE(JavaEEArchiveUtilities.java:606)
    at org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities.openArchive(JavaEEArchiveUtilities.java:370)
    at org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities.openBinaryArchive(JavaEEArchiveUtilities.java:290)
    at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper$ArchiveCache.openArchive(JavaEEBinaryComponentHelper.java:612)
    at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper.openArchive(JavaEEBinaryComponentHelper.java:470)
    at org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper.getUniqueArchive(JavaEEBinaryComponentHelper.java:422)
    at …
Run Code Online (Sandbox Code Playgroud)

eclipse maven tomcat7

20
推荐指数
1
解决办法
4万
查看次数

标签 统计

eclipse ×1

maven ×1

tomcat7 ×1