openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gunnar Grim (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OPENJPA-2451) Warnings about existing longvarchar columns being incompatible
Date Tue, 12 Nov 2013 08:07:17 GMT
Gunnar Grim created OPENJPA-2451:
------------------------------------

             Summary: Warnings about existing longvarchar columns being incompatible
                 Key: OPENJPA-2451
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2451
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
    Affects Versions: 2.2.2
         Environment: OpenSUSE 12.3
            Reporter: Gunnar Grim
            Priority: Minor


OpenJPA in Geronimo 4 produces a lot of warnings like these:

2013-11-12 08:46:27,414 WARN  [Schema] Existing column "Description" on table "Project" is
incompatible with the same column in the given schema definition. Existing column:
Full Name: Project.Description
Type: longvarchar
Size: 65535
Default: null
Not Null: false
Given column:
Full Name: Project.Description
Type: varchar
Size: 255
Default: null
Not Null: false

For ordinary varchar columns they can be avoided by specifying length in the @Column annotation,
but for longvarchar it is more problematic. Since different databases have different sizes
for these columns, there is no single correct value for the length attribute if you want a
single EAR to be usable with different database servers.

The workaround in Geronimo is to add the line
  log4j.logger.openjpa.jdbc.Schema=ERROR
to the log4j properties, but that will of course suppress other warnings as well.

One solution could be for OpenmJPA to log mismatching longvarchar, clob, etc, sizes with level
DEBUG instead.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message