You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Lukas Stampf <st...@qse.ifs.tuwien.ac.at> on 2012/06/04 20:01:27 UTC

Issue on table generation

Hi,

I am using openjpa 2.2.0 in conjunction with Apache Karaf. Database is 
the current version of h2.
I have multiple bundles which have their own persistence.xml. They all 
access the same database.

My problem is the following:
1) Sometimes the tables get created correct, so the general 
configuration should be ok.
2) But when it fails, there are tables missing. But it is not a whole 
persistence-unit missing. The unit contains 7 entities, 3 get created 
the remaining 4 get skipped.
3) I dont get any exceptions, turning openjpa logging to trace also 
shows none. All I see is 3 CREATE statements , where should be and 
sometimes are 7.

Anybody an idea what could go wrong? I already tried multiple flags 
(multithreaded=true,....). Nothing worked.

Any suggestion would be appreciated.
Lukas Stampf


Re: Issue on table generation

Posted by Lukas Stampf <st...@qse.ifs.tuwien.ac.at>.
The problem was not from openjpa, it was a bug in the Aries
TransactionManager. 

Thanks for your time,
Lukas Stampf




--
View this message in context: http://openjpa.208410.n2.nabble.com/Issue-on-table-generation-tp7580228p7580772.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Issue on table generation

Posted by Kevin Sutter <kw...@gmail.com>.
What properties are specified in your persistence.xml?  Just from the
information provided, my guess is that some of the tables are already
present and match your entity definitions, so there's no need to modify
anything?  Now, if you are saying that you are starting with a cleanly
created database each time, then something else is out of whack.  The other
common question is how are you enhancing your Entity classes [1]?  If you
are accidentally relying on the sub-classing support for enhancement, then
that could be an issue as well.

Kevin

[1]
http://webspherepersistence.blogspot.com/2009/02/openjpa-enhancement.html

On Mon, Jun 4, 2012 at 1:01 PM, Lukas Stampf <st...@qse.ifs.tuwien.ac.at>wrote:

> Hi,
>
> I am using openjpa 2.2.0 in conjunction with Apache Karaf. Database is the
> current version of h2.
> I have multiple bundles which have their own persistence.xml. They all
> access the same database.
>
> My problem is the following:
> 1) Sometimes the tables get created correct, so the general configuration
> should be ok.
> 2) But when it fails, there are tables missing. But it is not a whole
> persistence-unit missing. The unit contains 7 entities, 3 get created the
> remaining 4 get skipped.
> 3) I dont get any exceptions, turning openjpa logging to trace also shows
> none. All I see is 3 CREATE statements , where should be and sometimes are
> 7.
>
> Anybody an idea what could go wrong? I already tried multiple flags
> (multithreaded=true,....). Nothing worked.
>
> Any suggestion would be appreciated.
> Lukas Stampf
>
>