3 Replies Latest reply on Dec 18, 2007 11:32 AM by pmuir

    2.0.1.CR1 - Testing w/o Hibernate

    holmes.j

      Hi,

      I just upgraded to 2.0.1.CR1 from the 2.0.0.GA release. I'm having a problem with running tests in Seam.

      We're not using hibernate at all in this portion of our web-app, it's all done via webservices. So there is no need for me to include the hibernate jars.

      However, upon startup of the container with SeamTest I'm getting errors when Seam attempts to load the HibernateEntityLoader. It throws java.lang.NoClassDefFoundError: org/hibernate/Session

      How do I exclude Components from being loaded at startup?

      I don't see this error during my jboss deploy because I have hibernate already on the classpath for other ears.

      Any answers?

      Thanks,
      Jason

        • 1. Re: 2.0.1.CR1 - Testing w/o Hibernate
          holmes.j

          If anybody else has this issue, just ensure you have this class in your classpath...

          import org.jboss.seam.ScopeType;
          import org.jboss.seam.annotations.Install;
          import org.jboss.seam.annotations.Name;
          import org.jboss.seam.annotations.Scope;
          
          /**
           * At the moment the folks at JBoss decided that Hibernate should be required
           * on the classpath.
           *
           * This fixes that
           *
           * @author Jason Holmes
           *
           */
          @Deprecated
          @Name("org.jboss.seam.ui.hibernateEntityLoader")
          @Install(precedence = Install.MOCK)
          @Scope(ScopeType.STATELESS)
          public class HibernateEntityLoader {
          }
          


          • 2. Re: 2.0.1.CR1 - Testing w/o Hibernate
            jbalunas

            My first question would be what container are you attempting deploy to?

            Some app servers (OC4J especially) have a very eager classloader that will attempt to load all classes (and imports) whether or not the classes are used.

            Thanks,
            Jay

            • 3. Re: 2.0.1.CR1 - Testing w/o Hibernate
              pmuir

              oops, my bad, fixed in cvs.