I will try to be very explicit:
- add a conditional breakpoint on
org.apache.deltaspike.data.impl.criteria.QueryCriteria
      # line 208: add(new JoinBuilder<C, P, E>(criteria, joinType, att));
- condition: att == null

Calling line #45: criteria().join(Squad_.assistants,
where(Member.class).eq(Member_.id, assistant.getId()))

Question: when am I expected to find the SetAttribute att == null?
Remark: _it is never null_ after the first Repository#findBy!

Code: 
https://github.com/shadogray/pfad/blob/master/pfad-master/pfad/src/test/java/at/tfr/pfad/view/TestDownloadBean.java

Reproducible by commenting line #46 - @Before executing unneeded findBy

Thread [main] (Suspended (breakpoint at line 208 in QueryCriteria))
QueryCriteria<C,R>.join(SetAttribute<? super C,P>, Criteria<P,P>) line: 208
SquadRepository$$DSPartialBeanProxy(SquadRepository).findByAssistant(Member)
line: 45
MemberValidator.validate(Member, String, Collection<Member>) line: 133
TestDownloadBean.testValidationTruppVerein() line: 175
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object...) line: 498
FrameworkMethod$1.runReflectiveCall() line: 50
FrameworkMethod$1(ReflectiveCallable).run() line: 12
FrameworkMethod.invokeExplosively(Object, Object...) line: 47
CdiTestRunner$ContainerAwareMethodInvoker.invokeMethod(Object) line: 359
CdiTestRunner$ContainerAwareMethodInvoker.evaluate() line: 331
RunBefores.evaluate() line: 26
CdiTestRunner(ParentRunner<T>).runLeaf(Statement, Description,
RunNotifier) line: 325
CdiTestRunner(BlockJUnit4ClassRunner).runChild(FrameworkMethod,
RunNotifier) line: 78
CdiTestRunner.runChild(FrameworkMethod, RunNotifier) line: 190
CdiTestRunner.runChild(Object, RunNotifier) line: 78
ParentRunner$3.run() line: 290
....

Am Fr., 15. Nov. 2019 um 11:12 Uhr schrieb Mark Struberg
<[email protected]>:
>
> Hi Thomas!
>
> I'm not quite sure what 'uninitialised' means in that regard.
>
> Either you have an EntityManager at hand - then *all* JPA is initialised.
> Or you don't, then it should already blow up with accessing ANYTHING 
> Hibernate - not only very deep inside it.
>
> I think we will need a bit more information about how your setup works.
>
> LieGrue,
> strub
>
>
> > Am 14.11.2019 um 11:03 schrieb Thomas Frühbeck <[email protected]>:
> >
> > Hi Gerhard,
> > thank you for your reply, at first thought I meant to accept it for a
> > correct answer to my problem.
> > After pondering over it for some time I am less convinced.
> >
> > AFAIK the problem comes from Deltaspike Data using uninitialized
> > resources, where initialization needs are not really obvious to the
> > user.
> > My debugging has shown, that the repository passes objects to the jpa
> > layer, who's initialization I havent ever seen yet (sorry for my lack
> > of insight).
> >
> > The question is: is it correct for a framework like Deltaspike to use
> > (and pass on to lower levels) uninitialized resources, who's
> > initialization is generally hidden to the application, and therefore
> > initialization logic is typically not part of application code?
> >
> > Regards,
> > Thomas
> >
> > ---- [email protected] wrote ----
> >
> >> hi thomas,
> >>
> >> since your repository works basically and the NPE occurs in hibernate,
> >> it sounds like a hibernate init-bug.
>

Reply via email to