-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Exception when upgrade to Hibernate 4.2.3
PostPosted: Tue Jul 30, 2013 6:33 am 
Newbie

Joined: Wed Nov 16, 2011 4:21 am
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.