gpt4 book ai didi

java - 读取图像数据时出错 :SqlException: [jcc][10120][11936][4. 11.77] 无效操作 : Lob is closed. ERRORCODE=-4470,SQLSTATE=null

转载 作者:行者123 更新时间:2023-12-01 12:32:18 25 4
gpt4 key购买 nike

我正在开发应用程序,在一个页面中我一直在从数据库获取图像,但我无法在前端获取图像,但页面正在加载并显示其他详细信息。我为此应用程序使用的是 liberty 配置文件服务器。您能否就这个问题向我提出建议。请找出下面的错误。

ERROR CustomRequestCycle - Unexpected exception
org.apache.wicket.WicketRuntimeException: Error while reading image data
at org.apache.wicket.markup.html.image.resource.BlobImageResource.getImageData (BlobImageResource.java:102)
at org.apache.wicket.markup.html.image.resource.DynamicImageResource$1.getData(DynamicImageResource.java:194)



Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][10120][11936][4.11.77] Invalid operation:

Lob is closed. ERRORCODE=-4470, SQLSTATE=null
at com.ibm.db2.jcc.am.gd.a(gd.java:660)
at com.ibm.db2.jcc.am.gd.a(gd.java:60)
at com.ibm.db2.jcc.am.gd.a(gd.java:94)
at com.ibm.db2.jcc.am.ie.c(ie.java:67)
at com.ibm.db2.jcc.am.je.v(je.java:203)
at com.ibm.db2.jcc.am.je.getBinaryStream(je.java:107)
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.hibernate.engine.jdbc.SerializableBlobProxy.invoke(SerializableBlobProxy.java:74)
at $Proxy68.getBinaryStream(Unknown Source)
at org.apache.wicket.markup.html.image.resource.BlobImageResource.getImageData(BlobImageResource.java:93)
... 55 more

最佳答案

根据Liberty profile Configuration elements ,这个属性可以这样添加:

<library id="DB2JCC4Lib">
<fileset dir="${wlp.install.dir}/lib"
includes="db2jcc.jar db2jcc_license_cisuz.jar db2jcc_license_cu.jar"/>
</library>
<dataSource id="db2_SUD" jndiName="jdbc/U_SUD">
<jdbcDriver libraryRef="DB2JCC4Lib"/>
<properties.db2.jcc databaseName="DB2TEST" password="YYYYY" portNumber="20025"
serverName="xyxyxyxxyx" user="XXXXX" progressiveStreaming="2"/>
</dataSource>

关于java - 读取图像数据时出错 :SqlException: [jcc][10120][11936][4. 11.77] 无效操作 : Lob is closed. ERRORCODE=-4470,SQLSTATE=null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25843805/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com