Re: Errors saving to BLOB via ClusterJ
Hi Craig, I've started using the @Lob, but I get this error now upon persisting
16-Mar-2012 3:32:18 PM com.mysql.clusterj.tie.Utility throwError
SEVERE: Error in NdbJTie: returnCode -1, code 839, mysqlCode -1, status 2, classification 3, message Illegal null attribute .
[ERROR] 2012-03-16 15:32:18.842 com.mysql.clusterj.tie - Error in NdbJTie: returnCode -1, code 839, mysqlCode -1, status 2, classification 3, message Illegal null attribute .
I checked my entity and both values are set, not null. So where is this null attribute error coming from?
Code below:
@PersistenceCapable(table="T_SUBSCRIBER_CACHE")
@PrimaryKey(column="F_KEY")
public interface SubscriberCache {
@Column(name="F_KEY")
String getKey();
void setKey(String key);
@Column(name="F_VALUE")
@Lob
byte[] getValue();
void setValue(byte[] value);
}
DB table:
CREATE TABLE `T_SUBSCRIBER_CACHE` (
`F_KEY` VARCHAR(255) NOT NULL,
`F_VALUE` BLOB NOT NULL,
`F_LASTMODIFY_TIME` timestamp DEFAULT NOW() ON UPDATE NOW() NOT NULL,
CONSTRAINT PK_SUBSCRIBER_CACHE PRIMARY KEY (`F_KEY`)
) ENGINE=NDB;