Sunday, July 28, 2013

HSQLDB, openJPA, .. nonfatal general error ... org.apache.openjpa.persistence.PersistenceException: invalid schema name



Problem

- short message:
nonfatal general error ... org.apache.openjpa.persistence.PersistenceException: invalid schema name

- full message:
[CREATE TABLE testone.eshop_categories (category_id BIGINT NOT NULL, category_name VARCHAR(70), PRIMARY KEY (category_id))] {stmnt 1548490201 CREATE
TABLE testone.eshop_categories (category_id BIGINT NOT NULL, category_name VARCHAR(70), PRIMARY KEY (category_id))} [code=-4850, state=3F000]



Solution

Depending on the database and how you access it, for instance HSQLDB, the schema shall not be declared.
For instance, change:

@Entity
@Table(name="eshop_categories", schema="testone")
public class Category {

To

@Entity
@Table(name="eshop_categories")
public class Category {

No comments:

Post a Comment

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...