Uploaded image for project: 'JSFUnit'
  1. JSFUnit
  2. JSFUNIT-298

Vague error message when improperly annotating Arquillian test cases.

    Details

      Description

      This message could be a little more descriptive, like explaining that this is caused by the use of @JSFUnitResource on field or method parameter annotations.

      java.lang.RuntimeException: Could not inject members
         at org.jboss.jsfunit.arquillian.container.JSFUnitTestEnricher.enrich(JSFUnitTestEnricher.java:62)
         at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
         at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
         at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
         at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
         at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
         at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
         at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
         at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
         at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
         at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
         at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
         at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:95)
         at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:222)
         at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
         at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
         at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)
         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
         at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
         at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)
         at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
         at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
         at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
         at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
         at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
         at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
         at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
         at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65)
         at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:160)
         at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126)
         at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
         at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
         at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
         at org.jboss.jsfunit.arquillian.container.JSFUnitCleanupTestTreadFilter.doFilter(JSFUnitCleanupTestTreadFilter.java:51)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
         at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
         at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
         at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897)
         at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626)
         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2033)
         at java.lang.Thread.run(Thread.java:680)
      Caused by: java.lang.IllegalArgumentException: @InitialPage required for injection.  Specify at class level for field injection or at method level for method injection.
         at org.jboss.jsfunit.arquillian.container.JSFUnitSessionFactory.createWebClientSpec(JSFUnitSessionFactory.java:126)
         at org.jboss.jsfunit.arquillian.container.JSFUnitSessionFactory.createJSFSession(JSFUnitSessionFactory.java:107)
         at org.jboss.jsfunit.arquillian.container.JSFUnitSessionFactory.findJSFSession(JSFUnitSessionFactory.java:92)
         at org.jboss.jsfunit.arquillian.container.JSFUnitTestEnricher.enrich(JSFUnitTestEnricher.java:52)
         ... 80 more

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                spinner José Freitas
                Reporter:
                lincolnthree Lincoln Baxter III
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: