0

I am working on application and in one page i have been fetching images from DB and i am not able to get the images in the front end but the page is loading and showing other details. I am using was liberty profile server for this application. Could you please suggest me regarding this problem. please find the error below.

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
GrandPa
  • 484
  • 9
  • 28
  • 1
    Possible duplicate of http://stackoverflow.com/questions/22659970/lob-is-closed-errorcode-4470-sqlstate-null – Magic Wand Sep 15 '14 at 09:31
  • Hi @MagicWand.Thank you somuch for going into my question.I have seen that link before posting question.My server configuration is follows: . Where should i add "progressivesteaming=2" in server.xml? – GrandPa Sep 15 '14 at 09:57

1 Answers1

1

According to Liberty profile Configuration elements, this property can be added like this:

<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>
Magic Wand
  • 1,572
  • 10
  • 9
  • Hi @Magic Wand,Thank very very much for your help.I also added few more configuration elements i.e "driverType="4" fullyMaterializeLobData="true" fullyMaterializeInputStreams="true" progressiveStreaming="2" progresssiveLocators="2" ".Now I am getting images in the browser partillay .In my application there are multiple tabs which will load different images on clicking of tabs.But some times images are failing to load if we go to difeerent tabs.Any how,the exsting setup is enough to work on some image issues.Thank a lot for you help. – GrandPa Sep 17 '14 at 08:52