It's not a secret anymore!*
The moose likes Object Relational Mapping and the fly likes About Named Queries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "About Named Queries " Watch "About Named Queries " New topic
Author

About Named Queries

pallavi chaudhari
Ranch Hand

Joined: Jul 02, 2008
Posts: 54
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

Joined: Apr 09, 2009
Posts: 46
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


[url]http://FrancoisNadeau.com[/url]
pallavi chaudhari
Ranch Hand

Joined: Jul 02, 2008
Posts: 54
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

Joined: Apr 09, 2009
Posts: 46
Hey,

What is the class name?
Sumit Kumar Tyagi
Greenhorn

Joined: Sep 14, 2009
Posts: 2
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

Joined: Jul 02, 2008
Posts: 54
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

Joined: Jul 02, 2008
Posts: 54
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

Joined: Jul 02, 2008
Posts: 54
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About Named Queries
 
Similar Threads
Doubt in Entity Relationship Persistence
Hibernate Exception Please Anybody Help Me.
Spring MVC design help
Constructing an arrray of type object reference
return boolean