Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350388

Summary: [xtext.mwe2] misleading IAE for missing or not (yet) existing classpath entries
Product: [Modeling] TMF Reporter: Michael Clay <clay>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: dennis.huebner
Version: 2.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Michael Clay CLA 2011-06-26 14:40:55 EDT
running the default (wizard) created GenerateMyDsl.mwe2 for a project with non existing classpath folders
yields a misleading respectively not necessary illegal argument exception:

steps to reproduce:

1. disable automatic builds (i.e. defers the actual classpath folder creation to the first project build)
2. create a new xtext project
3. run the default workflow file

1    [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Unsupported path : /Users/mclay/workspace/runtime-EclipseApplication/org.xtext.example.mydsl/bin (only folders and archives are supported).
java.lang.IllegalArgumentException: Unsupported path : /Users/mclay/workspace/runtime-EclipseApplication/org.xtext.example.mydsl/bin (only folders and archives are supported).
	at org.eclipse.xtext.mwe.PathTraverser.findAllResourceUris(PathTraverser.java:46)
	at org.eclipse.xtext.mwe.PathTraverser.resolvePathes(PathTraverser.java:33)
	at org.eclipse.xtext.mwe.RuntimeResourceSetInitializer.getPathToUriMap(RuntimeResourceSetInitializer.java:54)
	at org.eclipse.xtext.mwe.RuntimeResourceSetInitializer.getInitializedResourceSet(RuntimeResourceSetInitializer.java:72)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.findModule(Mwe2Runner.java:112)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:77)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:64)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:55)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)


i suggest to filter non existing java.classpath entry urls to avoid misleading IAE's mentioned above.
Comment 1 Dennis Huebner CLA 2012-03-07 08:17:38 EST
Good idea...
Comment 2 Sven Efftinge CLA 2012-11-21 08:58:34 EST
Throwing an exception for a non existent classpath entry seems reasonable to me. Also I don't see why the message is missleading.