openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Web developer <webautomat...@gmail.com>
Subject Re: HSQLDB sequence enforcing
Date Mon, 17 May 2010 15:15:52 GMT
I use the following external builder for Eclipse:

-Dlog4j.appender.console=org.apache.log4j.ConsoleAppender
-Dopenjpa.Log=log4j -Dlog4j.category.openjpa.Enhance.MetaData=TRACE
-Dlog4j.category.openjpa.jdbc.SQL=TRACE
-Dlog4j.category.openjpa.jdbc.SQLDiag=TRACE
-Dlog4j.category.openjpa.jdbc.JDBC=TRACE
-Dlog4j.category.openjpa.jdbc.Schema=TRACE -classpath
/home/webautomator/openjpa-all-2.0.0-beta3.jar:/home/webautomator/hsqldb.jar:/usr/share/java/log4j-1.2.15.jar
org.apache.openjpa.jdbc.kernel.TableJDBCSeq -p
${project_loc}/src/META-INF/persistence.xml -ConnectionDriverName
org.hsqldb.jdbc.JDBCDriver -ConnectionURL
jdbc:hsqldb:file:/tmp/persist_backend;create=true -a add

Hence that I have to remove -Dlog4j... parameters to get debug output due to
that I still have problem with log4j.

Here is the output:

784  hellojpa  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.HSQLDictionary".
919  hellojpa  INFO   [main] openjpa.Runtime - Creating sequence table.
57  embeddables  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.HSQLDictionary".
108  embeddables  INFO   [main] openjpa.Runtime - Creating sequence table.
131  embeddables  WARN   [main] openjpa.jdbc.Schema - object name already
exists: OPENJPA_SEQUENCE_TABLE in statement [CREATE TABLE
OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL, SEQUENCE_VALUE BIGINT, PRIMARY
KEY (ID))] {stmnt 2058859513 CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID TINYINT
NOT NULL, SEQUENCE_VALUE BIGINT, PRIMARY KEY (ID))} [code=-5504,
state=42504]
org.apache.openjpa.lib.jdbc.ReportingSQLException: object name already
exists: OPENJPA_SEQUENCE_TABLE in statement [CREATE TABLE
OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL, SEQUENCE_VALUE BIGINT, PRIMARY
KEY (ID))] {stmnt 2058859513 CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID TINYINT
NOT NULL, SEQUENCE_VALUE BIGINT, PRIMARY KEY (ID))} [code=-5504,
state=42504]
    at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:257)
    at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:241)
    at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:70)
    at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingStatement.executeUpdate(LoggingConnectionDecorator.java:951)
    at
org.apache.openjpa.lib.jdbc.DelegatingStatement.executeUpdate(DelegatingStatement.java:136)
    at
org.apache.openjpa.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1200)
    at
org.apache.openjpa.jdbc.schema.SchemaTool.createTable(SchemaTool.java:956)
    at
org.apache.openjpa.jdbc.kernel.TableJDBCSeq.refreshTable(TableJDBCSeq.java:665)
    at
org.apache.openjpa.jdbc.kernel.TableJDBCSeq.run(TableJDBCSeq.java:755)
    at
org.apache.openjpa.jdbc.kernel.TableJDBCSeq.run(TableJDBCSeq.java:735)
    at
org.apache.openjpa.jdbc.kernel.TableJDBCSeq$1.run(TableJDBCSeq.java:717)
    at
org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:725)
    at
org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:715)
    at
org.apache.openjpa.jdbc.kernel.TableJDBCSeq.main(TableJDBCSeq.java:712)

Here is my runner configuration (arguments):

-DConnectionDriverName=org.hsqldb.jdbc.JDBCDriver
-DConnectionURL=jdbc:hsqldb:file:/tmp/persist_bacend
-DDynamicEnhancementAgent=false -DRuntimeUnenhancedClasses=unsupported

So, as you can see, the database file would be generated once if no
existence for sequence related tool; being scanned at runtime. So if table
was created - I would find it. But when I connect via database manager:

select * from information_schema.tables;

and result is:


TABLE_CATALOG   <#>TABLE_SCHEMA   <#>TABLE_NAME   <#>TABLE_TYPE   <#>
SELF_REFERENCING_COLUMN_NAME   <#>REFERENCE_GENERATION   <#>
USER_DEFINED_TYPE_CATALOG   <#>USER_DEFINED_TYPE_SCHEMA   <#>
USER_DEFINED_TYPE_NAME   <#>IS_INSERTABLE_INTO   <#>IS_TYPED   <#>
COMMIT_ACTION   <#>PUBLICINFORMATION_SCHEMAADMINISTRABLE_ROLE_AUTHORIZATIONS
VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
APPLICABLE_ROLESVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMAASSERTIONSVIEW*null**null**null**null**null*NONO*null*
PUBLICINFORMATION_SCHEMAAUTHORIZATIONSVIEW*null**null**null**null**null*NONO
*null*PUBLICINFORMATION_SCHEMACHARACTER_SETSVIEW*null**null**null**null**
null*NONO*null*PUBLICINFORMATION_SCHEMACHECK_CONSTRAINT_ROUTINE_USAGEVIEW*
null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
CHECK_CONSTRAINTSVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMACOLLATIONSVIEW*null**null**null**null**null*NONO*null*
PUBLICINFORMATION_SCHEMACOLUMN_COLUMN_USAGEVIEW*null**null**null**null**null
*NONO*null*PUBLICINFORMATION_SCHEMACOLUMN_DOMAIN_USAGEVIEW*null**null**null*
*null**null*NONO*null*PUBLICINFORMATION_SCHEMACOLUMN_PRIVILEGESVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMACOLUMN_UDT_USAGE
VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMACOLUMNS
VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
CONSTRAINT_COLUMN_USAGEVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMACONSTRAINT_TABLE_USAGEVIEW*null**null**null**null**null*NO
NO*null*PUBLICINFORMATION_SCHEMADATA_TYPE_PRIVILEGESVIEW*null**null**null**
null**null*NONO*null*PUBLICINFORMATION_SCHEMADOMAIN_CONSTRAINTSVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMADOMAINSVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMAENABLED_ROLESVIEW*
null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
INFORMATION_SCHEMA_CATALOG_NAMEVIEW*null**null**null**null**null*NONO*null*
PUBLICINFORMATION_SCHEMAJAR_JAR_USAGEVIEW*null**null**null**null**null*NONO*
null*PUBLICINFORMATION_SCHEMAJARSVIEW*null**null**null**null**null*NONO*null
*PUBLICINFORMATION_SCHEMAKEY_COLUMN_USAGEVIEW*null**null**null**null**null*
NONO*null*PUBLICINFORMATION_SCHEMAPARAMETERSVIEW*null**null**null**null**
null*NONO*null*PUBLICINFORMATION_SCHEMAREFERENTIAL_CONSTRAINTSVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
ROLE_AUTHORIZATION_DESCRIPTORSVIEW*null**null**null**null**null*NONO*null*
PUBLICINFORMATION_SCHEMAROLE_COLUMN_GRANTSVIEW*null**null**null**null**null*
NONO*null*PUBLICINFORMATION_SCHEMAROLE_ROUTINE_GRANTSVIEW*null**null**null**
null**null*NONO*null*PUBLICINFORMATION_SCHEMAROLE_TABLE_GRANTSVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMAROLE_UDT_GRANTSVIEW
*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
ROLE_USAGE_GRANTSVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMAROUTINE_COLUMN_USAGEVIEW*null**null**null**null**null*NONO
*null*PUBLICINFORMATION_SCHEMAROUTINE_JAR_USAGEVIEW*null**null**null**null**
null*NONO*null*PUBLICINFORMATION_SCHEMAROUTINE_PRIVILEGESVIEW*null**null**
null**null**null*NONO*null*PUBLICINFORMATION_SCHEMAROUTINE_ROUTINE_USAGEVIEW
*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
ROUTINE_SEQUENCE_USAGEVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMAROUTINE_TABLE_USAGEVIEW*null**null**null**null**null*NONO*
null*PUBLICINFORMATION_SCHEMAROUTINESVIEW*null**null**null**null**null*NONO*
null*PUBLICINFORMATION_SCHEMASCHEMATAVIEW*null**null**null**null**null*NONO*
null*PUBLICINFORMATION_SCHEMASEQUENCESVIEW*null**null**null**null**null*NONO
*null*PUBLICINFORMATION_SCHEMASQL_FEATURESVIEW*null**null**null**null**null*
NONO*null*PUBLICINFORMATION_SCHEMASQL_IMPLEMENTATION_INFOVIEW*null**null**
null**null**null*NONO*null*PUBLICINFORMATION_SCHEMASQL_PACKAGESVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMASQL_PARTSVIEW*null*
*null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMASQL_SIZINGVIEW*
null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
SQL_SIZING_PROFILESVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMASYSTEM_ALLTYPEINFOVIEW*null**null**null**null**null*NONO*
null*PUBLICINFORMATION_SCHEMASYSTEM_BESTROWIDENTIFIERVIEW*null**null**null**
null**null*NONO*null*PUBLICINFORMATION_SCHEMASYSTEM_CACHEINFOVIEW*null**null
**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMASYSTEM_COLUMNSVIEW*null
**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
SYSTEM_CROSSREFERENCEVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMASYSTEM_INDEXINFOVIEW*null**null**null**null**null*NONO*
null*PUBLICINFORMATION_SCHEMASYSTEM_PRIMARYKEYSVIEW*null**null**null**null**
null*NONO*null*PUBLICINFORMATION_SCHEMASYSTEM_PROCEDURECOLUMNSVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMASYSTEM_PROCEDURES
VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
SYSTEM_PROPERTIESVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMASYSTEM_SCHEMASVIEW*null**null**null**null**null*NONO*null*
PUBLICINFORMATION_SCHEMASYSTEM_SEQUENCESVIEW*null**null**null**null**null*NO
NO*null*PUBLICINFORMATION_SCHEMASYSTEM_SESSIONINFOVIEW*null**null**null**
null**null*NONO*null*PUBLICINFORMATION_SCHEMASYSTEM_SESSIONSVIEW*null**null*
*null**null**null*NONO*null*PUBLICINFORMATION_SCHEMASYSTEM_TABLESVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMASYSTEM_TABLETYPES
VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
SYSTEM_TEXTTABLESVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMASYSTEM_TYPEINFOVIEW*null**null**null**null**null*NONO*null
*PUBLICINFORMATION_SCHEMASYSTEM_UDTSVIEW*null**null**null**null**null*NONO*
null*PUBLICINFORMATION_SCHEMASYSTEM_USERSVIEW*null**null**null**null**null*
NONO*null*PUBLICINFORMATION_SCHEMASYSTEM_VERSIONCOLUMNSVIEW*null**null**null
**null**null*NONO*null*PUBLICINFORMATION_SCHEMATABLE_CONSTRAINTSVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMATABLE_PRIVILEGES
VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMATABLES
VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
TRANSLATIONSVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMATRIGGER_COLUMN_USAGEVIEW*null**null**null**null**null*NONO
*null*PUBLICINFORMATION_SCHEMATRIGGER_ROUTINE_USAGEVIEW*null**null**null**
null**null*NONO*null*PUBLICINFORMATION_SCHEMATRIGGER_SEQUENCE_USAGEVIEW*null
**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
TRIGGER_TABLE_USAGEVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMATRIGGERED_UPDATE_COLUMNSVIEW*null**null**null**null**null*
NONO*null*PUBLICINFORMATION_SCHEMATRIGGERSVIEW*null**null**null**null**null*
NONO*null*PUBLICINFORMATION_SCHEMAUSAGE_PRIVILEGESVIEW*null**null**null**
null**null*NONO*null*PUBLICINFORMATION_SCHEMAUSER_DEFINED_TYPESVIEW*null**
null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMAVIEW_COLUMN_USAGE
VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA
VIEW_ROUTINE_USAGEVIEW*null**null**null**null**null*NONO*null*PUBLIC
INFORMATION_SCHEMAVIEW_TABLE_USAGEVIEW*null**null**null**null**null*NONO*
null*PUBLICINFORMATION_SCHEMAVIEWSVIEW*null**null**null**null**null*NONO*
null*PUBLICSYSTEM_LOBSBLOCKSBASE TABLE*null**null**null**null**null*YESNO*
null*PUBLICSYSTEM_LOBSLOB_IDSBASE TABLE*null**null**null**null**null*YESNO*
null*PUBLICSYSTEM_LOBSLOBSBASE TABLE*null**null**null**null**null*YESNO*null
*(86 строки, 38 ms)
So, as you can examine, there is no OPENJPA_SEQUENCE_TABLE in the database.
But runtime says that it is not so(?!). John

2010/5/17 Rick Curtis <curtisr7@gmail.com>

> Should a sequence table have been created? What version of OpenJPA are you
> running? What do the Entities look like that you're using?
>
> ... please post enough information to help us help you. :)
>
> Thanks,
> Rick
>
> On Mon, May 17, 2010 at 5:24 AM, Web developer <webautomator2@gmail.com
> >wrote:
>
> > Hi. I opened that hsqldb datbase with a database manager. It looks like
> the
> > tool reports about creation of a table. But sequence related table is not
> > created. John
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message