Hi everyone,
I am having problem to buildSessionFactory and connect to Microsoft SQL server 2000. I am using inet Opt2000 microsoft sql server JDBC driver. Here is my configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd" >
<hibernate-configuration>
<session-factory>
<!-- property -->
<property name="connection.driver_class">com.inet.tds.TdsDriver</property>
<property name="connection.url">jdbc:inetdae7a:192.168.0.19:1433?database=vfav4_testcase5</property>
<property name="connection.username">sa</property>
<property name="connection.password">password</property>
<property name="dialect">net.sf.hibernate.dialect.SQLServerDialect</property>
<property name="query.substitutions">hqlCurrentDate sysdate, hqlCase case, hqlWhen when, hqlThen then, hqlElse else, hqlEnd end</property>
<property name="use_outer_join">true</property>
<property name="jdbc.batch_size">30</property>
<property name="show_sql">true</property>
<property name="hibernate.dbcp.maxActive">4</property>
<property name="hibernate.dbcp.maxIdle">6</property>
<property name="hibernate.dbcp.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.maxWait">2000</property>
<property name="hibernate.dbcp.timeBetweenEvictionRunsMillis">60000</property>
<property name="hibernate.dbcp.minEvictableIdleTimeMillis">0</property>
<property name="hibernate.dbcp.validationQuery">select 1 from dual</property>
<property name="hibernate.dbcp.testOnBorrow">true</property>
<property name="hibernate.dbcp.testOnReturn">false</property>
<property name="hibernate.dbcp.testWhileIdle">false</property>
<property name="hibernate.dbcp.ps.maxActive">5</property>
<property name="hibernate.dbcp.ps.maxIdle">10</property>
<property name="hibernate.dbcp.ps.maxWait">2000</property>
<property name="hibernate.dbcp.ps.whenExhaustedAction">1</property>
<!-- Mapping -->
<mapping file="c:\dev\Accucast4_research\av4\classes\testcase\testcase5\Customer.hbm.xml"/>
<mapping file="c:\dev\Accucast4_research\av4\classes\testcase\testcase5\CustAccucastData.hbm.xml"/>
<mapping file="c:\dev\Accucast4_research\av4\classes\testcase\testcase5\List.hbm.xml"/>
<mapping file="c:\dev\Accucast4_research\av4\classes\testcase\testcase5\ListMember.hbm.xml"/>
<mapping file="c:\dev\Accucast4_research\av4\classes\testcase\testcase5\Recipient.hbm.xml"/>
<mapping file="c:\dev\Accucast4_research\av4\classes\testcase\testcase5\Response.hbm.xml"/>
<mapping file="c:\dev\Accucast4_research\av4\classes\testcase\testcase5\SamplingResult.hbm.xml"/>
<mapping file="c:\dev\Accucast4_research\av4\classes\testcase\testcase5\Subscription.hbm.xml"/>
</session-factory>
</hibernate-configuration>
When I am trying to call configuration.buildSessionFactory(), I got the following from the log:
10:46:17,021 INFO Configuration:564 - processing one-to-many association mappings
10:46:17,036 DEBUG Binder:1258 - Second pass for collection: testcase.testcase5.Customer.listMembers
10:46:17,052 INFO Binder:1083 - Mapping collection: testcase.testcase5.Customer.listMembers -> LIST_MEMBER
10:46:17,099 DEBUG Binder:412 - Mapped property: lmLId -> LM_L_ID, type: long
10:46:17,161 DEBUG Binder:1270 - Mapped collection key: LM_C_ID, index: LM_L_ID, one-to-many: testcase.testcase5.ListMember
10:46:17,177 DEBUG Binder:1258 - Second pass for collection: testcase.testcase5.Customer.recipients
10:46:17,193 INFO Binder:1083 - Mapping collection: testcase.testcase5.Customer.recipients -> RECIPIENT
10:46:17,208 DEBUG Binder:412 - Mapped property: rcDId -> RC_D_ID, type: long
10:46:17,271 DEBUG Binder:1270 - Mapped collection key: RC_C_ID, index: RC_D_ID, one-to-many: testcase.testcase5.Recipient
10:46:17,271 DEBUG Binder:1258 - Second pass for collection: testcase.testcase5.Customer.responses
10:46:17,286 INFO Binder:1083 - Mapping collection: testcase.testcase5.Customer.responses -> RESPONSE
10:46:17,302 DEBUG Binder:412 - Mapped property: rsId -> RS_ID, type: long
10:46:17,333 DEBUG Binder:412 - Mapped property: rsType -> RS_TYPE, type: integer
10:46:17,411 DEBUG Binder:1270 - Mapped collection key: RS_C_ID, index: RS_ID, RS_TYPE, one-to-many: testcase.testcase5.Response
10:46:17,427 DEBUG Binder:1258 - Second pass for collection: testcase.testcase5.Customer.samplingResults
10:46:17,427 INFO Binder:1083 - Mapping collection: testcase.testcase5.Customer.samplingResults -> SAMPLING_RESULT
10:46:17,443 DEBUG Binder:412 - Mapped property: srDId -> SR_D_ID, type: long
10:46:17,505 DEBUG Binder:1270 - Mapped collection key: SR_C_ID, index: SR_D_ID, one-to-many: testcase.testcase5.SamplingResult
10:46:17,521 DEBUG Binder:1258 - Second pass for collection: testcase.testcase5.Customer.subscriptions
10:46:17,521 INFO Binder:1083 - Mapping collection: testcase.testcase5.Customer.subscriptions -> SUBSCRIPTION
10:46:17,536 DEBUG Binder:412 - Mapped property: subDId -> S_D_ID, type: long
10:46:17,552 DEBUG Binder:412 - Mapped property: subLId -> S_L_ID, type: long
10:46:17,583 DEBUG Binder:412 - Mapped property: subType -> S_TYPE, type: long
10:46:17,646 DEBUG Binder:1270 - Mapped collection key: S_C_ID, index: S_D_ID, S_L_ID, S_TYPE, one-to-many: testcase.testcase5.Subscription
10:46:17,661 DEBUG Binder:1258 - Second pass for collection: testcase.testcase5.List.listMembers
10:46:17,661 INFO Binder:1083 - Mapping collection: testcase.testcase5.List.listMembers -> LIST_MEMBER
10:46:17,677 DEBUG Binder:1270 - Mapped collection key: LM_L_ID, one-to-many: testcase.testcase5.ListMember
10:46:17,693 INFO Configuration:573 - processing one-to-one association property references
10:46:17,708 INFO Configuration:598 - processing foreign key constraints
10:46:17,724 DEBUG Configuration:608 - resolving reference to class: testcase.testcase5.Customer
10:46:17,724 DEBUG Configuration:608 - resolving reference to class: testcase.testcase5.List
10:46:17,740 DEBUG Configuration:608 - resolving reference to class: testcase.testcase5.Customer
10:46:17,755 DEBUG Configuration:608 - resolving reference to class: testcase.testcase5.Customer
10:46:17,771 DEBUG Configuration:608 - resolving reference to class: testcase.testcase5.Customer
10:46:17,786 DEBUG Configuration:608 - resolving reference to class: testcase.testcase5.Customer
10:46:18,115 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.SQLServerDialect
10:46:18,130 INFO SettingsFactory:62 - Use outer join fetching: true
10:46:18,255 INFO DBCPConnectionProvider:56 - DBCP using driver: com.inet.tds.TdsDriver at URL: jdbc:inetdae7a:192.168.0.19:1433?database=vfav4_testcase5
10:46:18,286 INFO DBCPConnectionProvider:57 - Connection properties: {user=sa, password=password}
10:46:18,693 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
No error message, just hang. Can someone give me some directions on how to solve this problem?? This is the first time that I test on SQL server 2000, I am sure that I have done something wrong on configuration, if someone can point out my mistake that would be wonderful. Thanks.
Vivian Fonger
|