| Author |
Entity not saving-Need help
|
Sharmila Punde
Ranch Hand
Joined: Dec 26, 2007
Posts: 133
|
|
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
|
Regards, Sharmila.
We will have a future if we save Nature!
|
 |
Sharmila Punde
Ranch Hand
Joined: Dec 26, 2007
Posts: 133
|
|
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.
|
 |
 |
|
|
subject: Entity not saving-Need help
|
|
|