Tuesday, November 20, 2012

Re: java.sql.SQLException: Table 'myschema.EVENT doesn't exist

I was able to resolve the issue by adding the @Table annotation on the entity and specifying the name attribute of the entity class in all lower case. It was also necessary for me to issue and ALTER TABLE command in the SQL Console to specify the AUTO_INCREMENT option on the id columns of my entities.

HTH someone else.

-Tony

On Friday, November 16, 2012 10:46:41 PM UTC-6, Tony Piazza wrote:
So I am trying to test my new app locally using GPE with JPA configured to use my Cloud SQL instance.When I try running it I get the following exception:

[EL Info]: 2012-11-16 22:33:53.613--ServerSession(1682847419)--EclipseLink, version: Eclipse Persistence Services - 2.4.1.v20121003-ad44345
[EL Info]: connection: 2012-11-16 22:33:55.609--ServerSession(1682847419)--file:/C:/workspace/MyWebApp/war/WEB-INF/classes/_User1 login successful
[EL Warning]: 2012-11-16 22:33:56.668--UnitOfWork(1692389875)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Table 'myschema.EVENT' doesn't exist
Error Code: 1146
Call: SELECT MAX(EVENTDATE) FROM EVENT
Query: ReportQuery(referenceClass=Event sql="SELECT MAX(EVENTDATE) FROM EVENT")


I can execute the same query using the Google APIs Console. I can also see the schema and table using the Data Source Explorer in Eclipse so I know they exist.

Any ideas as to what is wrong?

Thanks in advance for your help.

-Tony

No comments:

Post a Comment