Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-27 Thread Thiago H. de Paula Figueiredo
Hello, everyone! While I believe we should fix this problem in the Tapestry's proxy creator code, since it may have been happening in non-Hibernate stuff as well, maybe we could have an interim fix of not using PropertyShadowBuider to build the Session service? Code is in HibernateCoreModule.build

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-24 Thread Ben Weidig
I think I found the issue. Not 100% sure yet, but my first tests look good. The PropertyShadowBuilder got changed in TAP5-2582, so it can handle duplicate methods if interfaces extend each other. In the case of Session, however, the return types of the methods differ, as it's totally valid to el

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-23 Thread Vangel V. Ajanovski
On 21.6.23 20:32, Volker Lamp wrote: Is there any chance I can motivate you to contribute your test case as a unit test to the Tapestry code base? Have a look at the test apps in tapestry-jpa as a starting point. If I find some free time in the following months to look it up and learn how to

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-21 Thread Volker Lamp
Hi Vangel > For me, it is very easy to reproduce. I can share the entire source > code, but there is nothing special to share. Thank you for the code example! Is there any chance I can motivate you to contribute your test case as a unit test to the Tapestry code base? Have a look at the test a

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-21 Thread Volker Lamp
Hi Vangel > Is this because the bug only occurs in some very specific environments > (only some specific OS and some specific JDK combination and some > specific DB driver), or tapestry-hibernate is not in use any more by > committers and other developers and tapestry-jpa is the preferred way,

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-15 Thread Vangel V. Ajanovski
On 15.6.23 14:17, Thiago H. de Paula Figueiredo wrote: Yeah, it doesn't seem to happen for everyone. tapestry-hibernate has unit and integration tests and they have been successful. For me, it is very easy to reproduce. I can share the entire source code, but there is nothing special to share.

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-15 Thread Thiago H. de Paula Figueiredo
Hello, everyone! On Sun, Jun 11, 2023 at 2:04 PM Vangel V. Ajanovski wrote: > This bug prompts another question that bothers me. > > How come nobody else has noticed the bug for two years? I had a report > in Sep 2021, which did not get an answer, there is another mention on > Stack Overflow in

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-14 Thread Chris Poulsen
> > How come nobody else has noticed the bug for two years? > In general we're isolating the use of Tapestry to our presentation layer - The datastore access (and business logic) lives in modules and the UI sits on top of the business logic layer - The lower level modules are usually wired up with

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-11 Thread Vangel V. Ajanovski
This bug prompts another question that bothers me. How come nobody else has noticed the bug for two years? I had a report in Sep 2021, which did not get an answer, there is another mention on Stack Overflow in the last month and now this thread here opened by Chris. Is this because the bug on

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-11 Thread Ben Weidig
Hi Chris, I've created a ticket: https://issues.apache.org/jira/browse/TAP5-2754 If I understand it correctly, the getSession() call just returns the associated session of the org.hibernate.jpa.HibernateEntityManager which Session extends since 5.2, see https://github.com/hibernate/hibernate-orm/

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-10 Thread Christopher Dodunski (Tapestry)
Hi Ben, Thank you for your investigative efforts, even though you weren't yet able to pinpoint the exact cause. And thank you, you and Vangel, for sharing that workaround. Occasionally, this HibernateCrudServiceDAO method works as expected. Most times not. This seeming randomness fits wit

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-10 Thread Ben Weidig
I've tried to debug the issue again, but to no avail :-/ Here are my observations/findings/notes: The Session you get injected is actually a shadowed property of org.apache.tapestry5.hibernate.HibernateSessionManager that is created in org.apache.tapestry5.hibernate.modules.HibernateCoreModule.bu

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-09 Thread Vangel V. Ajanovski
On 9.6.23 14:30, Ben Weidig wrote: we ran into similar issues with custom queries, our workaround is calling getSession() on the session, like this: return this.session.getSession().createQuery(sql) // .setParameter("replyToId", relatedId) //

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-09 Thread Ben Weidig
Hi Chris, we ran into similar issues with custom queries, our workaround is calling getSession() on the session, like this: return this.session.getSession().createQuery(sql) // .setParameter("replyToId", relatedId) // .setParameter("type",

Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-09 Thread Christopher Dodunski (Tapestry)
Hello, I've encountered an issue after upgrading from Tapestry 5.6.4 to 5.7.3. This included moving from Hibernate 5.1.0.Final to 5.4.32.Final (as per the guidelines). The HibernateCrudServiceDAO method below is now failing to fetch named queries via the injected org.hibernate.Session, resu