Bug 105581 - Creating a Java project from existing source fails because of "Unhandled event loop exception": ArrayIndexOutOfBoundsException
Summary: Creating a Java project from existing source fails because of "Unhandled even...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-29 11:58 EDT by Martin Burger CLA
Modified: 2005-09-20 13:21 EDT (History)
0 users

See Also:


Attachments
Log file mentioned in comment 1. (11.18 KB, text/plain)
2005-07-29 12:01 EDT, Martin Burger CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Burger CLA 2005-07-29 11:58:55 EDT
Hello,

I tried to create a Java project from existing source but that fails because of:

!ENTRY org.eclipse.ui 4 4 2005-07-29 17:53:12.656
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2005-07-29 17:53:12.656
!MESSAGE Failed to execute runnable (java.lang.ArrayIndexOutOfBoundsException: 0)
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable
(java.lang.ArrayIndexOutOfBoundsException: 0)
[...]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
[...]

!ENTRY org.eclipse.ui 4 4 2005-07-29 17:53:18.234
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2005-07-29 17:53:18.250
!MESSAGE 0
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 0
[...]

I will create an attachment with comple log message.

Regards,
  Martin
Comment 1 Martin Burger CLA 2005-07-29 12:01:06 EDT
Created attachment 25468 [details]
Log file mentioned in comment 1.

The complete trace taken from {workspace}\.metadata\.log
Comment 2 Martin Burger CLA 2005-07-29 12:11:51 EDT
That's because of the follwing entry in the .classpath file:

  <classpathentry excluding=""
including="plugin.jelly|plugin.properties|project.properties|project.xml|"
kind="src" path=".">
  </classpathentry>

If I remove that entry, I can open the project.

I think the last '|' is the problem. If I remove only that character, the error
does not occur. The .classpath file is generated by "maven eclipse"
(http://maven.apache.org/reference/plugins/eclipse/).

With Eclipse 3.0.x that was not a problem.
Comment 3 Martin Burger CLA 2005-07-29 12:36:37 EDT
I created an issue in project maven-eclipse-plugin:
http://jira.codehaus.org/browse/MPECLIPSE-96

But Eclipse 3.0.1 ignored that pipe character, so perhaps Eclipse 3.1 should
ignore it, too:

.classpath files working with earlier versions of Eclipse should work because of
backward compatibility, shouldn't?
Comment 4 Jerome Lanneluc CLA 2005-08-26 09:59:43 EDT
Changed ClasspathEntry#decodePatterns(...) to ignore empty patterns.
Added regression test ClasspathTests#testEmptyInclusionPattern*()
Comment 5 Olivier Thomann CLA 2005-09-20 13:21:04 EDT
Verified in I20050920-0010 for 3.2M2