1,089 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
1
answer
60
views
OpenJPA EntityExistsException "already exists in this context; another cannot be persisted", how to get an internal @idhex value?
I get an error object already exists when calling em.persist(serviceInstance) method. Object has several OneToMany(unidirectional) child object links, and one of the ServiceInstance -> ...
Whome's user avatar
- 10.4k
0
votes
1
answer
75
views
OpenJPA and AttributeConverter beween Calendar and mysql DATETIME not working
OpenJPA3.2.2 supports AttributeConverter but I always get a cast error.
class java.lang.String cannot be cast to class java.util.Calendar (java.lang.String and java.util.Calendar are in module java....
Whome's user avatar
- 10.4k
0
votes
1
answer
31
views
Unable to map data from JPA query to model class
@Query(value = "SELECT DISTINCT vip, instance FROM REPORT", nativeQuery = true)
List<VipINFO> findAllVIPS ();
I have this method in repository class, I want to map this data to ...
1
vote
0
answers
198
views
Issues with Open JPA with @Convert and @Converter - field not being recognized
I am having a lot of difficulties getting @Convert and @Converter using Open JPA.
some_field is a longtext field in the database
@Entity
@Table(name = "basic")
public class Basic {
@...
0
votes
1
answer
104
views
Error deploying JPA webapp on Tomee Plus (OpenJPA)
Followed these steps to test a jackartaee jpa webapp in Tomee Plus 9.1.0
https://oglimmer.medium.com/tomee-and-jpa-datasources-b95acb8663e4
/conf/tomee.xml :
<Resource id="testdb" ...
0
votes
0
answers
26
views
JPA / OpenJPA: Map integer field from DB table to custom object instead of enum
I use OpenJPA in my Java project. The question is about a non-nullable integer column.
Currently this field is mapped to an enum class by the ordinal index:
@Column(nullable=false)
@Enumerated(...
0
votes
1
answer
38
views
Open Jpa OneToMany parent relationship with two level down child
How can I make a relationship with a second-level child using openjpa.
Parent -> Child -> GrandChild
Parent has a property lets say, plant, the child does not have it, however the grand child ...
0
votes
1
answer
539
views
OpenJPA upgrade for jakarta persistence api
I have been trying to upgrade my project to spring 3.1.0 . It currently uses OpenJpa with java persistence schema 1.x.
If I upgrade the javax.persistence packages to jakarta.persistence packages, with ...
1
vote
1
answer
411
views
Why LEFT OUTER JOIN is not working with @Query
I am using H2 DB and JPA. I have a below query with left outer join, but when I am printing the logs I cant see the "left outer join" part in the generated query and its not working.
@Query(&...
1
vote
1
answer
105
views
Fetch only 1 level in a OneToOne relation with same table
I searched on the web but cannot filter out the solution. I get pointed to Spring and Hibernate but I am only interested in the solution with OpenJPA.
I have a table in which I store the taxonomy tree....
0
votes
1
answer
232
views
Java openjpa-all 3.2.0 or latest with sqlite getting error to find 'user' column name
I have a web application project using sqlite latest version (3.40.1.0) and openjpa-all latest (3.2.2).
I created a dummy db using sqlite3 command with the following query:
CREATE TABLE test (
id ...
3
votes
1
answer
3k
views
OpenJPA build failure
I'm currently working on a fork of openJPA and I have to configure a CI tool (e.g. github actions) and sonar cloud for remote analysis but first of all I'm trying the build in the local system. The ...
0
votes
0
answers
57
views
eclipselink migration : could not find openjpa specific code
I am migrating from openjpa (2.2.2) to eclipselink(2.5.2) in my legacy project.
During migration, I could see following code snippet which is specific to openjpa:
openjpaEntityManager kem = ...
0
votes
0
answers
65
views
Websphere 9 throw random database exception
I am using websphere 9, ejb application . Till now I didn't face any errors. But suddenly after restart the server, the application throwing database persistence exceptions . And it fixes after ...
0
votes
1
answer
82
views
How to avoid Openjpa set null value in autogenerated field?
I am trying to migrate one application from websphere 8 to websphere 9. And the open jpa is updated from 2.0 to 2.1.
After migrating I got error while saving.
The autogenerated Id field is set to ...