-->
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: Lazy loading of @Lob property
PostPosted: Wed Mar 17, 2010 4:41 am 
Newbie

Joined: Fri Jan 22, 2010 1:51 pm
Posts: 4
Hi,
I use JPA(Hibernate implmentation).
I use Hibernate Annotations 3.4.0,Hibernate Commons Annotations 3.1.0.GA,Hibernate EntityManager 3.4.0.GA,Hibernate3(hibernate-core) (3.3.0 SP1)
I have a class News.java that has @Lob property ,and i want to load lazy this property.My property is something like this :
Code:
@Lob
@Basic(fetch = FetchType.LAZY)
public String getTitle() {
        return title;
       }

If i use the following Ant task to instrument property to lazy load
Code:
<project name="Samples" default="testAll" basedir=".">
<property name="librarydir" value="${basedir}/lib"/>
    <path id="libraries">
        <fileset dir="${librarydir}">
            <include name="*.jar"/>
        </fileset>
    </path>
<target name="instrument">
    <taskdef name="instrument"
             classname="org.hibernate.tool.instrument.cglib.InstrumentTask"
             classpathref="libraries"/>
    <instrument verbose="true">
        <fileset dir="${basedir}">
    <include name="News.class"/>
       </fileset>
    </instrument>
</target>
</project>

And then deploy apps i got the following exception:
Code:
Caused by: org.hibernate.MappingException: Could not determine type for: org.hibernate.repackage.cglib.transform.impl.InterceptFieldCallback, at

table: News, for columns: [org.hibernate.mapping.Column(interceptFieldCallback)]
        at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:292)
        at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:276)
        at org.hibernate.mapping.Property.isValid(Property.java:207)
        at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:458)
        at org.hibernate.mapping.RootClass.validate(RootClass.java:215)
        at org.hibernate.cfg.Configuration.validate(Configuration.java:1135)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1320)
        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)


Please help me,i really do not know what i must do?I also googling but do not find any solution.

Khosro.


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.