-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate could not validate entity bean
PostPosted: Tue Feb 27, 2007 6:17 am 
Beginner
Beginner

Joined: Tue Jan 17, 2006 6:16 am
Posts: 31
hi all,
i tryed deploy my seam project, but i got an error like this :
Code:
01:49:58,352 INFO  [TableMetadata] table found: USER_MANAGER.USERS
01:49:58,352 INFO  [TableMetadata] columns: [user_id, upd_date, user_name, person_id, reg_user_id, reg_date, user_status, user_pwd]
01:49:58,354 WARN  [ServiceController] Problem starting service persistence.units:ear=MagticomBilling.ear,unitName=MagticomBilling
javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: USER_PWD, expected: blob
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)



after i added this fragment into my persistence.xml file :

Code:
<property name="hibernate.hbm2ddl.auto" value="validate"/>


here is my entity bean :

Code:
@Lob
    @Column(name = "USER_PWD")
    private byte [] userPwd;

    /**
     * Gets the userPwd of this Users.
     * @return the userPwd
     */
    public byte [] getUserPwd() {
        return this.userPwd;
    }
   
    /**
     * Sets the userPwd of this Users to the specified value.
     * @param userPwd the new userPwd
     */
    public void setUserPwd(byte [] userPwd) {
        this.userPwd = userPwd;
    }


and into my oracle database USER_PWD column is raw type.
i generate this entities by hibernate generator.

is there any mistake i did ?

what type of oracle database could i use for byte array?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 27, 2007 7:52 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
a blob?
Or you can write you own user type

_________________
Emmanuel


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

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.