I'm going to deploy my ear file on glassfish but when i try to deploy the ear I get:
2023-11-23T10:46:59.388+0100|Severe: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method 2023-11-23T10:46:59.389+0100|Severe: Exception while invoking class org.glassfish.javaee.full.deployment.EarDeployer prepare method 2023-11-23T10:46:59.389+0100|Severe: Exception while preparing the app 2023-11-23T10:46:59.389+0100|Severe: Exception [EclipseLink-8025] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JPQLException Exception Description: Syntax error parsing the query
The query is a named query and I've tested it with eclipseLink too, in a different project that do not use glassfish (without deploy it on an application server) and it works well;
I cannot figure out what's can be wrong, if the query works well using it dirctely, why it doesn't works when it is deployed on glassfish?
this is the named query
@Entity
@Table(name = "T_EXE_PROC")
@TableGenerator(name = "ExecuProcGenerator", table = "T_SEQ", pkColumnName = "SEQ_COL", valueColumnName = "SEQ_CONTATOR", pkColumnValue = "EXE_PRO_SEQUE", allocationSize = 10, initialValue = 0)
@NamedQueries({
@NamedQuery(name = "ExeProc.findLastExecProcs", query = "SELECT DISTINCT (e.procedure) FROM ExeProc e WHERE e.cdExecProcs IN ( SELECT DISTINCT (e.cdExecProcs) FROM ExeProc e, ExeStep s where s.ExecProc.cdExecProcs = e.cdExecProcs AND s.stat.cdStation=:cdStation and s.oper.ceLogin=:ceLogin) and e.statusExecProc = :statusExecProc and e.procedure.status = 1 order by e.lastModifiedStepTime DESC"),
})
public class ExeProc implements Serializable {
private static final long serialVersionUID = 12348979846545312L;
public static final String FIND_LAST_EXEC_PROC = "ExeProc.findLastExecProcs";
I've used the query in an application java (a simple java project) and it works well; the database is MSSQL
The problem was releted to the version of glassfish, in this version
it works rights, while in this one:
Dosn't work, in other words the Open source edition is not able to do query really complex (as the one in the example);
I know may be no one else in the planet can have the issue I had, the tecnology are very old; But I do not understand why someone took two points away from me!!