ssh runtime exception summary

1.IllegalArgumentException occurred while calling setter of cn.jwxc.oee.pojo.xxxx.matDatas

It may be that the configuration in hbm.xml is a Set collection and the entity class is a List collection

2.org.hibernate.exception.ConstraintViolationException: Unique constraint violated

This is also a configuration problem. The xml configuration is one-to-one, and the result is repeated when the program is assigned. Solution: Entity relationship analysis error, possibly many-to-one relationship.

3.java.lang.IllegalStateException: No value for key [org.hibernate.impl.SessionFactoryImpl@1b912ed] bound to thread 

以及net.sf.hibernate.HibernateException: Session is closed

The exception should be that in some methods of configured transactions, the session and close methods are used to close the session, resulting in inability to apply the configured transaction management by calling other methods related to the configured transactions. Therefore, use getCurrentSession to create a session. In this case, after the commit, the session will be automatically closed, that is, there is no need for session.close(). If the session created by the openSession method, the session must be closed explicitly, that is, the session.close() method is called. This will cause the above exception.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326316047&siteId=291194637