尝试创建表的Java模型

时间:2011-12-17 16:36:11

标签: java mysql java-ee-6

我的java模型在我的日志中导致了这些警告......

WARNING: PER01000: Got SQLException executing statement "CREATE TABLE users (id INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL, last_login TIMESTAMP, name VARCHAR(255), PRIMARY KEY (id))": java.sql.SQLException: Table/View 'USERS' already exists in Schema 'APP'.
WARNING: PER01000: Got SQLException executing statement "CREATE TABLE GUEST (ID BIGINT NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))": java.sql.SQLException: Table/View 'GUEST' already exists in Schema 'APP'.
WARNING: PER01000: Got SQLException executing statement "CREATE TABLE content (id INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL, body CLOB(2147483647), user_id INTEGER, PRIMARY KEY (id))": java.sql.SQLException: Table/View 'CONTENT' already exists in Schema 'APP'.
WARNING: PER01000: Got SQLException executing statement "CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(15), PRIMARY KEY (SEQ_NAME))": java.sql.SQLException: Table/View 'SEQUENCE' already exists in Schema 'APP'.
WARNING: PER01000: Got SQLException executing statement "INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0)": java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL111211163034730' defined on 'SEQUENCE'.

我实际上有几个问题......

我已经创建了

userscontent个表,并使用Netbeans生成我的模型。

当从表中创建模型时,它是如何尝试创建表的?

其次,我不知道sequence来自哪里?

0 个答案:

没有答案