java.sql.SQLRecoverableException:加载和存储Blob数据时关闭了连接

时间:2018-08-15 15:45:55

标签: spring hibernate spring-mvc oracle11g blob

每当我尝试将blob图像上传到数据库或从数据库中获取blob图像时,都会出现此警告。

在开始时,向数据库的上载操作正常,但是在停止服务器并重新启动服务器之后,即使上载功能也不起作用。

出什么问题了?如何解决?

控制台

  

错误:HHH000346:托管刷新期间发生错误   [org.hibernate.HibernateException:无法访问Blob流]           2018年8月15日晚上8:58:12 org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl版本           INFO:HHH000010:在批处理版本中,它仍然包含JDBC语句           org.springframework.orm.hibernate5.HibernateSystemException:无法访问Blob流。嵌套异常为   org.hibernate.HibernateException:无法访问Blob流             在org.springframework.orm.hibernate5.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:621)                 在org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)             在org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)             在org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:881)        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)             在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)             在org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)             在       org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)             在java.lang.Thread.run(Thread.java:748)           原因:org.hibernate.HibernateException:无法访问Blob流             在org.hibernate.type.descriptor.java.BlobTypeDescriptor.unwrap(BlobTypeDescriptor.java:138)             在org.hibernate.type.descriptor.java.BlobTypeDescriptor.unwrap(BlobTypeDescriptor.java:33)             在org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3154)             在org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3077)             在org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3457)             在org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)             在org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:599)             在org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:473)             在org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)             在org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)             在org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1437)             在org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:493)             在org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3207)             在org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2413)             在org.springframework.orm.hibernate5.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:609)             ...另外48个           原因:java.sql.SQLRecoverableException:封闭的连接             在oracle.sql.BLOB.getDBAccess(BLOB.java:1071)             在oracle.sql.BLOB.getBinaryStream(BLOB.java:248)             在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处             在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)             在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)             在java.lang.reflect.Method.invoke(Method.java:498)             在org.hibernate.engine.jdbc.SerializableBlobProxy.invoke(SerializableBlobProxy.java:60)             在com.sun.proxy。$ Proxy50.getBinaryStream(未知来源)             在org.hibernate.type.descriptor.java.BlobTypeDescriptor.unwrap(BlobTypeDescriptor.java:117)             ...还有74个

0 个答案:

没有答案