-->
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.  [ 3 posts ] 
Author Message
 Post subject: hibernate annotation
PostPosted: Wed Feb 21, 2007 7:04 am 
Newbie

Joined: Wed Feb 21, 2007 6:55 am
Posts: 1
hi,
i am using hibernate annotation.but i got error as below during run time.
I have annotation.jar .which is latest.

Exception in thread "main" java.lang.NoSuchFieldError: sqlResultSetMappings
at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(AnnotationConfiguration.java:166)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:254)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1036)
at First.main(First.java:37)

class for that is as below.

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityResult;
import javax.persistence.Id;
import javax.persistence.SqlResultSetMapping;
import javax.persistence.SqlResultSetMappings;
import javax.persistence.Table;

// default package
// Generated Feb 21, 2007 12:26:46 PM by Hibernate Tools 3.1.0.beta5

/**
* User generated by hbm2java
*/
@Entity
@Table(name = "user", catalog = "schema")
public class User implements java.io.Serializable {

// Fields

private int id;

private String username;

// Constructors

/** default constructor */
public User() {
}

/** minimal constructor */
public User(int id) {
this.id = id;
}

/** full constructor */
public User(int id, String username) {
this.id = id;
this.username = username;
}

// Property accessors
@Id
@Column(name = "id")
public int getId() {
return this.id;
}

public void setId(int id) {
this.id = id;
}
@Column(name = "username")

public String getUsername() {
return this.username;
}

public void setUsername(String username) {
this.username = username;
}

}


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 14, 2007 12:17 am 
Newbie

Joined: Wed Nov 30, 2005 11:16 am
Posts: 4
I am facing the same problem as well.

Any suggestions ?

-nazeem


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 14, 2007 12:39 am 
Newbie

Joined: Wed Nov 30, 2005 11:16 am
Posts: 4
Solved the issue by replacing my version of hibernate3.jar that comes packaged with the hibernate tools.

- thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.