Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] DDL generation woes (again)

Hi, James, indeed, the table name is nowhere to be found.

In addition, I can run this build several times in a row without changing anything, and sometimes it works, and sometimes it does not.

There are no TransformationMappings.

I hope this helps.

Best,
Laird

On Tue, Sep 29, 2009 at 10:14 AM, James Sutherland <jamesssss@xxxxxxxxx> wrote:

For some reason the type for the column is null, so was not able to be
determined.  Do you have any mapped fields of type Object or that use a
TransformationMapping?

Without the mapping causing the issue, the issue is difficult to determine.
You may want to try putting a break-point in to find what field/table/class
is causing the issue an include its mappings.  Or if you have an Oracle
support contract, you may wish to contact Oracle support.

The error message should include the field/table though, so please log a bug
for this.

Also, if you have not done so, you may wish to try the latest build, to see
if the issue has been fixed.


ljnelson wrote:
>
> On Thu, Sep 24, 2009 at 10:11 AM, James Sutherland
> <jamesssss@xxxxxxxxx>wrote:
>
>> Very odd, could you include the full exception stack trace.
>
>
> Here's the full stack (stand back):
>
> Exception Description: The Java type [null] is not a valid database type.
>     at
> org.eclipse.persistence.exceptions.ValidationException.javaTypeIsNotAValidDatabaseType(ValidationException.java:1172)
>     at
> org.eclipse.persistence.tools.schemaframework.FieldDefinition.appendDBString(FieldDefinition.java:137)
>     at
> org.eclipse.persistence.tools.schemaframework.TableDefinition.buildCreationWriter(TableDefinition.java:306)
>     at
> org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition.createOnDatabase(DatabaseObjectDefinition.java:81)
>     at
> org.eclipse.persistence.tools.schemaframework.SchemaManager.createObject(SchemaManager.java:187)
>     at
> org.eclipse.persistence.tools.schemaframework.SchemaManager.replaceObject(SchemaManager.java:882)
>     at
> org.eclipse.persistence.tools.schemaframework.TableCreator.replaceTablesAndConstraints(TableCreator.java:297)
>     at
> org.eclipse.persistence.tools.schemaframework.TableCreator.replaceTables(TableCreator.java:260)
>     at
> org.eclipse.persistence.tools.schemaframework.SchemaManager.replaceDefaultTables(SchemaManager.java:944)
>     at
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.createOrReplaceDefaultTables(EntityManagerFactoryProvider.java:78)
>     at
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.writeDDLToDatabase(EntityManagerFactoryProvider.java:286)
>     at
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.generateDDL(EntityManagerFactoryProvider.java:115)
>     at
> org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:260)
>     at
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111)
>     at
> org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163)
>
>
>
>>  Also if you can
>> narrow it down to which class/mappings are causing the issue, please
>> include
>> these.
>>
>
> It (a) is not reported and (b) doesn't seem to matter.  Additionally,
> since
> the failures happen sporadically, it's impossible to tell reliably which
> classes have caused the problem.
>
> I can say that I make heavy use of columnDefinition, length and nullable
> in
> my @Column annotations, and there are all sorts of problems with these in
> general.  For example, placing a columnDefinition on a @Column annotation
> that is used to annotate an @Id column fails.  I also tend to redundantly
> specify lengths in both the length attribute and the columnDefinition.
> For
> example, I might annotate a column like this:
>
> @Column(name = "frob", length = 4, columnDefinition = "CHAR(4)", nullable
> =
> false)
> private String foobar;
>
> ...since it is important that the DDL that results be of type CHAR, not
> VARCHAR, which is the default.  I haven't found a way to specify the
> database type without also including the length in the columnDefinition
> fragment.  This snippet (above) works fine in Hibernate and OpenJPA.
>
> Anyhow, in general, removing these attributes tends to improve things (but
> not definitively solve the problem).
>
> About the only thing I could do is zip up my project (which is somewhere
> between small and large) and send it your way.
>
> Best,
> Laird
>
>


View this message in context: http://www.nabble.com/DDL-generation-woes-%28again%29-tp25548248p25663834.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top