Hi,
I'm new with using hibernate, I've recently started working on a Tapestry 5 application with hibernate integrated in it, and I'm trying to connect hibernate to MSSQLServer 2008R2. Hibernate works just fine on its own, tried it with a BeanEditForm in Tapestry. However, when I try to connect it to work with MSSQL, it shows this exception: Exception constructing service 'ValueEncoderSource': Error invoking service contribution method org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration, boolean, HibernateSessionSource, Session, TypeCoercer, PropertyAccess, LoggerSource): Exception constructing service 'HibernateSessionSource': Error invoking constructor public org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(org.slf4j.Logger,java.util.List): JDBC Driver class not found: com.microsoft.sqlserver.jdbc.SQLServerDriver
and so on, it's too long to just paste here, this is the full error report:
http://www.filedropper.com/tapestry5-hibernateerror
This is the hibernate.cfg:
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property> <property name="hibernate.connection.url">jdbc:sqlserver://localhost;integratedSecurity=true</property> <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property> <property name="hibernate.connection.username">sa</property> <property name="hibernate.connection.password">sa</property> <property name="hbm2ddl.auto">update</property> <property name="hibernate.show_sql">true</property> <property name="hibernate.format_sql">true</property> </session-factory> </hibernate-configuration>
and these are the dependencies I used for hibernate and MSSQL: <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>sqljdbc4</artifactId> <version>4.0</version> </dependency> <dependency> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-test</artifactId> <version>${tapestry-release-version}</version> <scope>test</scope> </dependency>
If someone could give me some pointers, I would appreciate it. Thanks.
[EDIT] Found a temporary solution to the problem, will look into it some time after I complete project.
|