请问这是啥错误提示 可以知道具体错误位置吗?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了请问这是啥错误提示 可以知道具体错误位置吗?相关的知识,希望对你有一定的参考价值。
javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not insert: [com.itcast.bean.product.ProductInfo]
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:637)
at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:226)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:194)
at $Proxy20.persist(Unknown Source)
at com.itcast.service.base.DaoSupport.save(DaoSupport.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy23.save(Unknown Source)
at junit.test.ProductInfoServiceTest.testSave(ProductInfoServiceTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.hibernate.exception.DataException: could not insert: [com.itcast.bean.product.ProductInfo]
可见com.itcast.bean.product.ProductInfo这个bean有错
org.hibernate.exception.DataException: could not insert:
这个说明你这个bean往数据库里插入数据的时候有错。
请检查这个BEAN相关的插入数据操作 参考技术A 只能看出来是你的插入操作失败了,异常信息指向测试类
原来可以编译过的工程,现在提示 IntelliSense: 应输入声明;而且很多行都有这个错误!不知道是啥原因?
参考技术A 工具-〉选项-〉文本编辑器-〉c/c++->高级-〉禁用自动更新改为:TRUE 参考技术B 没有定义变量直接使用就是这个错误来自:求助得到的回答 参考技术B我也出现了类似问题,贴出了供大家参考:
以上是关于请问这是啥错误提示 可以知道具体错误位置吗?的主要内容,如果未能解决你的问题,请参考以下文章
请问把Removable Storage服务禁止了会有啥后果
C语言不管输入啥,编译之后都是一个错误,零个警告。请问这是怎么回事?
有时我打开网页总是会提示“当前页的脚本发生错误”请问这是怎么回事?
用android studio 老是包这些错误,但是能够运行,请问这是啥问题?怎么解决?
xamarin android开发打包提示 keytool 错误:java.io.filenotfoundexception啥原因