This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes java persistence error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "java persistence error" Watch "java persistence error" New topic
Author

java persistence error

Pedro Zuppelli
Greenhorn

Joined: Mar 19, 2012
Posts: 1
Hi! I was trying to measure the impact for changing a fully jdbc application, to one that handles persistence and transaction with spring and hibernate. I've started with some minor impact tests but I'm having an error while running the following command, and I cannot see heads nor tails.
The exception thrown is the following
Caused by: java.sql.SQLException: Unexpected token: SELECT in statement [insert into UserTable (lastLogin, password, username) values (?, ?, ?) select scope_identity()]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)


An the following is the configuration.

persistence.xml


servlet definition file


Tomcat's server.xml


do you have any ideas why is this failing?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java persistence error
 
Similar Threads
JPA + Spring
No unique bean of type [javax.persistence.EntityManagerFactory] is defined: but found 0
JPA /springs ApplicationContext.xml
spring wont inject the entitymanager
appContext.xml for transactionManager