openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Vorburger (JIRA)" <>
Subject [jira] Commented: (OPENJPA-602) NullPointerException at
Date Wed, 14 May 2008 09:55:55 GMT


Michael Vorburger commented on OPENJPA-602:

-----Original Message-----
From: Michael Vorburger [] 
Sent: mercredi, 30. avril 2008 17:07
Subject: NPE at RelationToManyInverseKeyFieldStrategy when using mappedBy inverse

I'm running into an NPE in RelationToManyInverseKeyFieldStrategy
(copy/pasted below) when using an OneToMany inverse relation with mappedBy and InheritanceType.TABLE_PER_CLASS
in 1.1.0-SNAPSHOT...

Test summary: A common abstract superclass Translatable which has a @OneToManySet<Translation>,
and many subclasses of that like e.g. a SomethingTranslatable, and many more.  The idea is
that mapping should lead to a Translation table holding the items for SomethingTranslatable
and all other superclasses.  Then SomethingTranslatable and many other tables (no physical
Translatable table).  There shouldn't be a join table for each SomethingTranslatable, as it's
a OneToManySet, it doesn't make sense, so the owning side is a @ManyToOne in Translation back
to Translatable.  Granted a physical FK will not be possible in such a schema - accepted,
but it should still be possible to map this?  It works until I use @Inheritance(strategy =
InheritanceType.TABLE_PER_CLASS) on Translatable, with it - boum, NPE.

> NullPointerException at
> -----------------------------------------------------------------------------------------------------
>                 Key: OPENJPA-602
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.0
>            Reporter: Michael Vorburger
>            Priority: Minor
>         Attachments: FullStackTrace-OPENJPA-602.txt,
> The example I'll attach crashes with an NPE when running the mappingtool.
> Caused by: java.lang.NullPointerException
> 	at
> 	at
> 	at org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(
> 	at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(
> 	at org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(
> 	at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(
> 	at org.apache.openjpa.jdbc.meta.ClassMapping.resolveMapping(
> The goal of this JIRA is not (neccessarily) to support the kind of mapping that would
be required for this (which may be hard), but to at least print a clear error and not an NPE...

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message