Community
Participate
Working Groups
Created attachment 217981 [details] Stacktrace Forum reference: http://www.eclipse.org/forums/index.php/t/366491/ A RAP application deployed onto a JBoss AS 5.1.2 throws "java.lang.IllegalArgumentException: URI is not hierarchical" when a resource (javascript, images) is requested. The application server ships with a custom file protocol url handler which essentially does this: file = new File(url.toURI()); I tracked the problem down to org.eclipse.rap.rwt.osgi.internal.HttpContextWrapper#getResource(String) which seems to generate a wrong resource URL, e.g file:C:/path/to/resource/favicon.png instead of file:/C:/path/to/resource/favicon.png. This applies to RAP 1.4.2 as well as 1.5 RC3. Steps to reproduce: 1. Get jboss-common-core-2.2.18.GA [1] and jboss-logging-spi-2.1.0.GA [2] 2. Add these jars to the boot classpath 3. Add -Djava.protocol.handler.pkgs=org.jboss.net.protocol to the VM arguments 4. Start the application [1] https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.jboss~jboss-common-core~2.2.18.GA~jar~ [2] https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.jboss.logging~jboss-logging-spi~2.1.0.GA~jar~
Created attachment 217982 [details] Patch for RAP 1.5
Created attachment 217983 [details] Patch for RAP 1.4.2
Thanks for the patch! Applied with commit ddfea42762da5099c176477f05aba6ea156cb8bc, together with an improved test. I couldn't come up with a test that fails on Unix, but at least the test fails on Windows now. I think this fix should be backported to 1.5.
The fix looks good to me too. +1 to be backported to 1.5.
Applied to 1.5 maintenance branch with commit 910538a0955bc26a00e4fe8c60c410dca4b1338a.