1 Reply Latest reply on Apr 20, 2007 10:57 AM by maxandersen

    Hibernate Tools and datasource in hibernate.cfg.xml

      Hello all,

      i tried to use jbosside with an existing tomcat webproject based on jsf and hibernate. Unfortunatly i get an "org.hibernate.HibernateException: Could not find datasource".

      My hibernate.cfg.xml looks like

      <hibernate-configuration>
       <session-factory>
       <property name="dialect">
       org.hibernate.dialect.MySQLDialect
       </property>
       <property name="connection.datasource">
       java:comp/env/jdbc/mangos
       </property>
       <mapping />
       </session-factory>
      </hibernate-configuration>


      The datasource is configured in META-INF/context.xml.

      How must i setup the project that this is working. With Myeclipse IDE it was no problem.

      Regards Oliver

        • 1. Re: Hibernate Tools and datasource in hibernate.cfg.xml
          maxandersen

          no because in myeclipse you pointed to their DTP database connection, right ?

          for b9 you need to use a different cfg.xml since it is not possible to use jboss local datasources from within eclipse.

          In nightly build (and possibly alson in b9 but i havent tested) you can specify a hibernate.properties or any other properteis file and specify normal connection properties to override what is in your Appserver specfic setup.