All Questions
Tagged with jpa jakarta-ee
2,067
questions
0
votes
1
answer
38
views
Jakarta EE 8 JTA transaction aborded after 2 minutes
I'm developping with Apach Netbeans 16 and Glassfish 6.2.5 and everytime when I have a transaction that take more thant 2 minutes, the transaction is aborded with this error :
A system exception ...
0
votes
0
answers
12
views
Invalid content was found starting with element 'class'. No child element is expected at this point
I'm encountering this strange error on the class keywords in this code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="https://...
0
votes
1
answer
62
views
Is EntityManager injected with @PersistenceContext to a @RequestScoped CDI bean thread-safe?
In a Java EE web application project, there is a DAO annotated as a CDI bean:
@RequestScoped
public class CustomerDAO {
@PersistentContext
private EntityManager em;
//some persistence operation ...
0
votes
1
answer
55
views
Is calling method of EntityManager in a container-managed transaction context inside Servlet thread-safe?
There is the following code snippet inside a servlet
@PeristenceContext
private EntityManager entityManager;
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
...
0
votes
0
answers
39
views
JPA/Hibernate Overhead for large dataset
I have a scenario at hand, where I need to fetch a large dataset and access it readonly. The dataset consists of multiple tables, so we are talking about 4-5 interconnected tables in the result and a ...
1
vote
1
answer
450
views
Latest Hibernate version that supports MySQL 5.6
I am currently upgrading my existing project
Changes are:
JDK 8 --> JDK 17
JSF 2.2 --> Jakarta Faces 4
Glassfish 4.1 --> 7.0.11
JPA 2.1 --> JPA 3.1
I also need to change to change the ...
0
votes
0
answers
81
views
eclipse 2023-09 for EE unable to set JPA and EJB Facet version
I started a ejb project and want to use Persistence 3.1 and Enterprise Beans 4.0. Maven loaded the jars, I added the maven dependancies to the libraries, but I'm still unable to select something ...
0
votes
0
answers
23
views
Replace a Stateful EJB by a CDI bean to implement a long conversation without a long transaction
In Jakarta EE 10, I would like to replace a Stateful EJB by a CDI bean (with methods annotated by @Transactional) to implement a long conversation without a long transaction (for example to manage a ...
2
votes
2
answers
532
views
glassfish 7 + jakarta ee 10 + hibernate entity manager java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/ReflectionManager
I am trying to get hibernate working with glassfish 7 jdbc. I got the configuration of the pool right and ping is a success. I have put mysql-connector-j-8.0.33.jar and hibernate-core-6.2.6.Final.jar ...
1
vote
1
answer
636
views
Having problems setting up Jakarta EE on Netbeans using GlassFish and Derby
I know it's pretty outdated technology but I found myself in the need of doing a project using Jakarta EE on GlassFish. I already know the answer, I just want to document my workaround for making this ...
0
votes
0
answers
69
views
Hibernate/JPA: Dynamically create a count Query based on another Query
Is there a JPA-specific or provider-specific way to create a javax.persistence.Query/TypedQuery from another Query/TypedQuery with the possibility to change the query parts like the Selection? ...
0
votes
1
answer
476
views
415 Unsupported Media type when doing POST
I have these two classes Item and Drink. Where Drink extends Item. Both are PanacheEntities and only consists a few basic fields. Code samples of this part (I left the getters and setters out of it):
@...
1
vote
0
answers
112
views
What is the correct way to persist entities based on other entities being updated in the same transaction?
Description
I'm trying to persist JPA Entities in a Wildfly Web Application based on entities currently being updated in the same JTA transaction.
What needs to happen is when an entity of some type ...
1
vote
1
answer
915
views
jakarta.persistence.Check constraint not working
I have the following Movie class in a Spring Boot project that holds list of actors. I wanted to make sure an actor wont be deleted if its part of a movie and I want to enforce this constraint on a ...
4
votes
0
answers
79
views
Is there a way to ignore a field when writing history table with @Customizer
I have a class which is annotated with eclipselink @Customizer.
That customizer, uses a custom customizer that inherits from DescriptorCustomizer.
In customize function I have a HistoryPolicy in order ...