0 Replies Latest reply on Oct 6, 2008 2:39 AM by geckopower

    jboss 5 integration with hibernate in web app

    geckopower

      hi,

      got my jboss set up with oracle datasource, that is properly configured and working. i know so because if i do straight up jdbc, i can retrieve data
      from the database.

      now trying to do the persistence layer with hibernate. not going so well.
      nothing fancy. not an ejb app, just jsf calling some hibernate stuff using jndi to lookup the SessionFactory object.

      can someone point me to some documentation for this?
      heres the components of my application
      jboss 5,hibernate 3,jsf only war (no ejbs or ear).


      ic = new InitialContext();
      org.hibernate.SessionFactory sf = (org.hibernate.SessionFactory)
      ic.lookup("java:/comp/env/hibernate/HibernateFactory");


      gives the following:
      Exception thrown javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: hibernate not bound]