Hi,
I have this exception when upgrade from hibernate 4.0.1Final to 4.2.3Final (actually it happens for all version from 4.1.6):
16:46:19,946 ERROR [stderr] (ajp--0.0.0.0-8009-1) javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
16:46:19,948 ERROR [stderr] (ajp--0.0.0.0-8009-1) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
16:46:19,949 ERROR [stderr] (ajp--0.0.0.0-8009-1) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
16:46:19,959 ERROR [stderr] (ajp--0.0.0.0-8009-1) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:275)
......
Caused by: java.sql.SQLException: ORA-00904: "PROCESSWIT0_"."SUBSCR_ID": invalid identifier
This have worked before. I think the issue happens because we use inheritance:
Code:
@Entity
@Table(name="PROCESS_WITH_ACTION")
public abstract class ProcessWithAction extends SimpleProcess {...}
@MappedSuperclass
public class SimpleProcess extends BusinessProcess {...}
@Entity
@Table(name = "PROCESS")
@Inheritance(strategy=InheritanceType.JOINED)
public abstract class BusinessProcess extends Identifiable {...}
@MappedSuperclass
public abstract class Identifiable implements Serializable, IValidatable {
@ManyToOne(optional=false, fetch = FetchType.LAZY)
@JoinColumn(name="SUBSCR_ID", insertable=false, updatable=false, nullable=false)
private Subscriber subscriber;
...
}
So when I query for the list of ProcessWithAction by using getResultList() that exception happens. I also try to change inheritance strategy to SINGLE_TABLE and TABLE_PER_CLASS, but all of them do not work as before (version 4.0.1Final).
I do not have any ideas to fix it. Could you please give me some advices.
Thanks