6 Replies Latest reply on Dec 28, 2005 7:50 PM by gavin.king

    Running noejb tests w/o JBoss?

    robjellinghaus

      So I got SEAM from CVS (the jboss-seam module; Gavin said he uses jboss-seam-head but I'm assuming there's no meaningful difference). I built it and ran the noejb example under Tomcat absolutely the very first time I tried it. Woohoo! Nice one, Gavin et al.!

      Now I'm trying to run the TestNG tests. And I get this:

      C:\robj\dev\seam\jboss-seam\examples\noejb>ant testexample
      Buildfile: build.xml
      
      init:
       [echo] Build Seam on JBoss Hibernate3 Example 1.0
      
      compile:
      
      testexample:
       [copy] Copying 67 files to C:\robj\dev\seam\jboss-seam\examples\noejb\build\test
      
      BUILD FAILED
      C:\robj\dev\seam\jboss-seam\build.xml:176: No sourceDir is specified.
      
      Total time: 0 seconds
      C:\robj\dev\seam\jboss-seam\examples\noejb>ant -f build.tomcat.xml testexample
      Buildfile: build.tomcat.xml
      
      init:
       [echo] Build Seam on Tomcat Hibernate3 Example 1.0
      
      compile:
      
      testexample:
      
      BUILD FAILED
      C:\robj\dev\seam\jboss-seam\build.xml:171: Reference example.resources not found.
      
      Total time: 1 second


      So clearly it doesn't really want to work. Should I bother trying to fix these build problems? Or should I not expect the testng tests to work without JBoss? If it's a small amount of work I'll do it, but if it's not, I won't.

      Thanks!
      Cheers,
      Rob

        • 1. Re: Running noejb tests w/o JBoss?
          gavin.king

          It should Just Work. Works fine for me. Try updating your CVS snapshot.


          No, JBoss AS is not used by the unit tests.

          • 2. Re: Running noejb tests w/o JBoss?
            robjellinghaus

            Looks like it was a stale Ant version -- 1.6.0 apparently doesn't recognize the existence of Java 1.5 :-)

            But then I get this:

            [testng] FAILED: org.jboss.seam.test.PhaseListenerTest.testSeamPhaseListenerNewLongRunning()
             [testng] java.lang.NullPointerException
             [testng] at org.jboss.seam.core.Manager.touchConversationStack(Manager.java:118)

            That line is:
            if ( isLongRunningConversation() )
             {
             getCurrentConversationEntry().touch(); // Manager.java:118 NPE
             }

            So why would getCurrentConversationEntry() be null there? And what's bad in my environment? I'm just doing "ant test" in the root jboss-seam directory....

            Will dig a bit more.
            Cheers,
            Rob

            • 3. Re: Running noejb tests w/o JBoss?
              gavin.king

              Ignore that failure, I refactored stuff over the last few days and did not yet fix that unit test. It's just a bug in my mock objects.

              • 4. Re: Running noejb tests w/o JBoss?
                gavin.king

                By the way, to run the example test, you need to type:

                ant testexample


                NOT ant test!

                • 5. Re: Running noejb tests w/o JBoss?
                  robjellinghaus

                  Yes, I know, I was just trying the toplevel tests as a sanity check (to avoid any issues of the multiple build.xml files). examples / noejb / "ant testexample" works great now :-)

                  I must say it's a pleasure being back on a forum that's got a timely Gavin on it! I was on the Hibernate forums in early 2004 and got a bunch of great responses from you. But then the newbies arrived in force. Here's hoping SEAM doesn't get that popular in the next two months :-)

                  Cheers!
                  Rob

                  • 6. Re: Running noejb tests w/o JBoss?
                    gavin.king

                    An unfortunate thing about user forums is that once the traffic reaches a certain point, it is impossible to really keep up, and the only people who are really able to get attention are the obnoxious ones.

                    Plus, the early adopters tend to be the more patient and considerate, and more able and willing to help solve their own problems.

                    Of course, it also helps that developers tend to be more patient with questions they have not seen 1000 times before, and with suggestions when the tech is still experimental and we havn't fully explored all the options.

                    I really missed the early days of Hibernate, which were truly great fun, and I'm really enjoying the small community we are growing here.

                    The paradox is that we certainly *do* want to see this community grow quickly, even though we will probably bitch and moan when it does ;)