Export to GitHub

sqlite-jdbc - issue #30

SQL error or missing database (no such table: SEQUENCE)


Posted on Jul 14, 2012 by Happy Dog

sqlite_sequence - in db table name

[EL Warning]: 2012-07-14 11:59:25.692--ClientSession(1148505631)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (no such table: SEQUENCE)

  • sequenceName="sqlite_sequence",name="comingsofinvoicesongoods" - I try changed places ... nothing @Id @Basic(optional = false) @SequenceGenerator(sequenceName="sqlite_sequence",name="comingsofinvoicesongoods") @GeneratedValue(generator="sqlite_sequence", strategy=GenerationType.AUTO) //@GeneratedValue(strategy=GenerationType.AUTO) @Column(name = "id") private Long id;

Comment #1

Posted on Sep 25, 2012 by Helpful Hippo

I have same exception, but my POJO is mapped a bit different:

@Entity @Table(name = "extrato_lancamento") @EntitySetup(findAllQuery = "select e from ExtratoLancamento e order by e.data, e.id", findByIdQuery = "select e from ExtratoLancamento e where e.id=:id", idFieldName = "id") public class ExtratoLancamento {

@Id
@GeneratedValue
private Integer id;

@EntitySetup is my program's annotation, so I think this could be ignorated.

I think I solved this problem running this on sqlite file:

CREATE TABLE sequence (seq_name text, seq_count integer); insert into sequence (seq_name, seq_count) values ('SEQ_GEN', 10000);

I put 10000 at second command because I'm working on a database with preexisting data. I think on a empty database it could be 0, but I not tested yet.

Comment #2

Posted on Jan 13, 2014 by Massive Bird

Comment deleted

Comment #3

Posted on Jan 13, 2014 by Massive Bird

You managed to solve the problem of this Exception? Because I'm having the same error here

Comment #4

Posted on Jan 14, 2014 by Helpful Hippo

Yes! Theres some time I did this, but I think that query I post can solve this problem.

Status: New

Labels:
Type-Defect Priority-Medium AffectedVersion-3.7.x FixedVersion-NA