I have this stacktrace:
org.hibernate.HibernateException: Unable to access lob stream
at org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor.wrap(PrimitiveByteArrayTypeDescriptor.java:123)
at org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor.wrap(PrimitiveByteArrayTypeDescriptor.java:26)
at org.hibernate.type.descriptor.sql.BlobTypeDescriptor$1.doExtract(BlobTypeDescriptor.java:48)
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:243)
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:329)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:3088)
at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.loadFromResultSet(EntityReferenceInitializerImpl.java:336)
at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.hydrateEntityState(EntityReferenceInitializerImpl.java:263)
at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.readRow(AbstractRowReader.java:107)
at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractRows(ResultSetProcessorImpl.java:157)
at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:94)
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:105)
at org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:87)
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:710)
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:76)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:102)
at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2164)
at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:589)
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:264)
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:585)
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:149)
at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:178)
at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:163)
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:264)
at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:162)
at org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:168)
at de.e_example.web.rm.cmp.FIService.getProjectLocation(FIService.java:53)
at de.e_example.web.rm.cmp.FIService.getProjectTrunkLocation(FIService.java:101)
at de.e_example.web.rm.cmp.FIService.getProjectTrunkLocation(FIService.java:96)
at de.e_example.web.rm.cmp.FIService$$FastClassBySpringCGLIB$$70693b12.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at de.e_example.web.rm.cmp.FIService$$EnhancerBySpringCGLIB$$802cc454.getProjectTrunkLocation(<generated>)
at de.e_example.web.rm.cmp.Builder.buildNow(Builder.java:166)
at de.e_example.web.rm.cmp.Builder.startProcess(Builder.java:146)
at de.e_example.web.rm.cmp.Builder$$FastClassBySpringCGLIB$$63b963f0.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)
at de.e_example.web.rm.cmp.Builder$$EnhancerBySpringCGLIB$$3a56b9ae.startProcess(<generated>)
at de.e_example.web.rm.cmp.RestCallTriggerBuilder$1.afterCommit(RestCallTriggerBuilder.java:33)
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:134)
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:122)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:948)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:785)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:714)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:534)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:305)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at de.e_example.web.rm.RESTEntityModifier$$EnhancerBySpringCGLIB$$be8a15b1.handle(<generated>)
at de.e_example.web.rm.ReSTAPIFilter.doFilter(ReSTAPIFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at de.e_example.web.rm.filter.WebDavFilter.doFilter(WebDavFilter.java:156)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:571)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:609)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.
at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:249)
at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:235)
at org.postgresql.jdbc.AbstractBlobClob.getLo(AbstractBlobClob.java:267)
at org.postgresql.jdbc.AbstractBlobClob.getBinaryStream(AbstractBlobClob.java:114)
at org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor.wrap(PrimitiveByteArrayTypeDescriptor.java:120)
... 82 more
And this is the codeline (52+53):
ProjectGroup group = project.getProjectgroup();
if (group.getOwnedByOrganizations().size() == 1) {
In the Stacktrace the method buildNow has no @Transactional but getProjectTrunkLocation has the @Transactional-annotation.
This is the query that is executed:
SELECT build0_."id" AS id1_8_0_,
build0_."batch_mode" AS batch_mo2_8_0_,
build0_."debug_output" AS debug_ou3_8_0_,
build0_."genuine_repository" AS genuine_4_8_0_,
build0_."interceptor_fk" AS interce12_8_0_,
build0_."logging_timeout_seconds" AS logging_5_8_0_,
build0_."minimum_storage_requirement_megabyte" AS minimum_6_8_0_,
build0_."notify_xmpp" AS notify_x7_8_0_,
build0_."priority" AS priority8_8_0_,
build0_."project_fk" AS project13_8_0_,
build0_."ram_size_100m" AS ram_size9_8_0_,
build0_."svn_account_fk" AS svn_acc14_8_0_,
build0_."thread_count" AS thread_10_8_0_,
build0_."version" AS version11_8_0_,
intercepte1_."id" AS id1_109_1_,
intercepte1_."code_after" AS code_aft2_109_1_,
intercepte1_."code_before" AS code_bef3_109_1_,
intercepte1_."version" AS version4_109_1_,
project2_."id" AS id1_153_2_,
project2_."activated_beta_program" AS activate2_153_2_,
project2_."anonymous_can_create_bugs" AS anonymou3_153_2_,
project2_."bug_prefix" AS bug_pref4_153_2_,
project2_."build_result_log_update_interval_ms" AS build_re5_153_2_,
project2_."name" AS name6_153_2_,
project2_."projectgroup_fk" AS project10_153_2_,
project2_."signature_fk" AS signatu11_153_2_,
project2_."subversion_folder" AS subversi7_153_2_,
project2_."task_prefix" AS task_pre8_153_2_,
project2_."version" AS version9_153_2_,
project2_."version_number_fk" AS version12_153_2_,
projectgro3_."id" AS id1_154_3_,
projectgro3_."name" AS name2_154_3_,
projectgro3_."subversion_folder" AS subversi3_154_3_,
projectgro3_."version" AS version4_154_3_,
signature4_."id" AS id1_167_4_,
signature4_."text" AS text2_167_4_,
signature4_."version" AS version3_167_4_,
versionnum5_."id" AS id1_250_5_,
versionnum5_."version" AS version2_250_5_,
versionnum5_."version_number" AS version_3_250_5_,
svnaccount6_."id" AS id1_222_6_,
svnaccount6_."account_fk" AS account_4_222_6_,
svnaccount6_."username" AS username2_222_6_,
svnaccount6_."version" AS version3_222_6_,
account7_."id" AS id1_0_7_,
account7_."md5_password" AS md2_0_7_,
account7_."md5_salt" AS md3_0_7_,
account7_."name" AS name4_0_7_,
account7_."public_key_cryptography_standard_certificate" AS public_k5_0_7_,
account7_."user_fk" AS user_fk7_0_7_,
account7_."version" AS version6_0_7_,
rmuser8_."id" AS id1_164_8_,
rmuser8_."email_address" AS email_ad3_164_8_,
rmuser8_."imap_fk" AS imap_fk4_164_8_,
rmuser8_."preferred_language_fk" AS preferre5_164_8_,
rmuser8_."version" AS version2_164_8_,
emailaddre9_."id" AS id1_79_9_,
emailaddre9_."domain_fk" AS domain_f3_79_9_,
emailaddre9_."local_name_fk" AS local_na4_79_9_,
emailaddre9_."version" AS version2_79_9_,
emailaddre10_."id" AS id1_80_10_,
emailaddre10_."domain_name" AS domain_n2_80_10_,
emailaddre10_."version" AS version3_80_10_,
emailaddre11_."id" AS id1_81_11_,
emailaddre11_."local_name" AS local_na2_81_11_,
emailaddre11_."version" AS version3_81_11_,
imap12_."id" AS id1_110_12_,
imap12_."default_folder" AS default_2_110_12_,
imap12_."imap_domain" AS imap_dom3_110_12_,
imap12_."password" AS password4_110_12_,
imap12_."protocol" AS protocol5_110_12_,
imap12_."version" AS version6_110_12_,
locale13_."id" AS id1_119_13_,
locale13_."country_fk" AS country_3_119_13_,
locale13_."language_fk" AS language4_119_13_,
locale13_."version" AS version2_119_13_,
country14_."id" AS id1_40_14_,
country14_."iso3166_code" AS iso2_40_14_,
country14_."version" AS version3_40_14_,
systemlang15_."id" AS id1_174_15_,
systemlang15_."iso639_code" AS iso2_174_15_,
systemlang15_."version" AS version3_174_15_
FROM "build" build0_
LEFT OUTER JOIN "intercepter" intercepte1_ ON build0_."interceptor_fk" = intercepte1_."id"
INNER JOIN "project" project2_ ON build0_."project_fk" = project2_."id"
INNER JOIN "project_group" projectgro3_ ON project2_."projectgroup_fk" = projectgro3_."id"
LEFT OUTER JOIN "signature" signature4_ ON project2_."signature_fk" = signature4_."id"
INNER JOIN "version_number" versionnum5_ ON project2_."version_number_fk" = versionnum5_."id"
INNER JOIN "s_v_n__account" svnaccount6_ ON build0_."svn_account_fk" = svnaccount6_."id"
INNER JOIN "account" account7_ ON svnaccount6_."account_fk" = account7_."id"
INNER JOIN "r_m_user" rmuser8_ ON account7_."user_fk" = rmuser8_."id"
INNER JOIN "e_mail_address" emailaddre9_ ON rmuser8_."email_address" = emailaddre9_."id"
INNER JOIN "e_mail_address_domain" emailaddre10_ ON emailaddre9_."domain_fk" = emailaddre10_."id"
INNER JOIN "e_mail_address_local_name" emailaddre11_ ON emailaddre9_."local_name_fk" = emailaddre11_."id"
LEFT OUTER JOIN "i_m_a_p" imap12_ ON rmuser8_."imap_fk" = imap12_."id"
INNER JOIN "locale" locale13_ ON rmuser8_."preferred_language_fk" = locale13_."id"
INNER JOIN "country" country14_ ON locale13_."country_fk" = country14_."id"
INNER JOIN "system_language" systemlang15_ON locale13_."language_fk" = systemlang15_."id"
WHERE build0_."id" = ?
Any idea?