3 Replies Latest reply on Nov 30, 2007 6:06 AM by pmuir

    No converter for type: org.jboss.seam.core.Expressions$Value

    laksu

      Still cannot run the dumbest test on my own.

      Here is my test:

      import org.jboss.seam.mock.SeamTest;
      import org.testng.annotations.Test;
      
      public class TestIntact extends SeamTest {
       @Test
       public void testIntact(){
       assert true;
       }
      }
      


      I use Java 1.5.0 14 JDK (32) and Seam 2.0.0 GA.
      I have the Hibernate2 example running and I have everything same from it except my own ant script. I even checked with ant -v that classpaths end up the same.

      Here is what I get:

      [testng] FAILED CONFIGURATION: @BeforeClass init
       [testng] java.lang.RuntimeException: Could not create Component: org.jboss.seam.transaction.transaction
       [testng] at org.jboss.seam.init.Initialization.addComponent(Initialization.java:976)
       [testng] at org.jboss.seam.init.Initialization.installComponents(Initialization.java:903)
       [testng] at org.jboss.seam.init.Initialization.init(Initialization.java:548)
       [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:939)
       [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
       [testng] Caused by: java.lang.IllegalArgumentException: No converter for type: org.jboss.seam.core.Expressions$ValueExpression
       [testng] at org.jboss.seam.util.Conversions.getConverter(Conversions.java:55)
       [testng] at org.jboss.seam.Component$ConstantInitialValue.<init>(Component.java:2302)
       [testng] at org.jboss.seam.Component.getInitialValue(Component.java:514)
       [testng] at org.jboss.seam.Component.getTopInitialValue(Component.java:494)
       [testng] at org.jboss.seam.Component.initInitializers(Component.java:472)
       [testng] at org.jboss.seam.Component.<init>(Component.java:263)
       [testng] at org.jboss.seam.Component.<init>(Component.java:216)
       [testng] at org.jboss.seam.init.Initialization.addComponent(Initialization.java:961)
       [testng] ... 26 more
       [testng] ... Removed 22 stack frames
       [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
       [testng] SKIPPED CONFIGURATION: @AfterMethod end
       [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
       [testng] SKIPPED: testIntact
      


      I cannot figure out what I am missing


        • 1. Re: No converter for type: org.jboss.seam.core.Expressions$V
          pmuir

          seam-gen and JBoss Tools both set up the test environment properly for you. I suggest trying one of these.

          • 2. Re: No converter for type: org.jboss.seam.core.Expressions$V
            laksu

            I had not touched to seam-gen for a long time and gave it another spin. It seems like it has improvements as generated projects are more firendly to Netbeans.
            I have a project started as a NetBeans Enterprise application and it has a complex set of build.xml files generated and maintained by Netbeans. My plan was patching it up with a test target.
            I see that seam-gen's organization of files in a project is different. At this point I am willing to convert the whole thing into something standard (in relation with Seam) as I have gone through too many issues for months with %90 related with configuration and I spent a really annoying time on trying to keep the things run in concert rather than writing my application itself.
            So in this case my question becomes if I start with a seam-gen generated template project, could I convert it to an app that is
            1) POJO based rather than EJB
            2) Uses Hibernate for the persistence rather than JPA
            3) deployable to Glassfish

            Or should I perhaps wait the GA version of RHDS and convert from Netbeans which would be somewhat challenging as I have no experience with Eclipse.

            Would be great to hear your opinions
            Best regards

            • 3. Re: No converter for type: org.jboss.seam.core.Expressions$V
              pmuir

              1) Yes, ootb seam-gen and generate-entities doesn't use EJB3s - only things like new-action do
              2) Yes, a bit more work, but just remove all jpa annotations, remove persistence.xml, add hibernate.cfg.xml and .hbm.xml
              3) Again, more work, but use the jee5 example as ref point to get the right config files/libs

              We are working on app server guides for Seam, and glassfish is at the top of the list.