7 Replies Latest reply on Jul 17, 2006 11:24 AM by bfo81

    Clean Seam installation - but errors, errors, errors...

    bfo81

      Well, I tried running some Seam examples. I proceeded like suggested in the getting started section (http://labs.jboss.com/portal/jbossseam/gettingstarted/index.html). But it didn't work out that easy, cause I'm running from one error into the other.

      After installing JBoss 4.0.4 AS via the JEMS installer (jems-installer-1.2.0-BETA.jar) with EJB3 profile I deployed some of the Seam 1.0.1 (fetched via CVS) examples (namely booking and blog - each one individually). But after starting the AS I get an exception and deployment fails:

      java.lang.NoClassDefFoundError: Lorg/jboss/ejb3/embedded/EJB3StandaloneDeployer;


      So I put jboss-ejb3-all.jar (8.019 KBytes for comparison) from EJB3.0 RC8 into $JBOSS_HOME/server/default/lib (as recommended here by Gavin: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=85604). Well, now there's a new very nice exception:

      java.lang.NoSuchMethodError: org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getValidateOnMatch()Z


      This one occurs 18 times in the logfile. And I found no solution for that, so I decided to ignore it for now.

      However, another Exception told me there's no embedded-jboss-beans.xml. So I copied it from the Seam directory embedded-ejb/conf to $JBOSS_HOME/server/default/conf. After restarting the AS there's a new Exception:

      java.lang.RuntimeException: org.jboss.xb.binding.JBossXBException: Failed to parse source file: file:/C:/Programme/jboss-4.0.4.GA/server/default/conf/embedded-jboss-beans.xml@5,45
      ...
      Caused by java.lang.NullPointerException
      at org.jboss.kernel.plugins.deployment.xml.BeanSchemaBinding.configureValueBindings(BeanSchemaBinding.java:1158)


      Well, the embedded-jboss-beans.xml looks like this (where *** shows 5,45, the position where the error occured)

      <?xml version="1.0" encoding="UTF-8"?>
      
       <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
       xmlns="urn:jboss:bean-deployer">***
       <bean name="Naming" class="org.jnp.server.SingletonNamingServer"/>
      
      ...


      And this is where I'm stuck.

      Well, maybe I overlooked something in my procedure, and I must confess I'm not a JBoss AS expert... but I think this shouldn't be necessary just to get some Seam examples to work.

      Maybe someone could tell me what's wrong.

        • 1. Re: Clean Seam installation - but errors, errors, errors...
          bfo81

          PS: The Seam Hibernate demo works great. So EJB3 is the scapegoat.

          • 2. Re: Clean Seam installation - but errors, errors, errors...
            pmuir

            Perhaps you should try the 1.0.1.GA release of Seam? (http://labs.jboss.com/portal/jbossseam/download/index.html). I think no garuntees are made about CVS head being runnable.

            • 3. Re: Clean Seam installation - but errors, errors, errors...
              bfo81

              I adopted your proposal. And... it works, so thank you very much for the hint.

              But, when deploying an example and starting the AS now I still get tons of those "java.lang.NoSuchMethodError: org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.get
              ValidateOnMatch()Z" exceptions. It's really scaring when looking at the console and seeing those "at...." stacktraces flying by.


              Btw: It's a pity that the ZIP-File doesn't contain a complete Eclipse project. So I had to import the whole stuff via "... from existing ant file" and it's not quite the same like in the CVS version. But it's okay, I can live with that ;).

              • 4. Re: Clean Seam installation - but errors, errors, errors...
                jacxia81

                Actually, it's still a problem of jar version between those shipped by Seam and by Jboss. Jboss comes with an old version of LocalManagedConnectionFactory in its jboss-common-jdbc-wrapper.jar (C:\Program Files\jboss-4.0.4.GA\server\default\lib). You can delete it and use instead the jboss-ejb3-all.jar shipped by Seam to resolve the problem. (You can't resolve the problem by simply copying the new jar into the directory since the jboss-common-jdbc-wrapper.jar is before jboss-ejb3-all.jar in the classpath)

                • 5. Re: Clean Seam installation - but errors, errors, errors...
                  bfo81

                  Well, life can be so easy. All occurences of "NoSuchMethodError ... getValidateOnMatch()z" are gone. Thanks a lot for that advice :).

                  • 6. Re: Clean Seam installation - but errors, errors, errors...
                    bfo81

                    LOL :D. There's even more that's better now.

                    I had a simple CRUD prototype for some entities. Creating worked well, but updating and deleting just didn't. The entity to edit had the right Id after showing it on the editor page. But as soon as I trigged a JSF action (save or delete) the Id became null. I don't know why this happened, but whatever... everything works fine now :).

                    • 7. Re: Clean Seam installation - but errors, errors, errors...
                      bfo81

                      Now I tried to run my app WITH jboss-common-jdbc-wrapper.jar and WITHOUT jboss-ejb3-all.jar. This works, too. So it looks like those two just hate each other ;).

                      I had added the jboss-ejb3-all.jar due to an exception (see above) that I had with the CVS version of Seam. But as I switched to "normal" Seam now this exception doesn't emerge anymore, so there seems to be no need for this JAR (in opposition to what Gavin said in the thread I mentioned in my first post).