3 Replies Latest reply on Nov 18, 2008 6:46 PM by matt.nirgue

    Cannot inject Render in tests

    blabno

      I've managed to lunch seamTest on Netbeans6.1 with JUnit4.
      I'm getting following exception :


      Caused by: org.jboss.seam.RequiredException: 
      @In attribute requires non-null value: registrar.renderer



      I'm trying to render mail in tested method. Is Render absent in test environment ?

        • 1. Re: Cannot inject Render in tests
          matt.nirgue

          Hi,


          I'm having the same problem so if you've found a way to resolve this since your post, would you please let me know?


          Thanks in advance


          Matt

          • 2. Re: Cannot inject Render in tests
            alain94040

            Same problem here:


               [testng] Caused by: javax.ejb.EJBException: org.jboss.seam.RequiredException: @In attribute requires non-null value: myTest.renderer


            In another thread on that forum, someone suggested to add the jboss-seam-ui or facelet jars. When I try that, it's worse, it doesn't even start my app:


               [testng] Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/seam/mock/SeamTest
               [testng]      at java.lang.ClassLoader.defineClass1(Native Method)
               [testng]      at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
               [testng]      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

            • 3. Re: Cannot inject Render in tests
              matt.nirgue

              Hi Alain,


              I added both dependencies and it works just fine now... I even removed the jboss-seam-ui dependency and it still works... I don't know why you got this error when adding those jars... it may be a classpath error or something like that.


              Thanks for helping me out... I'm kinda sorry it doesn't work for you though :/