求大神帮助,这个问题困扰我好长时间了。

问题描述

java.lang.IllegalStateException:org.hibernate.TransientPropertyValueException:objectreferencesanunsavedtransientinstance-savethetransientinstancebeforeflushing:com.jianfeitech.ordercenter.entity.order.OrderInfo.bindingType->com.jianfeitech.ordercenter.entity.common.CommonDataatorg.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1374)atorg.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1300)atorg.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:266)atcom.jianfeitech.ordercenter.service.impl.order.OrderInfoManagerImpl.findByCcustomerId(OrderInfoManagerImpl.java:1444)atcom.jianfeitech.ordercenter.service.impl.order.OrderInfoManagerImpl$$FastClassBySpringCGLIB$$4436f794.invoke(<generated>)atorg.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)atorg.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:711)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)atorg.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)atorg.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)atorg.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)atorg.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)atcom.jianfeitech.ordercenter.service.impl.order.OrderInfoManagerImpl$$EnhancerBySpringCGLIB$$e49c8d55.findByCcustomerId(<generated>)atcom.jianfeitech.ordercenter.web.order.OrderController.findAllCcustomer(OrderController.java:3132)atcom.jianfeitech.ordercenter.web.order.OrderController$$FastClassBySpringCGLIB$$d8a496fe.invoke(<generated>)atorg.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)atorg.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:640)atcom.jianfeitech.ordercenter.web.order.OrderController$$EnhancerBySpringCGLIB$$38762f6f.findAllCcustomer(<generated>)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atjava.lang.reflect.Method.invoke(Method.java:606)atorg.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)atorg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)atorg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:690)atorg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)atorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)atorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)atorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)atorg.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:707)atorg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:820)atorg.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)atorg.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1324)atcom.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)atcom.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)atorg.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1295)atorg.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)atorg.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)atorg.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)atorg.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)atorg.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)atorg.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)atorg.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)atorg.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)atorg.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)atorg.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)atorg.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)atorg.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)atorg.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1295)atorg.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:177)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)atorg.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1295)atorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)atorg.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1295)atorg.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:440)atorg.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)atorg.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)atorg.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)atorg.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1033)atorg.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:369)atorg.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)atorg.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:967)atorg.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)atorg.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)atorg.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)atorg.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)atorg.eclipse.jetty.server.Server.handle(Server.java:358)atorg.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)atorg.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884)atorg.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938)atorg.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)atorg.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)atorg.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)atorg.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:622)atorg.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)atorg.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)atorg.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)atjava.lang.Thread.run(Thread.java:745)

解决方案

解决方案二:
某一个数据类型转换的问题吧
解决方案三:
findByCcustomerId方法及相关entity类代码贴出来看看估计是保存OrderInfo对象的时候级联保存了其它没有id的entity.
解决方案四:
com.jianfeitech.ordercenter.entity.common.CommonData有问题
解决方案五:
packagecom.jianfeitech.ordercenter.entity.crm;importjavax.persistence.CascadeType;importjavax.persistence.Column;importjavax.persistence.Entity;importjavax.persistence.FetchType;importjavax.persistence.GeneratedValue;importjavax.persistence.GenerationType;importjavax.persistence.Id;importjavax.persistence.ManyToOne;importjavax.persistence.SequenceGenerator;importjavax.persistence.Table;@Entity@Table(name="c_address")@SequenceGenerator(name="caddressSEQ",sequenceName="CADDRESS_SEQUENCE",allocationSize=1)publicclassCaddress{@Id@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="caddressSEQ")privateLongid;//省份@ManyToOne(optional=true,cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)privateCregionprovince;//城市@ManyToOne(optional=true,cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)privateCregioncity;//区县@ManyToOne(optional=true,cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)privateCregionarea;//详细地址@Column(length=200)privateStringfullAddress;//客户信息privateLongccustomerId;publicLonggetId(){returnid;}publicvoidsetId(Longid){this.id=id;}publicCregiongetProvince(){returnprovince;}publicvoidsetProvince(Cregionprovince){this.province=province;}publicCregiongetCity(){returncity;}publicvoidsetCity(Cregioncity){this.city=city;}publicCregiongetArea(){returnarea;}publicvoidsetArea(Cregionarea){this.area=area;}publicStringgetFullAddress(){returnfullAddress;}publicvoidsetFullAddress(StringfullAddress){this.fullAddress=fullAddress;}publicLonggetCcustomerId(){returnccustomerId;}publicvoidsetCcustomerId(LongccustomerId){this.ccustomerId=ccustomerId;}}
解决方案六:
packagecom.jianfeitech.ordercenter.entity.crm;importjavax.persistence.CascadeType;importjavax.persistence.Column;importjavax.persistence.Entity;importjavax.persistence.FetchType;importjavax.persistence.GeneratedValue;importjavax.persistence.GenerationType;importjavax.persistence.Id;importjavax.persistence.ManyToOne;importjavax.persistence.SequenceGenerator;importjavax.persistence.Table;@Entity@Table(name="c_address")@SequenceGenerator(name="caddressSEQ",sequenceName="CADDRESS_SEQUENCE",allocationSize=1)publicclassCaddress{@Id@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="caddressSEQ")privateLongid;//省份@ManyToOne(optional=true,cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)privateCregionprovince;//城市@ManyToOne(optional=true,cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)privateCregioncity;//区县@ManyToOne(optional=true,cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)privateCregionarea;//详细地址@Column(length=200)privateStringfullAddress;//客户信息privateLongccustomerId;publicLonggetId(){returnid;}publicvoidsetId(Longid){this.id=id;}publicCregiongetProvince(){returnprovince;}publicvoidsetProvince(Cregionprovince){this.province=province;}publicCregiongetCity(){returncity;}publicvoidsetCity(Cregioncity){this.city=city;}publicCregiongetArea(){returnarea;}publicvoidsetArea(Cregionarea){this.area=area;}publicStringgetFullAddress(){returnfullAddress;}publicvoidsetFullAddress(StringfullAddress){this.fullAddress=fullAddress;}publicLonggetCcustomerId(){returnccustomerId;}publicvoidsetCcustomerId(LongccustomerId){this.ccustomerId=ccustomerId;}}
解决方案七:
packagecom.jianfeitech.ordercenter.entity.crm;importjavax.persistence.CascadeType;importjavax.persistence.Column;importjavax.persistence.Entity;importjavax.persistence.FetchType;importjavax.persistence.GeneratedValue;importjavax.persistence.GenerationType;importjavax.persistence.Id;importjavax.persistence.ManyToOne;importjavax.persistence.SequenceGenerator;importjavax.persistence.Table;@Entity@Table(name="c_address")@SequenceGenerator(name="caddressSEQ",sequenceName="CADDRESS_SEQUENCE",allocationSize=1)publicclassCaddress{@Id@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="caddressSEQ")privateLongid;//省份@ManyToOne(optional=true,cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)privateCregionprovince;//城市@ManyToOne(optional=true,cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)privateCregioncity;//区县@ManyToOne(optional=true,cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)privateCregionarea;//详细地址@Column(length=200)privateStringfullAddress;//客户信息privateLongccustomerId;publicLonggetId(){returnid;}publicvoidsetId(Longid){this.id=id;}publicCregiongetProvince(){returnprovince;}publicvoidsetProvince(Cregionprovince){this.province=province;}publicCregiongetCity(){returncity;}publicvoidsetCity(Cregioncity){this.city=city;}publicCregiongetArea(){returnarea;}publicvoidsetArea(Cregionarea){this.area=area;}publicStringgetFullAddress(){returnfullAddress;}publicvoidsetFullAddress(StringfullAddress){this.fullAddress=fullAddress;}publicLonggetCcustomerId(){returnccustomerId;}publicvoidsetCcustomerId(LongccustomerId){this.ccustomerId=ccustomerId;}}
解决方案八:
com.jianfeitech.ordercenter.entity.order.OrderInfo.bindingType->com.jianfeitech.ordercenter.entity.common.CommonData你这两个对象是不是哪里关联出问题了。你是不是CommonData时间类型转换出问题了??
解决方案九:
保存之前flush

时间: 2024-11-08 22:26:02

求大神帮助,这个问题困扰我好长时间了。的相关文章

javascript-急!!!!求大神!js中如何把setTimeout的时间写活?

问题描述 急!!!!求大神!js中如何把setTimeout的时间写活? 我这里有一个算法,但是每次调用后会根据不同的需要所耗费的时间不同, 然后我要写一个绑定事件来反复调用这个函数,如果把时间写死,有的算法很快会浪费时间,但是也有的算法会执行不完,如何才能根据不同的需要把算法正好执行完后再执行之后的内容... 解决方案 算法有返回值没有,有的话判断一下,如果执行完成,则再次调用函数. 解决方案二: 虽然不太清楚,你的需求是什么.但是你所说的改变setTimeout的时间来处理你现在所遇到的问题

关于SSH的问题! Could not execute action: /mainaction 求大神支招!困扰5天了,什么方法都用了!!帮帮忙呀!!

问题描述 问题:如下014-9-2714:17:04org.apache.catalina.core.AprLifecycleListenerinit信息:TheApacheTomcatNativelibrarywhichallowsoptimalperformanceinproductionenvironmentswasnotfoundonthejava.library.path:E:anzhuangbaoMyEclipsebin;E:anzhuangbaoMyEclipsemyeclipse

一个ajax最简单的问题困扰了好久啊,求大神帮忙看看,后台是vb.net的

问题描述 一个ajax最简单的问题困扰了好久啊,求大神帮忙看看,后台是vb.net的 前台的ajax是这样的: <script type="text/javascript"> $(function () { $("#button1").click(function () { $.ajax({ type: "post", url: "ajax.aspx/ajaxtext", dataType: "text&

写了个easyui window 可是弹出的窗口老是打不开,被困扰好久和,求大神帮忙,在线等

问题描述 写了个easyui window 可是弹出的窗口老是打不开,被困扰好久和,求大神帮忙,在线等 解决方案 没人在吗?,,毕业设计,,,着急 解决方案二: 唯一标识符 所属类别: 思想政治素质业务能力人文素质 身体素质 评价内容: 评价描述: 提交 取消 解决方案三: 看不见你代码,谁知道 解决方案四: f12看报错没有,弹出的dialog里面有什么内容,是不是你要显示的内容容器设置了style display:none了,要去掉或者用js代码设置为display block 相关文章 e

extjs 页面显示问题,困扰我太多天了,求大神指点

问题描述 extjs 页面显示问题,困扰我太多天了,求大神指点 项目环境:用的是ssm框架,extjs3.0版本. 第一次点击"业绩加办账户"然后点击新建的时候窗口没有问题 关闭"业绩加办账户"之后,在点开这个功能菜单,再点击新建就出现问题了 只能刷新整个页面才能变回正常 我用的是grid和form组合,查询按钮和文本框的代码: applyAccount.gridManager = new Ext.grid.GridPanel({ //title : '客户经理选取

java se-java udp发送端接收端变成问题求大神解答。

问题描述 java udp发送端接收端变成问题求大神解答. 采用了多线程,如果发送端输入的是英文,接收端可以正常接收. 但是如果发送端输入的是中文,接收端无法接收,而且程序会卡.这是怎么回事?代码如下: 主程序代码: public class ChatDemo { public static void main(String[] args) throws IOException { DatagramSocket dss=new DatagramSocket(); DatagramSocket d

sql中怎样在多表联合查询后的表中进行增删改操作,新手求大神详细讲解

问题描述 sql中怎样在多表联合查询后的表中进行增删改操作,新手求大神详细讲解 我在C#的winform的DataGridView中显示联合查询的结果,下面就是4张表的联合查询的语句,我需要在DataGridView显示的表中做删除操作,只需要知道删除的sql语句就行,用存储过程也好,级联删除也好,希望详细,我已经在这个问题上困扰很久了,万分感谢! 解决方案 在做C#桌面程序时,我们通常会遇到删除dataGridview中选中的一和或都多行数据,在网上查了好多方法,有些只能删除dataGridv

跪求大神帮忙解决一个java问题

问题描述 跪求大神帮忙解决一个java问题 Invalid classpath publish/export dependency com.genuitec.runtime.library/com.genuitec.generic_6.0. The associated classpath container cannot be included in the published/exported module. 这个问题到底是啥意思,困扰一天了 解决方案 解决: 不要动eclipse.在控制台

6410 安卓开发板 录音-6410开发板上跑Android 2.1 ,录音出现问题,求大神指点

问题描述 6410开发板上跑Android 2.1 ,录音出现问题,求大神指点 我在6410的开发板上运行 Android 2.1,写了个程序 ,想要进行录音.代码 如下:mediaRecorder = new MediaRecorder(); Toast.makeText(TelListenner.thisnew MedioRecorder()成功"" Toast.LENGTH_SHORT).show(); //myRecAudioFile = File.createTempFile

.net c#开发,弹出的窗口最大化按钮是灰的,不能用,求大神指点

问题描述 .net c#开发,弹出的窗口最大化按钮是灰的,不能用,求大神指点 document.oncontextmenu = new Function("event.returnValue=false;");//禁止右键 document.onselectstart = new Function("event.returnValue=false;");//禁止选择/复制 <asp:Label ID="label1" runat="