0

Configuration file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration  
DTD 3.0//EN" "http://www.hibernate.org/dtd/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:microsoft:sqlserver://171.1.8.4;databaseName:master
</property>
<property name="hibernate.connection.username">
usename
</property>
<property name="hibernate.connection.password">
password
</property>
<property name="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<property name="hibernate.default_schema">
dbo
</property>
<property name="show_sql">true</property>
<mapping resource="practice041116/Cls.hbm.xml" />
</session-factory>
</hibernate-configuration>

Here is the stack trace

How to resolve it as i have went through few answers like this but its not helping Thanks in advance

The rest of the code is available here

Community
  • 1
  • 1
Taleev Aalam
  • 49
  • 1
  • 9
  • which server you are using ? Tomcat or jetty or weblogic ? – Vasu Nov 05 '16 at 12:02
  • i am using Apache server and microsoft sql server 2008 R2 for database management – Taleev Aalam Nov 05 '16 at 13:03
  • Did not get any solution yet.. – Taleev Aalam Nov 06 '16 at 11:00
  • Add SQLServer jar file to the Apache lib folder and restart the server – Vasu Nov 06 '16 at 11:03
  • this error has been resolved but now i am facing a new error which says com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset is it possible to solve it from here or need to post a new question. – Taleev Aalam Nov 25 '16 at 12:34
  • And i did not add SQLServer jar file to the Apache lib folder but i have sqljdbc4.jar file in my class path, and the mistake i was doing, here i was syntactically wrong as i have defined the as jdbc:microsoft:sqlserver and the rest of the detail, so i have changed it to "jdbc:sqlserver", it solved the error – Taleev Aalam Nov 25 '16 at 12:49

0 Answers0