java.sql.SQLException: Invalid argument value: java.io.NotSerializableException
Caused by: java.io.NotSerializableException: org.apache.commons.fileupload.DeferredFileOutputStream
解决了:(原因)(raf.getFilename())主要是SQL语句是没有取得图片,(改为:raf.getFilename().getFileName())
java.lang.IllegalArgumentException: argument type mismatch(类型不匹配)
org.hibernate.MappingException: Unsupported cascade style: sava-update
java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I -->jar包重复异常
解决了:是因为在同一个项目里有两个jar包antlr-2.7.2.jar和antlr-2.7.6.jar
由于版本问题有冲突,所以报此异常,只要把版本低的删掉就ok..........
ids for this class must be manually assigned before calling save(): com.fendou.system.po.ConfigPublicAttribute
已解决:意思是在调用save()方法时候要手动添加(assigned )id,
<generator class="assigned" >
所以要把配置文件该如下:
<generator class="sequence" >
<param name="sequence">seq_majorIssueId</param>
</generator>
org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
unique constraint (HRC.SYS_C005274) violated
类型不匹配:
java.lang.IllegalArgumentException: Cannot invoke com.fendou.system.web.actionform.QuestionForm.setConfigMajor on bean class 'class com.fendou.system.web.actionform.QuestionForm' -
argument type mismatch - had objects of type "java.lang.String" but expected signature "com.fendou.system.po.ConfigMajor
主要是页面传过来的是String类型,而QuestionForm接收的是一个对象,所以说类型不匹配
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.fendou.engage.po.ConfigQuestionOption#1]
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL):
Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.
已解决:意思是在调用save()方法时候要执行事务提交
Content is not allowed in prolog.
猫有问题.
org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named '/engage/saveCommonExam' must be of type [org.apache.struts.action.Action],
but was actually of type [com.fendou.engage.web.action.SaveCommonExamTypeAction]
javax.servlet.ServletException: java.lang.NoSuchMethodError: com.fendou.salary.service.IPersonalSalaryService.listPersonalSalaryDetail(Ljava/lang/String;)Ljava/util/List;
本文详细解析了Java开发中遇到的多个常见异常及其解决方案,包括但不限于SQLException、IllegalArgumentException、MappingException、NoSuchMethodError等,并提供了针对配置问题的解决办法,如手动添加id和正确配置事务提交。

5764

被折叠的 条评论
为什么被折叠?



