I need to build a business web app which will update an existing relational database (designed by others of which I don’t have permission to create tables). So this is what I have done so far.
- Reverse engineered the database and placed those entities into a persistence unit called “default”.
- Within another database that I have full control over, I have build the standard CUBA tables, etc. I called this persistence unit “cuba”. I have listed all the CUBA entities in the “cuba” persistence unit.
- I have added spring-instrument and spring-instrument-tomcat jar files to ${CATALINA_HOME}/lib
I can now start the app without any exceptions in the log, and then when I attempt to log in (admin/admin) I get the following exception
Caused by: org.eclipse.persistence.exceptions.JPQLException:
Exception Description: Problem compiling [select u from sec$User u where u.loginLowerCase = ?1 and (u.active = true or u.active is null)].
[14, 22] The abstract schema type 'sec$User' is unknown.
[31, 47] The state field path 'u.loginLowerCase' cannot be resolved to a valid type.
[58, 66] The state field path 'u.active' cannot be resolved to a valid type.
[77, 85] The state field path 'u.active' cannot be resolved to a valid type.
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildException(HermesParser.java:155) ~[eclipselink-2.6.1.cuba7.jar:2.6.1.cuba7]
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.validate(HermesParser.java:347) ~[eclipselink-2.6.1.cuba7.jar:2.6.1.cuba7]
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.populateQueryImp(HermesParser.java:278) ~[eclipselink-2.6.1.cuba7.jar:2.6.1.cuba7]
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildQuery(HermesParser.java:163) ~[eclipselink-2.6.1.cuba7.jar:2.6.1.cuba7]
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:143) ~[eclipselink-2.6.1.cuba7.jar:2.6.1.cuba7]
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:116) ~[eclipselink-2.6.1.cuba7.jar:2.6.1.cuba7]
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:102) ~[eclipselink-2.6.1.cuba7.jar:2.6.1.cuba7]
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:86) ~[eclipselink-2.6.1.cuba7.jar:2.6.1.cuba7]
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1618) ~[eclipselink-2.6.1.cuba7.jar:2.6.1.cuba7]
... 72 common frames omitted
Any suggestions?
Thanks