[jboss-jira] [JBoss JIRA] (WFLY-4868) Wildfly 9 final doesn't support REST Endpoints directly in WAR

John Ament (JIRA) issues at jboss.org
Fri Jul 3 17:11:02 EDT 2015


    [ https://issues.jboss.org/browse/WFLY-4868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086395#comment-13086395 ] 

John Ament commented on WFLY-4868:
----------------------------------

I've been able to create a test case that reproduces the issue.  There are three tests in there.  https://github.com/johnament/wf-rest

1. DirectWarTest - this is the positive, always working test case.
2. JarInWarTest - this was supposed to be what demonstrated the issue.  It doesn't, it works fine as well.
3. FromFileTest - this guy is the culprit.  This reproduces the issue quite nicely.  The war file checked in as compiled WAR w/ a jandex index representing the cached annotations.  It looks like when you're using jandex, if you have an index in your archive it skips scanning (which is nice).  However, when using an arquillian test this doesn't work since the extra components won't have jandex entries.  By putting them into a separate JAR, it fixes it because the jandex is on the archive level.

So now, lowering the severity, is there an alternate work around? Like is there a flag I can use to disable jandex when running via arquillian?

> Wildfly 9 final doesn't support REST Endpoints directly in WAR
> --------------------------------------------------------------
>
>                 Key: WFLY-4868
>                 URL: https://issues.jboss.org/browse/WFLY-4868
>             Project: WildFly
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 9.0.0.Final
>            Reporter: John Ament
>            Assignee: Stuart Douglas
>            Priority: Critical
>
> I've been testing Wildfly 9 since CR1.  In our test suite, we leverage an arquillian build that takes our build's WAR, and adds some extra classes directly.  Some of these classes are rest APIs.  I found that after upgrading this branch between CR2 and Final, the REST endpoints placed directly in the WAR file do not function.  Most of my REST endpoints go into JARs which go into the WAR, those all work fine.
> I'll see if I can create a very simple test case that reproduces this issue.
> The error output is generally along the lines of 
> {code}
> 11:35:35,658 WARN  [com.mycompany.ExceptionConverters] (default task-14) Returning an exception back to the client on failure, : javax.ws.rs.NotFoundException: Could not find resource for full path: http://127.0.0.1:8082/rest/i-test-status
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list