File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes VisualAge CMP EJB - BLOB and Sybase Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "VisualAge CMP EJB - BLOB and Sybase" Watch "VisualAge CMP EJB - BLOB and Sybase" New topic

VisualAge CMP EJB - BLOB and Sybase

i robot

Joined: Sep 05, 2001
Posts: 3
Hi all,
Has anybody passed an BLOB to a database via a CMP EJB?
I am trying to do this but I appear to be having a little difficulty.
First what Vap Converter should I use for the column in the Schema setup.
I am using Sybase and I have setup a image type column in my table.
Is this the correct type?
I have setup a CMP BLOB field in my Entity.
public java.sql.Blob data_block;
Setup the Simple Schema mapping, using:
Column Logical Name: data_block
Column PhysicalName: data_block
Column Type: BLOB (2048)
Nulls Allowed: yes
Part of Primary key: no
Converter Class: VapBinaryStreamToSerializableObjectConverter
When I run the Entity in the Tesy Client it falls over with the following error:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: JZ006: Caught IOException: JZ0SM: Unsupported SQL type 2004.; nested exception is: JZ006: Caught IOException: JZ0SM: Unsupported SQL type 2004.

Any help much appreciated.
Thanks in advance
Fred Abbot
Ranch Hand

Joined: Jun 01, 2000
Posts: 300
You have a problem bec. as of now VAP does not support CLOB or BLOB I have written my own converter but it still does not work
I have a PMR(support)open with IBM but they really have nothing to go on but they are working on it
They did send me an efix that did not help
the Issue is the JDBC specification where Oracle says they are compliant and IBM says The way Oracle deals with Clobs is not compliant
Good luck
and if you do figure out how to doit please share it with me
Thank you
I agree. Here's the link:
subject: VisualAge CMP EJB - BLOB and Sybase
It's not a secret anymore!