1. when struts1.2 + hibernate3.1 + spring2.0 is integrated, if the variable name is not standardized during injection, for example, scarruntime, spring reports the error: Error setting property values; Nested exception is Org. springframework. beans. notwritablepropertyexception: Invalid property 'clusters' of Bean class [COM. kingtoon. count. struts. action. countaction]: bean property 'scaded' is not writable or has an invalid setter method. did you mean 'scade '?
Solution: Change the volume name-> seccartid
2. This error occurs when Tomcat is started. ioexception while loading persisted sessions: Java. Io. eofexception
Solution: Find sessions. Ser and other files with the SER Suffix in the work directory under the tomcat installation directory and delete them. Restart tomcat to OK.
3. Unable to find the action for SSH integration
Reference: http://topic.csdn.net/u/20071003/17/c45495ce-e59a-45ad-a703-8ba42d4db8b1.html
4. javax. servlet. jsp. jspexception: You must specify exactly one of SRC, srckey, page, or pagekey
The cause of this error is very simple, mainly because I used to and later wanted to change to struts <HTML: IMG/> but I shut down without filling in the properties. The next day I found an error and found it slowly. delete the struts tag.
5. When configuring one-to-multiple bidirectional associations in the ing file, if some attributes are missing, an error will be reported when Tomcat is started:
Org. springframework. beans. factory. beancreationexception: Error creating bean with name 'sessionfactory 'defined in servletcontext resource [/WEB-INF/config/applicationcontext. XML]: Invocation of init method failed; Nested exception is Org. hibernate. mappingexception: repeated column in mapping for entity: COM. ISS. mycar. po. onlineqa column: consultant_id (shocould be mapped with insert = "false" update = "false ")
Caused:
Org. hibernate. mappingexception: repeated column in mapping for entity: COM. ISS. mycar. po. onlineqa column: consultant_id (shocould be mapped with insert = "false" update = "false ")
At org. hibernate. Mapping. persistentclass. checkcolumnduplication (persistentclass. Java: 652)
Solution: Add insert = "false" update = "false" in the <allow-to-one> tag of the ing file.
6. Exception executing batch:
Org. hibernate. stalestateexception: Batch update returned unexpected row count from Update [0]; actual row
Count: 0; expected: 1
At org. hibernate. JDBC. Expectations $ basicexpectation. checkbatched (expectations. Java: 61)
At org. hibernate. JDBC. Expectations $ basicexpectation. verifyoutcome (expectations. Java: 46)
At org. hibernate. JDBC. batchingbatcher. checkrowcounts (batchingbatcher. Java: 68)
This exception occurs because the IDs in my MySQL database are self-increasing, but the ID is specified when I insert an object, so an error is returned!
The saveorupdate method of Hibernate is used to save the instance. The saveorupdate method requires that save be executed only when the ID is null, and update be executed in other cases. When saving the instance, it is added, but your ID is not null, So update is used, but there is no primary key-related value in the database, so an exception occurs.
Solution: No ID is specified for the database to be automatically added.
6. java. Lang. illegalargumentexception: argument Type Mismatch
This error is mainly caused by mismatch of the page data type corresponding to the data in actionform. It took me a few hours to find 555555
Solution: Change the type in actonform to the type corresponding to the page.
7. javax. servlet. servletexception: org. hibernate. hibernateexception: No hibernate session bound to thread, and configuration does not allow creation of Non-transactional one here
This is because I use this. gethibernatetemplate (). getsessionfactory (). getcurrentsession () to generate a session.
Later, I changed this sentence to this. gethibernatetemplate (). getsessionfactory (). opensession!