Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Re: No Class Def when more than one Entity (osgi)

Woops figured this out -- well at least I have an error now.

I stepped through it in the debugger, and now I noticed as I step into
my createEntityManagerFactory call , an exception does in fact occur
with a more specific mapping issue.

So lesson learned, exceptions do occur, even though you may not be
aware of them. I don't know why these EclipseLink methods don't throw
exceptions -- are you expecting a general exception handler to pick
them up in a web environment?

I suppose after I call my createEntityManagerFactory I should do a
null check to be sure.

Thanks -- posting to a mailing list is a great way to guarantee you'll
figure out the problem on your own :)

On Mon, Apr 28, 2008 at 3:23 PM, Tim Hollosy <hollosyt@xxxxxxxxx> wrote:
> I'm running into some bizarre behavior on a particular schema.
>
>  I have 2 osgi projects, a UI project and a Model Project, when I
>  reference the model project from the ui project under certain
>  conditions (I'm not sure which yet) I will get a no class def found if
>  I try to access an entity from the model project.
>
>  Example:
>  I generate my entities using dali (I've got maybe 10 tables), launch
>  it, try to just create an entity from the model project: Order order =
>  new Order();
>
>  I'll get a no class def found error, however if I remove all the other
>  entities (and thus some many to one mappings, etc.) and do a new Order
>  = new Order();
>
>  Boom, no problem, no errors.
>
>  This is kind of strange to me since the .class files are being
>  generated in both cases.  The only thing that I can come up with is
>  the class loader is going bonkers somewhere loading one of the
>  entities and short circuits (silently) maybe because of some odd
>  weaving? I haven't been able to figure out exactly at what point this
>  occurs or if it's a specific entity that's causing the problem.
>
>  On a side note, I am unable to verify the entity integrity using Dali
>  JPA tools because of a Dali bug with quoting of Postgres table names
>  not occuring (argh!).
>
>  I do have logging set up on FINEST, and om not seeing anything odd
>  besides the usual warnings about default PK's etc. If anyone with a
>  bit more knowledge of class loading or other black magic could chime
>  in I'd be eternally grateful.
>  --
>  ./tch
>



-- 
./tch


Back to the top