Announcement Announcement Module
Collapse
No announcement yet.
Newbee - Spring/Hibernate Tomcat/MySQL issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbee - Spring/Hibernate Tomcat/MySQL issue

    Hello ALL,

    This is my first attempt to use Spring and Hiubernate. I have spent several weekends trying to get my first app working without any luck. My DAOImpl class always gets a null pointer exception when accessing the getHibernateTemplate() method. At runtime I get the following exception:

    UsertableDAOHibernateImpl::getUser - id = eusdart
    UsertableDAOHibernateImpl::getSessionFactory = null
    UsertableDAOHibernateImpl::getUser - HibernateTemplate = null
    UsertableDAOHibernateImpl::EXCEPTION = null

    I don't think the applicationContext is injecting anthing into my DAO impl class causing the NPTR but what I don't understand is WHY its not injecting correctly??? Can someone please help?


    Below is the class file/appcontext.xml/ web.xml files:
    *** Class file ***


    package cms.table.dao.hibernate;

    import java.util.List;

    import org.springframework.orm.hibernate.support.Hibernat eDaoSupport;

    import cms.table.model.Usertable;

    public class UsertableDAOHibernateImpl extends HibernateDaoSupport
    implements cms.table.dao.interfaces.Usertable {


    public List getUserList() {
    return getHibernateTemplate().find("from Usertable");
    }
    /* (non-Javadoc)
    * @see cms.table.dao.interfaces.Usertable#getTask(java.la ng.Integer)
    */
    public Usertable getUser(String id) {
    System.out.println("UsertableDAOHibernateImpl::get SessionFactory = " + getSessionFactory() );
    System.out.println("UsertableDAOHibernateImpl::get User - HibernateTemplate = " + getHibernateTemplate() );
    return (Usertable) getHibernateTemplate().get(Usertable.class, id);

    }
    /* (non-Javadoc)
    * @see cms.table.dao.interfaces.Usertable#saveTask(cms.ta ble.dao.interfaces.Usertable)
    */
    public void saveUser(Usertable user) {
    getHibernateTemplate().saveOrUpdate(user);
    }

    /* (non-Javadoc)
    * @see cms.table.dao.interfaces.Usertable#removeTask(cms. table.dao.interfaces.Usertable)
    */
    public void removeUser(Usertable user) {
    getHibernateTemplate().delete(user);

    }

    }

    *** ApplicationContext.xml ***
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

    <!--
    - Application context definition for Petclinic on Hibernate.
    -->
    <beans>

    <!-- ========================= GENERAL DEFINITIONS ========================= -->

    <!-- Configurer that replaces ${...} placeholders with values from a properties file -->
    <!-- (in this case, JDBC-related settings for the dataSource definition below) -->
    <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
    <property name="location"><value>/WEB-INF/jdbc.properties</value></property>
    </bean>

    <!-- Message source for this context, loaded from localized "messages_xx" files -->
    <bean id="messageSource" class="org.springframework.context.support.Resourc eBundleMessageSource">
    <property name="basename"><value>messages</value></property>
    </bean>


    <!-- ========================= RESOURCE DEFINITIONS ========================= -->

    <!-- Local DataSource that works in any environment -->
    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
    <property name="driverClassName"><value>${jdbc.driverClassNa me}</value></property>
    <property name="url"><value>${jdbc.url}</value></property>
    <property name="username"><value>${jdbc.username}</value></property>
    <property name="password"><value>${jdbc.password}</value></property>
    </bean>

    <!-- JNDI DataSource for J2EE environments -->
    <!--
    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName"><value>java:comp/env/jdbc/petclinic</value></property>
    </bean>
    -->

    <!-- Hibernate SessionFactory -->
    <bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSess ionFactoryBean">
    <property name="dataSource"><ref local="dataSource"/></property>
    <property name="mappingResources">
    <value>changelog.hbm.xml</value>
    </property>
    <property name="hibernateProperties">
    <props>
    <prop key="hibernate.dialect">${hibernate.dialect}</prop>
    </props>
    </property>
    </bean>

    <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
    <bean id="transactionManager" class="org.springframework.orm.hibernate.Hibernate TransactionManager">
    <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>

    <!-- Transaction manager that delegates to JTA (for a transactional JNDI DataSource) -->
    <!--
    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager"/>
    -->


    <!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->

    <!--
    - A parent bean definition which is a base definition for transaction proxies.
    - It is markes as abstract, since it is never supposed to be instantiated itself.
    - We set shared transaction attributes here, following our naming patterns.
    - The attributes can still be overridden in child bean definitions.
    -->
    <bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean"
    abstract="true">
    <property name="transactionManager"><ref bean="transactionManager"/></property>
    <property name="transactionAttributes">
    <props>
    <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
    <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
    <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
    <prop key="store*">PROPAGATION_REQUIRED</prop>
    </props>
    </property>
    </bean>

    <!--
    - Petclinic primary business object: Hibernate implementation, as an inner bean
    - wrapped by an outer transactional proxy. The two bean definitions could have been
    - separate, but this is cleaner as ther is no need to ever access the unwrapped object.
    -->
    <bean id="usertable" parent="baseTransactionProxy">
    <property name="target">
    <bean class="cms.table.dao.hibernate.UsertableDAOHiberna teImpl">
    <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
    </property>
    </bean>

    </beans>

    ** web.xml **

    <?xml version="1.0"?>
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>

    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>

    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <!--
    - Key of the system property that should specify the root directory of this
    - web app. Applied by WebAppRootListener or Log4jConfigListener.
    -->
    <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>CMS.root</param-value>
    </context-param>
    <!--
    - Location of the XML file that defines the root application context.
    - Applied by ContextLoaderServlet.
    -
    - Can be set to "/WEB-INF/applicationContext-hibernate.xml" for the Hibernate
    - implementation, "/WEB-INF/applicationContext-ojb.xml" for the Apache OJB one,
    - or "/WEB-INF/applicationContext-jdbc.xml" for the JDBC one.
    -->
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext-hibernate.xml</param-value>
    <!--
    <param-value>/WEB-INF/applicationContext-ojb.xml</param-value>
    -->
    <!--
    <param-value>/WEB-INF/applicationContext-jdbc.xml</param-value>
    -->
    </context-param>

    <!-- Spring Context Listener -->
    <!-- Leave the listener commented-out if using JBoss -->
    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>
    <!-- JSF Listener -->
    <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    <!--
    - Loads the root application context of this web app at startup,
    - by default from "/WEB-INF/applicationContext.xml".
    - Note that it is preferable to use ContextLoaderListener in a servlet container
    - that follows the Servlet 2.4 initialization order (many Servlet 2.3 containers do).
    -
    - Use WebApplicationContextUtils.getWebApplicationContex t(servletContext)
    - to access it anywhere in the web application, outside of the framework.
    -
    - The root context is the parent of all servlet-specific contexts.
    - This means that its beans are automatically available in these child contexts,
    - both for getBean(name) calls and (external) bean references.
    -->
    <servlet>
    <servlet-name>context</servlet-name>
    <servlet-class>org.springframework.web.context.ContextLoade rServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- Faces Servlet -->
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup> 1 </load-on-startup>
    </servlet>


    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>

    <resource-ref>
    <res-ref-name>jdbc/dsChangeLog</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>

    </web-app>

  • #2
    applicationContext.xml seems OK, but:
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext-hibernate.xml</param-value>
    <context-param>
    You said that your Spring config file is applicationContext.xml, so replace applicationContext-hibernate.xml by applicationContext.xml here.
    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>
    ...
    <servlet>
    <servlet-name>context</servlet-name>
    <servlet-class>org.springframework.web.context.ContextLoade rServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    You should not use both ContextLoaderListener and ContextLoaderServlet at the same time. If ContextLoaderListener works for your, then remove ContextLoaderServlet.
    HTH

    Comment


    • #3
      Hello,

      I removed the listener as you suggested and made sure the reference was to ApplicationContext-hibernate.xml but I still got the same error. So in looking at a simpler spring config file I made the following modifications:

      1) removed the transaction proxy
      2) changed the datasource stanza
      After making these change I think I am getting closer to the real problem (no connection to the database was ever mad). I now get this error when the war file is deployed:

      WARNING: Could not obtain connection metadata
      java.sql.SQLException: No suitable driver
      at java.sql.DriverManager.getConnection(DriverManager .java:532)
      at java.sql.DriverManager.getConnection(DriverManager .java:171)
      at org.springframework.jdbc.datasource.DriverManagerD ataSource.getConnectionFromDriverManager(DriverMan agerDataSource.java:156)


      I am using mysql-connector-java-3.0.9-stable-bin, and I have tried the one that ships with the spring example petclinic (which works when deployed) mysql-connector-java-2.0.14-bin. I have tried adding each one at a time to the jakarta-tomcat-5.0.29\common\lib dir and also inside the WEB-INF/lib dir of the war file...
      Here is the new ApplicationContext-hibernate.xml file

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

      <!--
      - Application context definition for Petclinic on Hibernate.
      -->
      <beans>

      <!-- ========================= RESOURCE DEFINITIONS ========================= -->

      <!-- Local DataSource that works in any environment -->
      <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
      <property name="driverClassName"><value>com.mysql.jdbc.Drive r</value></property>
      <property name="url"><value>jdbc\:mysql\://cybergate\:3306/changelog</value></property>
      <property name="username"><value>eusdart</value></property>
      <property name="password"><value>babylon5</value></property>
      </bean>



      <!-- Hibernate SessionFactory -->
      <bean id="mySessionFactory" class="org.springframework.orm.hibernate.LocalSess ionFactoryBean">
      <property name="dataSource"><ref local="dataSource"/></property>
      <property name="mappingResources">
      <value>changelog.hbm.xml</value>
      </property>
      <property name="hibernateProperties">
      <props>
      <prop key="hibernate.dialect">${hibernate.dialect}</prop>
      </props>
      </property>
      <property name="hibernateProperties">
      <props>
      <prop key="hibernate.dialect">net.sf.hibernate.dialect.M ySQLDialect</prop>
      <prop key="hibernate.show_sql">true</prop>
      <prop key="hibernate.cglib.use_reflection_optimizer">tru e</prop>
      <prop key="hibernate.cache.provider_class">net.sf.hibern ate.cache.HashtableCacheProvider</prop>
      </props>
      </property>
      </bean>

      <bean id="transactionManager"
      class="org.springframework.orm.hibernate.Hibernate TransactionManager">
      <property name="sessionFactory"><ref local="mySessionFactory"/></property>
      </bean>

      <bean id="usertable" class="cms.table.dao.hibernate.UsertableDAOHiberna teImpl">
      <property name="sessionFactory">
      <ref bean="mySessionFactory"/>
      </property>
      </bean>

      </beans>

      Comment


      • #4
        usually I use
        Code:
        jdbc&#58;mysql&#58;//cybergate&#58;3306/changelog
        instead of
        jdbc\:mysql\://cybergate\:3306/changelog

        Comment


        • #5
          irbouho,

          Thanks, that solved the deploy-time exception problem but I still am not getting a sessionFactory instantiated. Here's the log info:

          INFO: Driver Version is 2.0.14
          Oct 24, 2004 9:29:40 AM org.springframework.web.context.ContextLoader initWebApplicationContext
          INFO: Using context class [org.springframework.web.context.support.XmlWebAppl icationContext] for root WebApplicationContext
          Oct 24, 2004 9:29:40 AM org.springframework.web.context.ContextLoader initWebApplicationContext
          INFO: Published root WebApplicationContext [org.springframework.web.context.support.XmlWebAppl icationContext: displayName=[Root XmlWebApplicationContext]; startup date=[Sun Oct 24 09:29:38 GMT-06:00 2004]; root of ApplicationContext hierarchy; config locations=[/WEB-INF/applicationContext-hibernate.xml]; ] as ServletContext attribute with name [interface org.springframework.web.context.WebApplicationCont ext.ROOT]
          UsertableDAOHibernateImpl::getSessionFactory = null
          UsertableDAOHibernateImpl::getUser - HibernateTemplate = null
          UsertableDAOHibernateImpl::EXCEPTION = null
          BaseUsertable - initialize - entryPoint


          I am still lost as to why I am not getting the spring injection process to work???

          Comment


          • #6
            Could you try to load your applicationContext.xml using a simple FileSystemXmlApplicationContext and see what happens? also, where these lines come from?
            Code:
            UsertableDAOHibernateImpl&#58;&#58;getSessionFactory = null 
            UsertableDAOHibernateImpl&#58;&#58;getUser - HibernateTemplate = null 
            UsertableDAOHibernateImpl&#58;&#58;EXCEPTION = null 
            BaseUsertable - initialize - entryPoint

            Comment


            • #7
              I tried loading the application context using the following code:
              Configuration config = new Configuration();
              config.addClass(Usertable.class).addClass(Project. class).addClass(Usertype.class).addClass(Usertask. class);
              config.addClass(Projectdetail.class).addClass(Proj ectactivity.class).addClass(Activitytask.class).ad dClass(Activity.class);
              config.addClass(Detail.class).addClass(Resourcetyp e.class).addClass(Statuscode.class).addClass(Task. class);
              config.addClass(Workunit.class);
              sf = config.buildSessionFactory();
              Session sess = sf.openSession();
              user = (Usertable)sess.get(cms.table.model.Usertable.clas s, id);

              All seems to go well until this statement is executed:
              user = (Usertable)sess.get(cms.table.model.Usertable.clas s, id);
              then I get an Null exception. I have confirmed that sessionFactory and session are not null.

              I have tried loading the config object with both the fully qualified class name (pkg + classname) and just loading using the class name but each gives the null exception when I attempt to get the class using "sess.get(...)"

              One other thing I see in the log file is this:

              INFO: building session factory
              BaseUsertable - initialize - entryPoint
              Oct 24, 2004 11:22:51 AM net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance
              INFO: Not binding factory to JNDI, no JNDI name configured
              ========================================
              UsertableDAOHibernateImpl::getUser - SESSIONFACTORY = net.sf.hibernate.impl.SessionFactoryImpl@e2b9e5
              ========================================
              ========================================
              UsertableDAOHibernateImpl::getUser - userID = eusdart
              ========================================
              UsertableDAOHibernateImpl::getUser - Exception: null
              ========================================
              Oct 24, 2004 11:22:52 AM net.sf.hibernate.impl.SessionFactoryImpl close
              INFO: closing
              Oct 24, 2004 11:22:52 AM net.sf.hibernate.connection.DriverManagerConnectio nProvider close
              INFO: cleaning up connection pool: jdbc:mysql://cybergate:3306/changelog
              UsertableDAOHibernateImpl::EXCEPTION = null
              BaseUsertable - initialize - entryPoint
              UserBean - Welcome Unknown Uknown
              Oct 24, 2004 11:24:27 AM net.sf.hibernate.impl.SessionImpl finalize
              WARNING: unclosed connection

              Comment


              • #8
                What you are describing in your last post is a Hibernate issue. I can not say what's happening as I do not know how you mapped your classes. There is a thread that seems to describe something relative to your problem: http://forum.springframework.org/sho...ernate + MySQL.
                Could you try to load your applicationContext.xml using a simple FileSystemXmlApplicationContext and see what happens?
                I asked to load your Spring configuration outside the web server to see why the Injection does not work for your. That was, I think, the initial issue you described in this thread.
                Last edited by robyn; May 14th, 2006, 11:55 AM.

                Comment


                • #9
                  Omar,

                  I don't understand what you are asking but I tried doing this in the DAO implementation class:

                  Configuration config = new Configuration();
                  config.addClass(cms.table.model.Usertable.class).a ddClass(cms.table.model.Project.class).addClass(cm s.table.model.Usertype.class).addClass(cms.table.m odel.Usertask.class);
                  config.addClass(cms.table.model.Projectdetail.clas s).addClass(cms.table.model.Projectactivity.class) .addClass(cms.table.model.Activitytask.class).addC lass(cms.table.model.Activity.class);
                  config.addClass(cms.table.model.Detail.class).addC lass(cms.table.model.Resourcetype.class).addClass( cms.table.model.Statuscode.class).addClass(cms.tab le.model.Task.class);
                  config.addClass(cms.table.model.Workunit.class);
                  sf = config.buildSessionFactory();

                  Session sess = sf.openSession();
                  Criteria crit = sess.createCriteria(cms.table.model.Usertable.clas s);

                  List l = crit.list();
                  user = (Usertable) l.get(0);
                  System.out.println("============================== ==========");
                  System.out.println("UsertableDAOHibernateImpl::get User - name = "
                  + user.getFirstName() + " " + user.getLastName() );
                  System.out.println("============================== ==========");

                  it returned the following to the log file:

                  ========================================
                  UsertableDAOHibernateImpl::getUser - name = Darryl Thompson
                  ========================================

                  This seems to suggest that:
                  - the .hbm.xml file is OK
                  - the jdbc database connection is OK
                  It seems that my problem is that the Spring components are not initializing the sessionFactory and session, and maybe this is why the "gethibernateTemplate() " return nulls.

                  I am still clueless as to how to debug and resolve this issue.

                  How would I use the xml reader that you suggested?

                  Thanks

                  Comment


                  • #10
                    Code:
                    import org.springframework.context.ApplicationContext;
                    import org.springframework.context.support.FileSystemXmlApplicationContext;
                    ...
                    ApplicationContext context = new FileSystemXmlApplicationContext&#40;"path to applicationContext-hibernate.xml"&#41;;
                    UsertableDAOHibernate dao = &#40;UsertableDAOHibernate&#41; context.getBean&#40;"usertable"&#41;;
                    dao.getUser&#40;someId&#41;;

                    Comment


                    • #11
                      Omar,

                      I am getting an endless loop after adding that script. Here what the method looks like:
                      public class UsertableDAOHibernateImpl extends HibernateDaoSupport
                      implements cms.table.dao.interfaces.Usertable {


                      public List getUserList() {
                      return getHibernateTemplate().find("from Usertable");
                      }


                      /* (non-Javadoc)
                      * @see cms.table.dao.interfaces.Usertable#getTask(java.la ng.Integer)
                      */
                      public Usertable getUser(String id) {
                      Usertable user = null;
                      System.out.println("===============ENTRY POINT=========================");
                      try{
                      ApplicationContext context = new FileSystemXmlApplicationContext("../webapps/CMS/WEB-INF/applicationContext-hibernate.xml");
                      UsertableDAOHibernateImpl dao = (UsertableDAOHibernateImpl) context.getBean("usertable");
                      System.out.println("UsertableDAOHibernateImpl::USR ID = " + dao.getUser(id));
                      }catch(Exception e) {
                      System.out.println("UsertableDAOHibernateImpl::USR ID = threw exception: " + e.getMessage() );
                      }
                      System.out.println("===============EXIT POINT=========================");
                      return user;
                      //return (Usertable) getHibernateTemplate().get(Usertable.class, id);
                      }
                      ...
                      }

                      and a small set of the log file:


                      ===============ENTRY POINT=========================
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
                      INFO: Loading XML bean definitions from file [C:\software\appServers\Tomcat\jakarta-tomcat-5.0.29\bin\..\webapps\CMS\WEB-INF\applicationContext-hibernate.xml]
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractXmlApp licationContext refreshBeanFactory
                      INFO: Bean factory for application context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=5872987]: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [dataSource,mySessionFactory,transactionManager,use rtable]; Root of BeanFactory hierarchy
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractApplic ationContext refresh
                      INFO: 4 beans defined in ApplicationContext [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=5872987]
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractApplic ationContext initMessageSource
                      INFO: No MessageSource found for context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=5872987]: using empty default
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractApplic ationContext initApplicationEventMulticaster
                      INFO: No ApplicationEventMulticaster found for context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=5872987]: using default
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractApplic ationContext refreshListeners
                      INFO: Refreshing listeners
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
                      INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [dataSource,mySessionFactory,transactionManager,use rtable]; Root of BeanFactory hierarchy]
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'dataSource'
                      Oct 24, 2004 1:55:35 PM org.springframework.jdbc.datasource.DriverManagerD ataSource setDriverClassName
                      INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'mySessionFactory'
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Projectdetail -> projectdetail
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Activity -> activity
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Activity.actyProjects -> projectActivity
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Activitytask -> activitytask
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Detail -> detail
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Workunit -> workunit
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Usertype -> usertype
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Usertask -> usertask
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Usertable -> usertable
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Usertable.userProjects -> Projectuser
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Usertable.resourceTypes -> Usertype
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Usertable.assignedTasks -> Usertask
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Task -> task
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Task.assignedUsers -> Usertask
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Statuscode -> statuscode
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Resourcetype -> resourcetype
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Resourcetype.users -> Usertype
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Projectactivity -> projectactivity
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Project -> project
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Project.projectActivities -> projectActivity
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Project.projectUsers -> Projectuser
                      Oct 24, 2004 1:55:35 PM org.springframework.orm.hibernate.LocalSessionFact oryBean afterPropertiesSet
                      INFO: Building new Hibernate SessionFactory
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                      INFO: processing one-to-many association mappings
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                      INFO: Mapping collection: cms.table.model.Activity.details -> detail
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                      INFO: Mapping collection: cms.table.model.Task.hrsWorked -> workunit
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                      INFO: Mapping collection: cms.table.model.Project.projectDetails -> projectdetail
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                      INFO: processing one-to-one association property references
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                      INFO: processing foreign key constraints
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      WARNING: No dialect set - using GenericDialect: Dialect class not found: ${hibernate.dialect}
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.dialect.Dialect <init>
                      INFO: Using dialect: net.sf.hibernate.dialect.GenericDialect
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Use outer join fetching: true
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.connection.ConnectionProviderFact ory newConnectionProvider
                      INFO: Initializing connection provider: org.springframework.orm.hibernate.LocalDataSourceC onnectionProvider
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.transaction.TransactionManagerLoo kupFactory getTransactionManagerLookup
                      INFO: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Use scrollable result sets: true
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Use JDBC3 getGeneratedKeys(): true
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Optimize cache for minimal puts: false
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Query language substitutions: {}
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: cache provider: net.sf.hibernate.cache.EhCacheProvider
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.cfg.Configuration configureCaches
                      INFO: instantiating and configuring caches
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
                      INFO: building session factory
                      BaseUsertable - initialize - entryPoint
                      Oct 24, 2004 1:55:35 PM net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance
                      INFO: Not binding factory to JNDI, no JNDI name configured
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'transactionManager'
                      Oct 24, 2004 1:55:35 PM org.springframework.orm.hibernate.HibernateTransac tionManager afterPropertiesSet
                      INFO: Using DataSource [org.springframework.jdbc.datasource.DriverManagerD ataSource@e2b9e5] of Hibernate SessionFactory for HibernateTransactionManager
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'usertable'
                      Oct 24, 2004 1:55:35 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                      INFO: Looking up default SQLErrorCodes for DataSource
                      Oct 24, 2004 1:55:35 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                      INFO: Database Product Name is MySQL
                      Oct 24, 2004 1:55:35 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                      INFO: Driver Version is 2.0.14
                      ===============ENTRY POINT=========================
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
                      INFO: Loading XML bean definitions from file [C:\software\appServers\Tomcat\jakarta-tomcat-5.0.29\bin\..\webapps\CMS\WEB-INF\applicationContext-hibernate.xml]
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractXmlApp licationContext refreshBeanFactory
                      INFO: Bean factory for application context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=1642236]: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [dataSource,mySessionFactory,transactionManager,use rtable]; Root of BeanFactory hierarchy
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractApplic ationContext refresh
                      INFO: 4 beans defined in ApplicationContext [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=1642236]
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractApplic ationContext initMessageSource
                      INFO: No MessageSource found for context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=1642236]: using empty default
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractApplic ationContext initApplicationEventMulticaster
                      INFO: No ApplicationEventMulticaster found for context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=1642236]: using default
                      Oct 24, 2004 1:55:35 PM org.springframework.context.support.AbstractApplic ationContext refreshListeners
                      INFO: Refreshing listeners
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
                      INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [dataSource,mySessionFactory,transactionManager,use rtable]; Root of BeanFactory hierarchy]
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'dataSource'
                      Oct 24, 2004 1:55:35 PM org.springframework.jdbc.datasource.DriverManagerD ataSource setDriverClassName
                      INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
                      Oct 24, 2004 1:55:35 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'mySessionFactory'
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Projectdetail -> projectdetail
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Activity -> activity
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Activity.actyProjects -> projectActivity
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Activitytask -> activitytask
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Detail -> detail
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Workunit -> workunit
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Usertype -> usertype
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Usertask -> usertask
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Usertable -> usertable
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Usertable.userProjects -> Projectuser
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Usertable.resourceTypes -> Usertype
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Usertable.assignedTasks -> Usertask
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Task -> task
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Task.assignedUsers -> Usertask
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Statuscode -> statuscode
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Resourcetype -> resourcetype
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Resourcetype.users -> Usertype
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Projectactivity -> projectactivity
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Project -> project
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Project.projectActivities -> projectActivity
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Project.projectUsers -> Projectuser
                      Oct 24, 2004 1:55:36 PM org.springframework.orm.hibernate.LocalSessionFact oryBean afterPropertiesSet
                      INFO: Building new Hibernate SessionFactory
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                      INFO: processing one-to-many association mappings
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                      INFO: Mapping collection: cms.table.model.Activity.details -> detail
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                      INFO: Mapping collection: cms.table.model.Task.hrsWorked -> workunit
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                      INFO: Mapping collection: cms.table.model.Project.projectDetails -> projectdetail
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                      INFO: processing one-to-one association property references
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                      INFO: processing foreign key constraints
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      WARNING: No dialect set - using GenericDialect: Dialect class not found: ${hibernate.dialect}
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.dialect.Dialect <init>
                      INFO: Using dialect: net.sf.hibernate.dialect.GenericDialect
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Use outer join fetching: true
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.connection.ConnectionProviderFact ory newConnectionProvider
                      INFO: Initializing connection provider: org.springframework.orm.hibernate.LocalDataSourceC onnectionProvider
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.transaction.TransactionManagerLoo kupFactory getTransactionManagerLookup
                      INFO: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Use scrollable result sets: true
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Use JDBC3 getGeneratedKeys(): true
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Optimize cache for minimal puts: false
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Query language substitutions: {}
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: cache provider: net.sf.hibernate.cache.EhCacheProvider
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Configuration configureCaches
                      INFO: instantiating and configuring caches
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
                      INFO: building session factory
                      BaseUsertable - initialize - entryPoint
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance
                      INFO: Not binding factory to JNDI, no JNDI name configured
                      Oct 24, 2004 1:55:36 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'transactionManager'
                      Oct 24, 2004 1:55:36 PM org.springframework.orm.hibernate.HibernateTransac tionManager afterPropertiesSet
                      INFO: Using DataSource [org.springframework.jdbc.datasource.DriverManagerD ataSource@6e9b6a] of Hibernate SessionFactory for HibernateTransactionManager
                      Oct 24, 2004 1:55:36 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'usertable'
                      Oct 24, 2004 1:55:36 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                      INFO: Looking up default SQLErrorCodes for DataSource
                      Oct 24, 2004 1:55:36 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                      INFO: Database Product Name is MySQL
                      Oct 24, 2004 1:55:36 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                      INFO: Driver Version is 2.0.14
                      ===============ENTRY POINT=========================
                      Oct 24, 2004 1:55:36 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
                      INFO: Loading XML bean definitions from file [C:\software\appServers\Tomcat\jakarta-tomcat-5.0.29\bin\..\webapps\CMS\WEB-INF\applicationContext-hibernate.xml]
                      Oct 24, 2004 1:55:36 PM org.springframework.context.support.AbstractXmlApp licationContext refreshBeanFactory
                      INFO: Bean factory for application context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=13298201]: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [dataSource,mySessionFactory,transactionManager,use rtable]; Root of BeanFactory hierarchy
                      Oct 24, 2004 1:55:36 PM org.springframework.context.support.AbstractApplic ationContext refresh
                      INFO: 4 beans defined in ApplicationContext [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=13298201]
                      Oct 24, 2004 1:55:36 PM org.springframework.context.support.AbstractApplic ationContext initMessageSource
                      INFO: No MessageSource found for context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=13298201]: using empty default
                      Oct 24, 2004 1:55:36 PM org.springframework.context.support.AbstractApplic ationContext initApplicationEventMulticaster
                      INFO: No ApplicationEventMulticaster found for context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=13298201]: using default
                      Oct 24, 2004 1:55:36 PM org.springframework.context.support.AbstractApplic ationContext refreshListeners
                      INFO: Refreshing listeners
                      Oct 24, 2004 1:55:36 PM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
                      INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [dataSource,mySessionFactory,transactionManager,use rtable]; Root of BeanFactory hierarchy]
                      Oct 24, 2004 1:55:36 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'dataSource'
                      Oct 24, 2004 1:55:36 PM org.springframework.jdbc.datasource.DriverManagerD ataSource setDriverClassName
                      INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
                      Oct 24, 2004 1:55:36 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'mySessionFactory'
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Projectdetail -> projectdetail
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Activity -> activity
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Activity.actyProjects -> projectActivity
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Activitytask -> activitytask
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Detail -> detail
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Workunit -> workunit
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Usertype -> usertype
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Usertask -> usertask
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Usertable -> usertable
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Usertable.userProjects -> Projectuser
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Usertable.resourceTypes -> Usertype
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Usertable.assignedTasks -> Usertask
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Task -> task
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Task.assignedUsers -> Usertask
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Statuscode -> statuscode
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Resourcetype -> resourcetype
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Resourcetype.users -> Usertype
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Projectactivity -> projectactivity
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindRootClass
                      INFO: Mapping class: cms.table.model.Project -> project
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Project.projectActivities -> projectActivity
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollection
                      INFO: Mapping collection: cms.table.model.Project.projectUsers -> Projectuser
                      Oct 24, 2004 1:55:36 PM org.springframework.orm.hibernate.LocalSessionFact oryBean afterPropertiesSet
                      INFO: Building new Hibernate SessionFactory
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                      INFO: processing one-to-many association mappings
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                      INFO: Mapping collection: cms.table.model.Activity.details -> detail
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                      INFO: Mapping collection: cms.table.model.Task.hrsWorked -> workunit
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                      INFO: Mapping collection: cms.table.model.Project.projectDetails -> projectdetail
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                      INFO: processing one-to-one association property references
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                      INFO: processing foreign key constraints
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      WARNING: No dialect set - using GenericDialect: Dialect class not found: ${hibernate.dialect}
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.dialect.Dialect <init>
                      INFO: Using dialect: net.sf.hibernate.dialect.GenericDialect
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Use outer join fetching: true
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.connection.ConnectionProviderFact ory newConnectionProvider
                      INFO: Initializing connection provider: org.springframework.orm.hibernate.LocalDataSourceC onnectionProvider
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.transaction.TransactionManagerLoo kupFactory getTransactionManagerLookup
                      INFO: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Use scrollable result sets: true
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Use JDBC3 getGeneratedKeys(): true
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Optimize cache for minimal puts: false
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: Query language substitutions: {}
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                      INFO: cache provider: net.sf.hibernate.cache.EhCacheProvider
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.cfg.Configuration configureCaches
                      INFO: instantiating and configuring caches
                      Oct 24, 2004 1:55:36 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
                      INFO: building session factory
                      BaseUsertable - initialize - entryPoint
                      Oct 24, 2004 1:55:37 PM net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance
                      INFO: Not binding factory to JNDI, no JNDI name configured
                      Oct 24, 2004 1:55:37 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'transactionManager'
                      Oct 24, 2004 1:55:37 PM org.springframework.orm.hibernate.HibernateTransac tionManager afterPropertiesSet
                      INFO: Using DataSource [org.springframework.jdbc.datasource.DriverManagerD ataSource@1b6a1c4] of Hibernate SessionFactory for HibernateTransactionManager
                      Oct 24, 2004 1:55:37 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                      INFO: Creating shared instance of singleton bean 'usertable'
                      Oct 24, 2004 1:55:37 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                      INFO: Looking up default SQLErrorCodes for DataSource
                      Oct 24, 2004 1:55:37 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                      INFO: Database Product Name is MySQL
                      Oct 24, 2004 1:55:37 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                      INFO: Driver Version is 2.0.14
                      ===============ENTRY POINT=========================
                      Oct 24, 2004 1:55:37 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions

                      Comment


                      • #12
                        I am sorry for not being enough clear. Please, put this code in a separate class with a main method
                        Code:
                        import org.springframework.context.ApplicationContext; 
                        import org.springframework.context.support.FileSystemXmlApplicationContext; 
                        ... 
                        ApplicationContext context = new FileSystemXmlApplicationContext&#40;"path to applicationContext-hibernate.xml"&#41;; 
                        UsertableDAOHibernate dao = &#40;UsertableDAOHibernate&#41; context.getBean&#40;"usertable"&#41;; 
                        dao.getUser&#40;someId&#41;;
                        then run this class outside your web server.
                        The objective is to see if your Spring configuration is OK before running it inside your web server.

                        Comment


                        • #13
                          Omar,

                          Thanks for clearing that up. I ran the code you gave me (as a separate class) from the command line and here what I got (still getting null). If I create my own Configuration, SessionFactory and HibernateTemplate then I can successfully get data from my user table. If I try to use the hibernateTemplate from the Spring HibernateDaoSupport then all I get is null pointer???


                          Oct 24, 2004 4:31:27 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
                          INFO: Loading XML bean definitions from file [C:\software\applications\CMS\WebContent\WEB-INF\applicationContext-hibernate.xml]
                          Oct 24, 2004 4:31:27 PM org.springframework.context.support.AbstractXmlApp licationContext refreshBeanFactory
                          INFO: Bean factory for application context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=27196165]: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [dataSource,mySessionFactory,transactionManager,use rtable]; Root of BeanFactory hierarchy
                          Oct 24, 2004 4:31:27 PM org.springframework.context.support.AbstractApplic ationContext refresh
                          INFO: 4 beans defined in ApplicationContext [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=27196165]
                          Oct 24, 2004 4:31:27 PM org.springframework.context.support.AbstractApplic ationContext initMessageSource
                          INFO: No MessageSource found for context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=27196165]: using empty default
                          Oct 24, 2004 4:31:27 PM org.springframework.context.support.AbstractApplic ationContext initApplicationEventMulticaster
                          INFO: No ApplicationEventMulticaster found for context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=27196165]: using default
                          Oct 24, 2004 4:31:27 PM org.springframework.context.support.AbstractApplic ationContext refreshListeners
                          INFO: Refreshing listeners
                          Oct 24, 2004 4:31:27 PM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
                          INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [dataSource,mySessionFactory,transactionManager,use rtable]; Root of BeanFactory hierarchy]
                          Oct 24, 2004 4:31:27 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'dataSource'
                          Oct 24, 2004 4:31:28 PM org.springframework.jdbc.datasource.DriverManagerD ataSource setDriverClassName
                          INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
                          Oct 24, 2004 4:31:28 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'mySessionFactory'
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Environment <clinit>
                          INFO: Hibernate 2.1.6
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Environment <clinit>
                          INFO: loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.connection.password=, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDi alect, hibernate.connection.url=jdbc:mysql://cybergate:3306/changelog, hibernate.connection.driver_class=com.mysql.jdbc.D river}
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Environment <clinit>
                          INFO: using CGLIB reflection optimizer
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Projectdetail -> projectdetail
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Activity -> activity
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollection
                          INFO: Mapping collection: cms.table.model.Activity.actyProjects -> projectActivity
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Activitytask -> activitytask
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Detail -> detail
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Workunit -> workunit
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Usertype -> usertype
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Usertask -> usertask
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Usertable -> usertable
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollection
                          INFO: Mapping collection: cms.table.model.Usertable.userProjects -> Projectuser
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollection
                          INFO: Mapping collection: cms.table.model.Usertable.resourceTypes -> Usertype
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollection
                          INFO: Mapping collection: cms.table.model.Usertable.assignedTasks -> Usertask
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Task -> task
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollection
                          INFO: Mapping collection: cms.table.model.Task.assignedUsers -> Usertask
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Statuscode -> statuscode
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Resourcetype -> resourcetype
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollection
                          INFO: Mapping collection: cms.table.model.Resourcetype.users -> Usertype
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Projectactivity -> projectactivity
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindRootClass
                          INFO: Mapping class: cms.table.model.Project -> project
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollection
                          INFO: Mapping collection: cms.table.model.Project.projectActivities -> projectActivity
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollection
                          INFO: Mapping collection: cms.table.model.Project.projectUsers -> Projectuser
                          Oct 24, 2004 4:31:28 PM org.springframework.orm.hibernate.LocalSessionFact oryBean afterPropertiesSet
                          INFO: Building new Hibernate SessionFactory
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                          INFO: processing one-to-many association mappings
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                          INFO: Mapping collection: cms.table.model.Activity.details -> detail
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                          INFO: Mapping collection: cms.table.model.Task.hrsWorked -> workunit
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Binder bindCollectionSecondPass
                          INFO: Mapping collection: cms.table.model.Project.projectDetails -> projectdetail
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                          INFO: processing one-to-one association property references
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.Configuration secondPassCompile
                          INFO: processing foreign key constraints
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                          WARNING: No dialect set - using GenericDialect: Dialect class not found: ${hibernate.dialect}
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.dialect.Dialect <init>
                          INFO: Using dialect: net.sf.hibernate.dialect.GenericDialect
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                          INFO: Use outer join fetching: true
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.connection.ConnectionProviderFact ory newConnectionProvider
                          INFO: Initializing connection provider: org.springframework.orm.hibernate.LocalDataSourceC onnectionProvider
                          Oct 24, 2004 4:31:28 PM net.sf.hibernate.transaction.TransactionManagerLoo kupFactory getTransactionManagerLookup
                          INFO: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
                          Oct 24, 2004 4:31:29 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                          INFO: Use scrollable result sets: true
                          Oct 24, 2004 4:31:29 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                          INFO: Use JDBC3 getGeneratedKeys(): true
                          Oct 24, 2004 4:31:29 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                          INFO: Optimize cache for minimal puts: false
                          Oct 24, 2004 4:31:29 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                          INFO: Query language substitutions: {}
                          Oct 24, 2004 4:31:29 PM net.sf.hibernate.cfg.SettingsFactory buildSettings
                          INFO: cache provider: net.sf.hibernate.cache.EhCacheProvider
                          Oct 24, 2004 4:31:29 PM net.sf.hibernate.cfg.Configuration configureCaches
                          INFO: instantiating and configuring caches
                          Oct 24, 2004 4:31:29 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
                          INFO: building session factory
                          BaseUsertable - initialize - entryPoint
                          Oct 24, 2004 4:31:29 PM net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance
                          INFO: Not binding factory to JNDI, no JNDI name configured
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'transactionManager'
                          Oct 24, 2004 4:31:29 PM org.springframework.orm.hibernate.HibernateTransac tionManager afterPropertiesSet
                          INFO: Using DataSource [org.springframework.jdbc.datasource.DriverManagerD ataSource@bd6a5f] of Hibernate SessionFactory for HibernateTransactionManager
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'usertable'
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
                          INFO: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'DB2'
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'HSQL'
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'MS-SQL'
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'MySQL'
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'Oracle'
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'Informix'
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'PostgreSQL'
                          Oct 24, 2004 4:31:29 PM org.springframework.beans.factory.support.Abstract BeanFactory getBean
                          INFO: Creating shared instance of singleton bean 'Sybase'
                          Oct 24, 2004 4:31:29 PM org.springframework.jdbc.support.SQLErrorCodesFact ory <init>
                          INFO: SQLErrorCodes loaded: [HSQL Database Engine, Oracle, Sybase SQL Server, Microsoft SQL Server, Informix Dynamic Server, PostgreSQL, DB2*, MySQL]
                          Oct 24, 2004 4:31:29 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                          INFO: Looking up default SQLErrorCodes for DataSource
                          Oct 24, 2004 4:31:29 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                          INFO: Database Product Name is MySQL
                          Oct 24, 2004 4:31:29 PM org.springframework.jdbc.support.SQLErrorCodesFact ory getErrorCodes
                          INFO: Driver Version is 2.0.14
                          USER = null

                          Comment


                          • #14
                            FYI

                            I resolved this problem a while back when I discovered that I needed JSF-Spring integration jar file (and I also had to step down from Spring 1.1.2 to Spring 1.1.1). The problem was that Spring was correctly configuring the Hibernate classes and injecting the datasource properly but when I attempted to reference the hibernate classes from a managed bean I was getting a new instance created (which caused all of the IOC stuff to be nullified).

                            Hope this helps other newbies...

                            Comment

                            Working...
                            X