#13 OutOfMemoryError accessing BLOB fields

closed
None
5
2002-01-26
2001-10-29
No

Opened a connection to database. Clicked on
table "GRAPHIC_FILE" with following structure:

Name Null? Type
------------------------------- -------- ----
GRAPHIC_ID NOT NULL NUMBER
CODE VARCHAR2(30)
DESCRIPTION VARCHAR2(100)
PATH VARCHAR2(100)
PATH_LOWER VARCHAR2(100)
DATE_ DATE
GRAPHIC_1 BLOB
GRAPHIC_2 BLOB
GRAPHIC_BMP LONG RAW

There are 151 records in the table. The BLOB fields
contain gif files and the LONG RAW contains a 256x256
bmp. After a brief pause, I got the following
exception. It appears that you may be loading and not
releasing BLOB/LONG RAW data.

Maybe some paging or blocking would help. Let me know
if I can help further.

- Russell

*** Begin stack trace *******
Exception occurred during event dispatching:
java.lang.OutOfMemoryError:
at java.io.ByteArrayOutputStream.toByteArray
(ByteArrayOutputStream.java:
155)
at
oracle.jdbc.driver.OracleStatement.getBytesInternal
(OracleStatement.j
ava, Compiled Code)
at
oracle.jdbc.driver.OracleStatement.getStringValue
(OracleStatement.jav
a, Compiled Code)
at
oracle.jdbc.driver.OracleResultSetImpl.getString
(OracleResultSetImpl.
java, Compiled Code)
at
com.bigfoot.colbell.fw.datasetviewer.ResultSetDataSet.n
ext(ResultSetD
ataSet.java, Compiled Code)
at
com.bigfoot.colbell.fw.datasetviewer.DataSetViewer.show
(DataSetViewer
.java, Compiled Code)
at
com.bigfoot.colbell.squirrel.sessionsheet.objectstree.T
ablePanel$Cont
entsViewer.load(TablePanel.java:323)
at
com.bigfoot.colbell.squirrel.sessionsheet.objectstree.T
ablePanel$MyBa
seViewer.load(TablePanel.java:293)
at
com.bigfoot.colbell.squirrel.sessionsheet.objectstree.T
ablePanel.setT
ableInfo(TablePanel.java, Compiled Code)
at
com.bigfoot.colbell.squirrel.sessionsheet.objectstree.T
ableNode.getDe
tailsPanel(TableNode.java:86)
at
com.bigfoot.colbell.squirrel.sessionsheet.ObjectsPanel.
setSelectedObj
ectPanel(ObjectsPanel.java:96)
at
com.bigfoot.colbell.squirrel.sessionsheet.ObjectsPanel.
access$100(Obj
ectsPanel.java:42)
at
com.bigfoot.colbell.squirrel.sessionsheet.ObjectsPanel$
MySelectionLis
tener.valueChanged(ObjectsPanel.java:114)
at javax.swing.JTree.fireValueChanged
(JTree.java:2060)
at
javax.swing.JTree$TreeSelectionRedirector.valueChanged
(JTree.java:235
9)
at
javax.swing.tree.DefaultTreeSelectionModel.fireValueCha
nged(DefaultTr
eeSelectionModel.java:587)
at
javax.swing.tree.DefaultTreeSelectionModel.notifyPathCh
ange(DefaultTr
eeSelectionModel.java:903)
at
javax.swing.tree.DefaultTreeSelectionModel.setSelection
Paths(DefaultT
reeSelectionModel.java:249)
at
javax.swing.tree.DefaultTreeSelectionModel.setSelection
Path(DefaultTr
eeSelectionModel.java:144)
at javax.swing.JTree.setSelectionPath
(JTree.java:977)
at
javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent
(BasicTreeUI.jav
a:2024)
at
javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePr
essed(BasicTre
eUI.java:2568)
at java.awt.AWTEventMulticaster.mousePressed
(AWTEventMulticaster.java:22
0)
at java.awt.Component.processMouseEvent
(Component.java, Compiled Code)
at java.awt.Component.processEvent
(Component.java, Compiled Code)
at java.awt.Container.processEvent
(Container.java, Compiled Code)
at java.awt.Component.dispatchEventImpl
(Component.java, Compiled Code)
at java.awt.Container.dispatchEventImpl
(Container.java, Compiled Code)
at java.awt.Component.dispatchEvent
(Component.java, Compiled Code)
at
java.awt.LightweightDispatcher.retargetMouseEvent
(Container.java, Com
piled Code)
at
java.awt.LightweightDispatcher.processMouseEvent
(Container.java, Comp
iled Code)
at java.awt.LightweightDispatcher.dispatchEvent
(Container.java, Compiled
Code)
at java.awt.Container.dispatchEventImpl
(Container.java, Compiled Code)
at java.awt.Window.dispatchEventImpl
(Window.java, Compiled Code)
at java.awt.Component.dispatchEvent
(Component.java, Compiled Code)
at java.awt.EventQueue.dispatchEvent
(EventQueue.java, Compiled Code)
at
java.awt.EventDispatchThread.pumpOneEventForComponent
(EventDispatchTh
read.java, Compiled Code)
at
java.awt.EventDispatchThread.pumpEventsForComponent
(EventDispatchThre
ad.java:95)
at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:90)
at java.awt.EventDispatchThread.run
(EventDispatchThread.java:82)

*** End stack trace *******

Discussion

  • Colin Bell

    Colin Bell - 2001-10-30
    • assigned_to: nobody --> colbell
     
  • Colin Bell

    Colin Bell - 2001-11-01

    Logged In: YES
    user_id=233132

    I'm browsing tables under Oracle with CLOB columns without
    any problems but I haven't tried with BLOB or LONG RAW. As
    soon as I get some time I'll give it a go.

    In the meantime you could try passing the -Xmx option to
    Java specifying the maximum size of the memory pool. It may
    be that there is just insufficent memory available.

    E.G. to specify a memory pool of 32MB -Xmx32m

    %JAVA_HOME%\bin\java -Xmx32m -cp etc.....

    Could you also tell me which version of Oracle and which
    JDBC driver and version you are using. Also the version of
    the JDK.

    Thanks
    Col

     
  • Anonymous - 2001-11-05

    Logged In: YES
    user_id=358309

    Sorry. Should have put that in the original post...

    jdk 1.3.1
    Oracle 8.1.7 (with the 8.1.7. thin driver)

    I'll try increasing the memory. By the way, is there
    anything useful that can be displayed about a BLOB or LONG
    RAW, other than the length?

    Hey! Maybe a plug-in here would be nice...to view data in
    binary fields.

     
  • Colin Bell

    Colin Bell - 2001-11-06

    Logged In: YES
    user_id=233132

    <SNIPPETTE>Hey! Maybe a plug-in here would be nice...to view
    data in binary fields.</SNIPPETTE>

    Hang onto that thought. I love a volunteer.

     
  • Colin Bell

    Colin Bell - 2002-01-26
    • status: open --> closed
     
  • Colin Bell

    Colin Bell - 2002-01-26

    Logged In: YES
    user_id=233132

    This has been fixed in CVS and will be in the next release.

     

Log in to post a comment.