I am performing hibernate jpa batch update and its giving me following error
2015-04-21 15:53:51,907 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (Thread-283 (HornetQ-client-global-threads-462057890)) SQL Error: 0, SQLState: 42P01
2015-04-21 15:53:51,908 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (Thread-283 (HornetQ-client-global-threads-462057890)) ERROR: relation "my_seq_gen" does not exist
I am using postgres database and my ID is auto generated
  @Id
@SequenceGenerator(name="seq-gen",sequenceName="MY_SEQ_GEN"initialValue=205, allocationSize=12)
@GeneratedValue(strategy= GenerationType.SEQUENCE, generator="seq-gen")
@Column(name="\"ID\"",unique=true,nullable=false)
private int id;
This is my batch insert code snippet
getEm().getTransaction().begin();
System.out.println("transaction started--------------");
try {   
    for (Receipt ReceiptEntity : arrReceiptEntity) {
            getEm().persist(ReceiptEntity);
    }
    getEm().getTransaction().commit();
    System.out.println("commited");
} catch (Exception exception) {
    System.out.println("error----------------------------------------------------------------------");
    if(getEm().getTransaction().isActive())
        getEm().getTransaction().rollback();
    LOG.error(exception);
} finally {
    getEm().flush();
    getEm().clear();
    getEm().close();
}
I have added the following property in persistence.xml
         <property name="hibernate.id.new_generator_mappings" value="true"/>
Please suggest what i am doing wrong.
 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    