0
合併一個LONGBLOB對象時棧是:堆內存在MySQL
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at org.hibernate.type.ByteArrayBlobType.deepCopy(ByteArrayBlobType.java:76)
at org.hibernate.type.ByteArrayBlobType.replace(ByteArrayBlobType.java:189)
at org.hibernate.type.AbstractType.replace(AbstractType.java:177)
at org.hibernate.type.TypeFactory.replace(TypeFactory.java:538)
at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:429)
at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:231)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:170)
at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:714)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:696)
at org.hibernate.engine.CascadingAction$6.cascade(CascadingAction.java:268)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192)
at org.hibernate.engine.Cascade.cascade(Cascade.java:153)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454)
at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:230)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:170)
at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:714)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:696)
at org.hibernate.engine.CascadingAction$6.cascade(CascadingAction.java:268)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192)
at org.hibernate.engine.Cascade.cascade(Cascade.java:153)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454)
at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:230)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:170)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:81)
at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:704)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:688)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:692)
at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:228)
這是一個有點難以做出了巨大的代碼量來描述這個問題,但我會盡量解釋什麼我有:
我有一個對象A
有一個對象B
是,事實上,一個xml
文件保存在Mysql
分貝爲LONGBlob
上foreign key
。
因此,當我嘗試到merge
(通過hibernate
)對象A
錯誤appreas。
我與eclipse
改變JVM
的內存參數嘗試:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms256m
-Xmx1024m
我想我已經解釋了我的問題
您的應用程序是運行在tomcat容器還是隻運行一個java應用程序? –
在一個運行在elipse上的java應用程序中 –