运行程序的时候报错,transaction not sucessfully started or not execute query

启动tomcat6.0运行程序的时候报错

(2405 ms) [http-8081-1] ERROR: org.codehaus.xfire.handler.DefaultFaultHandler#invoke : Fault occurred!
org.hibernate.TransactionException: Transaction not successfully started
	at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:149)
	at com.ws.sf.util.HibernateSessionFactory.rollBackTransaction(HibernateSessionFactory.java:158)
	at com.ws.sf.dao.TZmtRyxxDAO.findAll(TZmtRyxxDAO.java:366)

findAll(),方法去掉事务之后说不能执行查询   don't excute Query

解决办法:

<hibernate-mapping>
    <class name="com.ws.sf.model.TZmtRyxx" table="T_ZMT_RYXX" schema="SXZMUSER">
        <id name="listId" type="java.lang.Long">
            <column name="LIST_ID" />
            <generator class="assigned" />
        </id>
        <property name="employeeid" type="java.lang.String">
            <column name="EMPLOYEEID">
                <comment>人员编号</comment>
            </column>
        </property>

中的schema的“SXZMUSER” 改成你现在用的数据的schema,我的这个问题就解决了···over···

你可能感兴趣的:(运行程序的时候报错,transaction not sucessfully started or not execute query)