File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity not saving-Need help

 
Sharmila Punde
Ranch Hand
Posts: 133
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
Please take look at following Entity which compiles fine. Users table exists into schema 'app'.
I am using glassfish 3.0.1, Eclipse Persistence Services - 2.0.1 as provider, javadb


The code in servlet which is compiled -


The code in tracker bean as-


When servlet code is executed i get following error
Internal Exception: java.sql.SQLSyntaxErrorException: 'USER_ID' is not a column in table or VTI 'APP.USERS'.
Error Code: -1
Call: INSERT INTO app.users (user_id, username, category, password) VALUES (?, ?, ?, ?)
bind => [1, somename, 4, passsomeone]
Query: InsertObjectQuery(examples.entities.User[id=1, somename, passsomeone, 4])


What is problem, why i am getting this exception?

Thanks
 
Sharmila Punde
Ranch Hand
Posts: 133
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
It is solved, i can save that entity. There were two databases in my machine. One was installed
for NetBeans IDE 6.9.1, another was installed by me in /root/. I changed the port and now connected
to right database.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic