Joined: Mon Mar 14, 2005 5:34 pm Posts: 1
|
I am new to Hibernate and using version 3 with Websphere 5.1 and Postgres db 7.3.
I got two problems:
1. When hibernate starts up, it could not validate the VendorBean class and generate this error:
org.hibernate.cfg.HbmBinder Could not perform validation checks for component as the class com.palliser.VendorBean was not found
Here is my mapping:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class
name="com.VendorBean"
table="vendor"
>
<composite-id>
<key-property
name="vendornum"
column="vendornum"
type="java.lang.String"
length="10"
>
</key-property>
<key-property
name="vendorname"
column="vendorname"
type="java.lang.String"
length="32"
>
</key-property>
</composite-id>
</class>
</hibernate-mapping>
The class VendorBean and the VendorBean.hmb.xml are both in WEB-INF/class/com/
2. I am setting up a DS in websphere 5.1 and keep gettings
Caused by: Transaction isolation level 4 is not supported. at org.postgresql.jdbc1.AbstractJdbc1Connection.setTransactionIsolation(AbstractJdbc1Connection.java:1124)
Here are my settings in websphere:
JDBC Provider:
classname: org.postgresql.jdbc3.Jdbc3ConnectionalPool
classpath:pg73jdbc3.jar
Datasource:
Name: pgdsd
jndi name: jdbc/postgres
data source helpder classname: com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper
Connection timeout:1800
Max connection:10
....
PropertyName Value Type
serverName servername java.lang.String
databaseName dbname java.lang.String
portNumber 5432 java.lang.Integer
user userid java.lang.String
password password java.lang.String
defaultAutoCommit: false java.lang.Boolean
enable2Phase false java.lang.Boolean
And in my hibernate.cfg.xml:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="postgresSession">
<property name="connection.datasource">java:comp/env/jdbc/pgtest</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="connection.isolation">2</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.WebSphereTransactionManagerLookup</property>
<!-- mapping -->
<mapping resource="com/palliser/VendorBean.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Thanks for any help.
thnguyen
|
|