Hi,
  I have developed the application using the 3parts tutorial from the
site  www.eggsylife.blogspot.com as suggested by you.
Actually for database I have used MySQL and for  the connection with
database I have created the applicationContext.xml as follows :

- applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xmlns:aop="http://www.springframework.org/schema/aop";
xmlns:tx="http://www.springframework.org/schema/tx";
 xsi:schemaLocation=" http://www.springframework.org/schema/beans
classpath:spring-beans-2.0.xsd http://www.springframework.org/schema/tx
classpath:spring-tx-2.0.xsd http://www.springframework.org/schema/aop
classpath:spring-aop-2.0.xsd">
 <bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
   <property name="driverClassName">
       <value>com.mysql.jdbc.Driver</value>
   </property>
   <property name="url">
      <value>>jdbc:mysql://localhost/test</value>
   </property>

  <property name="username">
        <value>root</value>
  </property>
  <property name="password">
     <value>root</value>
   </property>
   <property name="initialSize">
       <value>2</value>
   </property>
   <property name="maxActive">
            <value>5</value>
   </property>
   <property name="maxIdle">
      <value>2</value>
   </property>
  </bean>
   <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="dataSource">
     <ref bean="dataSource"/>
    </property>
   <property name="configLocation">
    <value>hibernate.cfg.xml</value>
    </property>
     <property  name="configurationClass">
         <value>org.hibernate.cfg.AnnotationConfiguration</value>
     </property>
     <property name="hibernateProperties">
       <props>
          <prop
key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>
             <prop key="show_sql">true</prop>
          </props>
     </property>
    </bean>
    <bean id="txManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
     <property name="sessionFactory" ref="sessionFactory" />
      </bean>
      <!-- enable the configuration of transactional behavior based on
annotations -->
      <tx:annotation-driven transaction-manager="txManager" proxy-
target-class="false" />

          <bean id="pupilCollection"
class="com.company.server.domain.PupilCollectionImpl"
scope="prototype">  <property name="sessionFactory"><ref
bean="sessionFactory"/></property> </bean>
     </beans>

Also, in the lib folder I have included the jar that is,  mysql-
connector-java-5.0.4-bin.jar  in the 'lib' folder.
But now I am getting the errors as,

1. [WARN] SQL Error: 0, SQLState: null

2. [WARN] Cannot create JDBC driver of class 'com.mysql.jdbc.Driver'
for connect URL '>jdbc:mysql://localhost/test'

3. [WARN] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of class 'com.mysql.jdbc.Driver' for connect URL '>jdbc:mysql://
localhost/test'
        at org.apache.commons.dbcp.BasicDataSource.createDataSource
(BasicDataSource.java:1150)
        at org.apache.commons.dbcp.BasicDataSource.getConnection
(BasicDataSource.java:880)
        at
org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection
(LocalDataSourceConnectionProvider.java:82)
        at org.hibernate.cfg.SettingsFactory.buildSettings
(SettingsFactory.java:84)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:
2009)
        at org.hibernate.cfg.Configuration.buildSessionFactory
(Configuration.java:1292)
        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory
(AnnotationConfiguration.java:915)
        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory
(LocalSessionFactoryBean.java:814)
        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory
(LocalSessionFactoryBean.java:732)
        at
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet
(AbstractSessionFactoryBean.java:211)
Caused by: java.sql.SQLException: No suitable driver
        at org.apache.commons.dbcp.BasicDataSource.createDataSource
(BasicDataSource.java:1143)
        at org.apache.commons.dbcp.BasicDataSource.getConnection
(BasicDataSource.java:880)
        at
org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection
(LocalDataSourceConnectionProvider.java:82)
        at org.hibernate.cfg.SettingsFactory.buildSettings
(SettingsFactory.java:84)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:
2009)
        at org.hibernate.cfg.Configuration.buildSessionFactory
(Configuration.java:1292)
        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory
(AnnotationConfiguration.java:915)
        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory
(LocalSessionFactoryBean.java:814)
        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory
(LocalSessionFactoryBean.java:732)
        at
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet
(AbstractSessionFactoryBean.java:211)

4. [WARN] no persistent classes found for query class:
                  from com.company.server.persistent.Pupil as p  where
p.teacher.teacherId = :teacherId  order by p.name


Please help to solve these errors.

Thanks,
Poonam.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to