This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

CMP EJB - BLOB - VisualAge - Sybase

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am using IBM Visual 3.5.3.
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:
com.ibm.ejs.persistence.EJSPersistenceException: com.ibm.ejs.cm.portability.StaleConnectionException: JZ006: Caught IOException: java.io.IOException: JZ0SM: Unsupported SQL type 2004.; nested exception is:
com.ibm.ejs.cm.portability.StaleConnectionException: JZ006: Caught IOException: java.io.IOException: JZ0SM: Unsupported SQL type 2004.

Any help much appreciated.
Thanks in advance
Steve
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the data type of the property which maps the BLOB column in the data base?
Try using byte[]
It works at my end
Tell me if this works. should you need sample code write to me
regards,
Ashish Saraf

Originally posted by i robot:
Hi all,
I am using IBM Visual 3.5.3.
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:
com.ibm.ejs.persistence.EJSPersistenceException: com.ibm.ejs.cm.portability.StaleConnectionException: JZ006: Caught IOException: java.io.IOException: JZ0SM: Unsupported SQL type 2004.; nested exception is:
com.ibm.ejs.cm.portability.StaleConnectionException: JZ006: Caught IOException: java.io.IOException: JZ0SM: Unsupported SQL type 2004.

Any help much appreciated.
Thanks in advance
Steve

 
It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic