Questions tagged [entitymanager]

The EntityManager is the representation of a PersistenceContext, allowing a user to manipulate data pulled from a database.

1802 questions
0
votes
1 answer

why EntityManager is null in spring transaction?

I wrote this code in the Service part of my java webapp project: @Service @Transactional public class PersonService extends BaseService { @PersistenceContext private EntityManager entityManager; public void insert(Person person) { …
0
votes
0 answers

Symfony wrong persist database working with two entity managers

I have the same symfony app deployed in two servers. I use two entity managers, one called defaul with a connection on "local" database and the other called online on the "remote" database doctrine: dbal: default_connection: default …
0
votes
1 answer

No externally managed transaction is currently active for this thread when I try to do an update

I'm trying to do an update in my local database, but when I excute an "executeUpdate" I'm getting the next error : javax.persistence.TransactionRequiredException: Exception Description: No externally managed transaction is currently active for …
Allanh
  • 465
  • 1
  • 7
  • 19
0
votes
3 answers

java.lang.OutOfMemoryError While processing a Large CSV file

I am processing a huge CSV (1GB) using java code. My Application is Running on 2 Core Machine with 8GB memory. I am using below command to start my application. java -Xms4g -Xmx6g -cp $CLASSPATH JobSchedulerService Applcation starts a thread to…
Pramod
  • 387
  • 1
  • 7
  • 19
0
votes
0 answers

Should annotation based JPA Entity Manager be closed?

I have used annotation for using Entity Manager instead of using EntityManagerFactory. @PersistenceContext EntityManager entityManager; I searched a lot regd the closing of entityManager. But in most places the EntityManager is being used…
User-8017771
  • 1,512
  • 1
  • 11
  • 17
0
votes
1 answer

How to get ID from db using EntityManager?

Using Entity Manager How to get the ID of the row from the database whose one of the column value is true and then update that row. My db structure is like this: ID EMPLOYEES START_TIME END_TIME MONDAY TUESDAY WEDNESSDAY THURSDAY …
Junaid
  • 664
  • 5
  • 18
  • 35
0
votes
1 answer

EntityManager is null when injected in WildFly 10 EJB

I have been working on moving our application from JBoss AS 6 to Wildfly 10. The main problem I have been stuck on is that the EntityManager does not get injected into the EJB. I have been researching this for a while and trying everything I find…
Mike F.
  • 69
  • 1
  • 9
0
votes
1 answer

Error creating bean with name 'entityManagerFactory' spring-mvc,data

again:). I've asked so many questions before, in my project. Now i almost finish it. And also, have one problem. It's 18:56:40.696 [RMI TCP Connection(5)-127.0.0.1] WARN o.s.w.c.s.XmlWebApplicationContext#544 Exception encountered during context…
Artem K
  • 31
  • 10
0
votes
1 answer

Spring/Hibernate fails to initialize the EntityManager when using mix of annotations and hbm for entities

I have a Spring/Hibernate project with entities defined using both hbm's and annotations. When I am trying to deploy the project I get the following error message: Caused by: org.hibernate.MappingException: Following super classes referenced in…
Nick Div
  • 5,338
  • 12
  • 65
  • 127
0
votes
1 answer

Java EntityManager null with @PersistenceContext

I'm using Wildfly 10, Jersey, and injecting dependencies with @Inject. I have DAO and Service interfaces with their implementations declared in a CustomBinder. The injections work well, but the EntityManager is injected null with the…
Villat
  • 1,455
  • 1
  • 16
  • 33
0
votes
0 answers

NullPointerException on Heroku but in Glassfish everythin is ok?

I'm developing a simple application on JAVA EE using JSF, JPA and Maven. the question is: Why the tomcat servlet on Heroku is returning null on the time to inject a ManagedBean while in Glassfish server everything is fine? There are my…
0
votes
0 answers

Why is my EntityManagerFactory in a ServletContextListener causing a 404 error?

When I try to access my Login page http://localhost:8181/InaalEchtok/Login I get the following error message: HTTP Status [404] – [Not Found] Type Status Report Message /InaalEchtok/Login Description The origin server did not find a current…
Ma'or
  • 95
  • 1
  • 2
  • 11
0
votes
0 answers

EntityManager convert 'is' and 'is not' operators to = and <> How to prevent such case?

I have the following hql : SELECT obj FROM com.domain.view.DomainClass obj WHERE obj.x LIKE :p1 AND obj.y is not :p2 AND obj.z = :p3 ORDER BY a DESC while the result from hibernate is: select obj0_.a as a_, obj0_.b as b_ from obj_table obj0_…
Muhammad Bekette
  • 1,396
  • 1
  • 24
  • 60
0
votes
1 answer

EnityManager Injection via HK2 in WebSockets

I have written 2 WebSocket ServerEndpoints that inject Services that themselves interact with the Database using injected instances of the JPA EntityManager. The application is a web application deployed on a Tomcat Server, using Jersey as JAX-RS…
John Reese
  • 583
  • 2
  • 6
  • 17
0
votes
1 answer

filter list of items symfony

I am building a web application where a user make a post. the post includes category and location. i can view posts for the categories and locations seprately. What i am trying to do is to filter the view to list only category list from a location.…
Suleiman
  • 21
  • 1
  • 7