This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

About Named Queries

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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??
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

What is the class name?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic