Re: entities not detected properly in JUnit Test case (OpenJPA 1.2.2)

2010-09-07 Thread Rick Curtis
Marc - I'm willing to bet that your Entities are being loaded before you execute the query. You could try setting *-verbose:class* on your app server jvm and add some debug to your app in the first place where you execute the query. These two pieces of information should help you get a better feel

Re: entities not detected properly in JUnit Test case (OpenJPA 1.2.2)

2010-09-06 Thread Marc Logemann
Hi, thanks for this pretty straight answer. But one more thing that bothers me. Why is this only an issue while testing? When my app is running, i am pretty sure that i dont use the DP_PLZ_DA class somewhere in the code before the worfklow with the query arrives. So why does it work in normal r

Re: entities not detected properly in JUnit Test case (OpenJPA 1.2.2)

2010-09-06 Thread Rick Curtis
>So why does OpenJPA fail on registering Entities? The problem is that when you don't list your entities, OpenJPA doesn't know that the alias 'DP_PLZ_DA' is an Entity until the x.y.z.DP_PLZ_DA class is loaded. If you were to look at an enhanced Entity you would see that OpenJPA adds a static initi

entities not detected properly in JUnit Test case (OpenJPA 1.2.2)

2010-09-06 Thread Marc Logemann
Hi, i am using a pretty straightforward Spring/OpenJPA JUnit Testcase scenario: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/appContext.xml") public class DHLLeitcodeCreatorTest { ... @Test public void getDHLLeitcode() { someBean.superDuperAction()