Questions tagged [hibernate-entitymanager]

Hibernate EntityManager implements the programming interfaces and lifecycle rules as defined by the JPA 2.0 specification.

Hibernate EntityManager implements the programming interfaces and lifecycle rules as defined by the JPA 2.0 specification. For more informatio refer the link.

288 questions
2
votes
0 answers

JPA+ORACLE: Can't pass boolean param to my stored procedure

I can not pass boolean param to my stored procedure in Oracle. If I set value directly in the query text (mypackage.Test(?, false, ?, ?);) all work fine... jdbc-driver: ojdbc6.jar container: Tomcat 7.0.28 hibernate-core+hibernate-entitymanager:…
Akvel
  • 924
  • 1
  • 15
  • 32
2
votes
1 answer

java.lang.IllegalStateException: EntityManager is closed

I'm building a JAR file, deploying to JBoss 4.2.3.GA (can't help it), with Hibernate 4.1.5.SP1 with validator 4.3.0.Final. The database is MySQL 5.5. I'm having problems executing basic selects using a RESOURCE_LOCAL EntityManager. I have …
Dave
  • 15,639
  • 133
  • 442
  • 830
2
votes
1 answer

Hibernate EntityManager persist() and database round trip count

Right now I am using entitymanager to insert list of object entity to database with my dao using code like this. @Transaction public void insertBatch(List o){ for(int i=0;i
2
votes
1 answer

Unable to build EntityManagerFactory - Spring and Hibernate

I am getting following error while deploying spring application with hibernate3 to glassfish server 3.1.2: SEVERE: Exception while loading the app SEVERE: log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading,…
Konrad
  • 1,605
  • 3
  • 24
  • 45
1
vote
0 answers

Why doesn't createQuery() on the javax.persistence.EntityManager work with upper case attribute?

I've encountered a behaviour of javax.persistence.EntityManager I'd like to understand. I had code similar to the following: 1 // Query Execution 2 EntityManager emext; 3 String query = "SELECT obj FROM MyDatabaseTableBE obj obj.FOO =…
Kaadzia
  • 1,393
  • 1
  • 14
  • 34
1
vote
0 answers

What is the difference in designating two entities in Java debugger where only one has `_$$_jst3f5_` part? Diff results for the same Hibernate query,

I'm currently debugging the code that calls the Hibernate Entity manager to load the data from the Postgres DB. I do calls for two different ids in DB that corresponds to the almost the same DB entries (no null values, all fields are in accordance…
Eljah
  • 4,188
  • 4
  • 41
  • 85
1
vote
0 answers

unable to create bean error with name 'entityManagerFactory' bean

I'm using JDK 1.8 MySQL 8.0.31 Spring version 5.3.27 Aspectj version 1.8.10 log4j-api(core, web) version 2.17.1 updating the log trace May 17, 2023 12:16:20 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root…
1
vote
1 answer

Concurrency errors when using Spring Transaction management in Tomcat

I am currently working on retrofitting Spring-based declarative transactions to a legacy application. The application is deployed on Tomcat and uses JPA/Hibernate to access a PostgreSQL database, and a homegrown web framework (so switching e.g. to…
1
vote
0 answers

Define JNDI for EntityManager Wildfly 26.0.0.Final

Define JNDI for EntityManager Wildfly 26.0.0.Final I tried to update a web app from jboss 5.1.0.GA to Wildfly 26.0.0.Final. I use: jboss-seam 2.2.1.CR2 jdk 8u202 The last error was: ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool --…
1
vote
0 answers

EntityManager "randomly" throws Exception when executing native query

I have a Spring Boot project which mostly uses Repository's for all db operations, however I have a table that is not backed by an entity and thus doesn't use a Repository. Instead I use an EntityManager and run a native query. This works well most…
user1513171
  • 1,912
  • 6
  • 32
  • 54
1
vote
1 answer

Spring configuring bean with component scan - Field userRepository in service.UserService required a bean of type 'repository

I have checked many examples but they are generally about marking the classes with @Repository or @Service etc...For example here it is about the packages to scan and I am not sure where and in which method I should make scan. I have a simple…
1
vote
1 answer

ERROR o.h.e.j.e.i.JdbcEnvironmentImpl - Could not fetch the SequenceInformation from the database java.sql.SQLException: Numeric Overflow

I'm trying to connect Oracle database using Entity Manager method. Picking up oracle credentials from application.properties then the program is working fine I've referred this post…
1
vote
1 answer

Trouble formulating a sql query in DAO Implementation using EntityManager.createQuery

I've method in my DAOImplwhich is intended to get a list of all books belonging to a specific user, from the database... The method looks like this: @Override public List<>BooksList> findListsOf(String userId) { Query query =…
Mahakala108
  • 85
  • 1
  • 11
1
vote
0 answers

EntityManager.createQuery().executeUpdate not updating the database

I am trying to update the Student class(student_class) column based on the studentid. I am using EntityManager with Criteria to update the records. The code is compiling successfully, but records are not getting updated in the…
1
vote
1 answer

Tapestry `EntityManager` vs `EntityManagerManager`

In Tapestry there are (mainly) two ways to obtain an EntityManager instance: By injecting the EntityManager directly: @Inject @PersistenceContext(unitName = MyPersistenceUnit) private EntityManager entityManager; By using the EntityManagerManager…
MetaColon
  • 2,895
  • 3
  • 16
  • 38