Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Named Queries

 
pallavi chaudhari
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

In entity bean class I am using ....



its giving exception as: Unknown abstract schema type EMPLOYEE

how to tackle this problem??
 
Francois Nadeau
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Pallavi,

Not sure which entity bean container you are using, but if its hibernate your queries are case sensitive. Which means that your query needs a class named EMPLOYEE.
I am guessing you probably want:



Cheers
 
pallavi chaudhari
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Francois Nadeau wrote:Hello Pallavi,

Not sure which entity bean container you are using, but if its hibernate your queries are case sensitive. Which means that your query needs a class named EMPLOYEE.
I am guessing you probably want:



Cheers


I am not using hibernate.

Using MySQL database...and created table as EMPLOYEE

 
Francois Nadeau
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

What is the class name?
 
Sumit Kumar Tyagi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
view plaincopy to clipboardprint?
@NamedQueries({
@NamedQuery(name = "Employee.findAll", query = "SELECT EMP FROM EMPLOYEE AS EMP")
})

Put Class name in place of table name .
The Entity name which is bound to table EMPLOYEE.
 
pallavi chaudhari
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Francois Nadeau wrote:Hey,

What is the class name?



shall i need to give instead of table name Entity class name there?
 
pallavi chaudhari
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sumit Kumar Tyagi wrote:view plaincopy to clipboardprint?
@NamedQueries({
@NamedQuery(name = "Employee.findAll", query = "SELECT EMP FROM EMPLOYEE AS EMP")
})

Put Class name in place of table name .
The Entity name which is bound to table EMPLOYEE.



ok..thanks i will try this.....
 
pallavi chaudhari
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pallavi chaudhari wrote:
Francois Nadeau wrote:Hey,

What is the class name?



shall i need to give instead of table name Entity class name there?




Thanks.....this solution solved my problems.....thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic