Bug 961295 - Seam 2.3 org.jboss.seam.mock.MockServletContext IllegalArgumentException: URI scheme is not "file" when used incontainer on EAP 6.1
Seam 2.3 org.jboss.seam.mock.MockServletContext IllegalArgumentException: URI...
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: Seam (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ER1
: 2.3.0
Assigned To: Marek Novotny
Marek Schmidt
Depends On:
  Show dependency treegraph
Reported: 2013-05-09 07:19 EDT by Marek Schmidt
Modified: 2013-07-16 07:10 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
EAP 6.1.0.ER6
Last Closed: 2013-07-16 07:10:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marek Schmidt 2013-05-09 07:19:19 EDT
Description of problem:

Seam MockServletContext used incontainer from an arquillian test is broken on EAP6.1. This breaks restbay and tasks examples integration tests.

java.lang.IllegalArgumentException: URI scheme is not "file"
        at java.io.File.<init>(File.java:395)
        at org.jboss.seam.mock.MockServletContext.<init>(MockServletContext.java:69)
        at org.jboss.seam.mock.EnhancedMockHttpServletRequest.<init>(EnhancedMockHttpServletRequest.java:245)
        at org.jboss.seam.mock.EnhancedMockHttpServletRequest.<init>(EnhancedMockHttpServletRequest.java:202)
        at org.jboss.seam.mock.ResourceRequestEnvironment$ResourceRequest.createRequest(ResourceRequestEnvironment.java:209)
        at org.jboss.seam.mock.ResourceRequestEnvironment$ResourceRequest.init(ResourceRequestEnvironment.java:173)
        at org.jboss.seam.mock.ResourceRequestEnvironment$ResourceRequest.run(ResourceRequestEnvironment.java:158)
        at org.jboss.seam.example.restbay.test.AuctionServiceTest.testAuctions(AuctionServiceTest.java:97)

The code in MockServletContext wrongly assumes the getClass().getResource(foo).toURI() will be a file: URI. 

Version-Release number of selected component (if applicable):
WFK 2.2.0

Steps to Reproduce:
1. run restbay integration tests on EAP6.1   (e.g. mvn clean verify -Darquillian=jbossas-remote-7 )
2. notice the failure and the exception
Comment 1 Marek Novotny 2013-05-09 07:44:51 EDT
just curious what is that failing resource? That code is trying to find out web app root.
Comment 2 Marek Schmidt 2013-05-09 08:22:32 EDT
yes, I believe that never really worked. e.g. on EAP 6.0.1 the web app root it finds is 


which is not very helpful anyway.
Comment 3 Marek Novotny 2013-06-03 09:47:37 EDT
fixed by https://source.jboss.org/changelog/Seam?cs=15522
Comment 5 Tomas Remes 2013-06-12 04:36:46 EDT
Verified on 2.3.0.ER1 release.

Note You need to log in before you can comment on or make changes to this bug.