| Bug #71421 | Setting Blob column fields "Blob handle for column not available" | ||
|---|---|---|---|
| Submitted: | 20 Jan 2014 3:00 | Modified: | 3 Apr 2020 5:42 |
| Reporter: | Mike Cress | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Cluster: Cluster/J | Severity: | S1 (Critical) |
| Version: | 7.3.3 | OS: | Any |
| Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
| Tags: | @Lob, BLOB, ClusterJ, NdbJTie | ||
[26 Apr 2014 14:40]
Robert Gass
Instead of trying to update the blob of an existing object returned from find(), create a new instance to save the updated values using savePersistent(). Just make sure the primary key matches and it should replace the pervious row.
[3 Apr 2020 5:42]
MySQL Verification Team
can't reproduce with any modern version of mccge

Description: Attempting to set a byte[] to a clusterJ interface with @Lob annotation yields: SEVERE: Error in NdbJTie: returnCode , code 4,288, mysqlCode -1, status 2, classification 1, message Blob handle for column not available . This is also seen in 7.3.2. It also occurs whether or not you use session.Transaction.begin() and .commit(). How to repeat: 1.) Create table with "blob not null". 2.) Create ClusterJ interface: @Lob @Column(name="menuBase64EncodedJSON") public byte[] getMenuData(); public void setMenuData( byte[] MenuData ); 3.) Obtain instance of table: Menu_ClusterJ mcj = session.find( Menu_ClusterJ.class, businessID ); //session.deletePersistent( menuCJ ); mcj.getMenuData(); mcj.setMenuData("Hi there!".getBytes( Charset.forName("UTF8") )); session.updatePersistent( mcj ); 4.) Observe error. This also happens if you use .persist(mcm). Attempts to delete object and recreate failed to store data in the database, but this was not thoroughly explored. Suggested fix: Unknown.