EDIT:
@NamedQueries({
@NamedQuery(name="getOLTsByProcessStateAndAssignee",query="select o from Olt o where o.activityProcessId IN(:procId) order by modifiedtime desc"),
@NamedQuery(name="getOLTsByProcessStateAndAssigneeForSearch",query="select o from Olt o where o.activityProcessId IN(:procId) and o.name like :name order by modifiedtime desc"),
@NamedQuery(name="findOltbyname",query="select o from Olt o where o.name=:oltname and o.jioCenter.id=:jioCenterId"),
})
@XmlRootElement(name="Olt") @Audited @Entity
@Table(name="olt")
public class Olt extends BaseEntity implements Serializable
{
/**
*
*/
private static final long serialVersionUID = 1L;
/*@GeneratedValue(generator="olt_id_gen")
@GenericGenerator(name = "olt_id_gen",
strategy = "com.inn.fttx.model.IntegerSequenceGenerator",
parameters = {
@Parameter(name="sequence" , value="OLT_ID_SEQ")
})
@Id */
@SequenceGenerator(name = "olt_id_SEQ", sequenceName = "olt_id_SEQ", allocationSize=1)
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="olt_id_SEQ")
here I am getting the following exception -
nested exception is org.hibernate.exception.SQLGrammarException: ORA-02289: sequence does not exist
I have seen different threads of coderanch and stackoverflow, what i found:
- the Oracle database is running (Most likely)
- you app is connected to it (Most likely)
- You are connected to the correct database (Maybe/Maybe not)
- There is actually a sequence table called "olt_id_SEQ"
I just pasted this points above, so i can show what I have done already.
But in my Oracle database, I have this sequence and i can perform select with nextval on it.
Please let me know, if trouble is from database side or java? Any suggestion/advice would be greatly appreciated.