4 Replies Latest reply on Jan 7, 2004 10:35 AM by Juha Lindfors

    Hibernate Hell

    kellyschrock Newbie

      Hello,

      Up until very recently, I've done all of my JBoss and Hibernate development on Windows. I'm now using RedHat9 to do basically the same thing. Actually, I should say I WOULD do it, if I could get anything to work. I am attempting to use Hibernate from within a Session bean, which has worked fine before. Per the Hibernate instructions, I have copied the requisite .jar files into $JBOSS_HOME/lib. (This worked on Windows, whereas $JBOSS_HOME/server/default/lib did NOT work. On Linux, putting the .jar files into $JBOSS_HOME/server/default/lib causes JBoss's JVM to crash completely at the point where I try to open a Session.)

      So, now I have hibernate2.jar in the classpath, but no matter what I do, I get this error when I try to open a Session:

      java.lang.NoClassDefFoundError: net/sf/hibernate/collection/Set
      at net.sf.hibernate.type.TypeFactory.set(TypeFactory.java:184)
      at net.sf.hibernate.mapping.Set.getType(Set.java:29)
      at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:856)

      I have tried putting the hibernate jar file into my EJB's jar file, but I still get either this error or a "linker constraints violated" error when trying to open a Session. This actually makes sense if the same jar file is being loaded twice.

      I only have one version of Hibernate's jar files on this machine. Has anyone ever actually used JBoss, Linux, and Hibernate together? If so, what pagan god do I need to sacrifice a virgin to in order to experience that particular joy for myself??? It seems like I'm having to do a hell of a lot of work just to see anything useful.