-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.type.PrimitiveByteArrayBlobType
PostPosted: Tue Jul 24, 2007 4:17 am 
Newbie

Joined: Mon Jul 16, 2007 6:26 am
Posts: 13
Hi NG!

I'm trying to map a byte[]-property to a DB2-database using:

- hibernate 3.2.4.sp1
- hibernateTools 3.2.0.beta9
- spring-framework-2.0.6

My smart HibernatePlusSpringTotallyEasy-book tells me just to build a class like this:

@Entity
public class Picture {
private byte[] data;

@Lob
public byte[] getData() {
return data;
}

public void setData(byte[] data) {
this.data = data;
}
}

Said and done, the hibernate-tools generate this class-mapping-xml-file:

[...]
<property name="data" type="org.hibernate.type.PrimitiveByteArrayBlobType">
<column name="data" />
</property>
[...]

If I start my Spring-Container, I get the following exception, that I do not understand.

Any help would be really appreciated...

Berti

Caused by: org.hibernate.MappingException: Could not determine type for: org.hibernate.type.PrimitiveByteArrayBlobType, for columns: [org.hibernate.mapping.Column(data)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.Property.isValid(Property.java:185)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:410)
at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1026)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
... 45 more


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.