I ran through the JPA tutorial and after a little fiddling it worked locally. A couple of small problems I encountered.
When trying to create the entity for JPA in the Content diagram I got an exception. To get beyond this I needed to include the eclipselink and peristance jar files in the project. I think perhaps I only needed the persistence jar as the exception was related to this.
The second problem I encountered was when deploying the app locally, I got an exception in the app complaining that the schema DEMO did not exist. To get beyond this it seemed necessary to set the DDL generation type to Create Tables and Output Mode to Database in persistence.xml. At least this seemed to work for me, maybe there is a better way.
Now the app deploys and runs on the local server. However when I deploy it to the cloud I get a different problem. The app deplos and starts successfully, but when I try to add an Person I get the following exception:
javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [274]: inserted value too large for column: John
Error Code: 274
Call: INSERT INTO T_PERSON (ID, FIRSTNAME, LASTNAME) VALUES (?, ?, ?)
bind => [3 parameters bound]
Query: InsertObjectQuery(org.persistence.Person@71f9632f)
org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
Anyone else encountered something similar?
Cheers
JohnA