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
0
votes
2 answers

How to not replace named parameters in EntityManager.createNativeQuery()?

I am using JBOSS AS 7 and I have to use this command prior to querying: entityManager.createNativeQuery( "ALTER SESSION SET NLS_DATE_FORMAT =\"YYYY-MM-DD HH24:MI:SS\""); Now if I fire up this query the error message "Not all named parameters…
easyDaMan
  • 308
  • 3
  • 8
0
votes
1 answer

Injection exception on servlet

Successfully deploy to Glassfish. Go to run it and com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class com.wellpoint.mobility.aggregation.admin.HomeServlet at…
John M
  • 310
  • 4
  • 15
0
votes
2 answers

Error creating bean with name 'entityManagerFactory' with hibernate-jpa-2.0-api dependency added

I've got problem with entityManagerFactory. I've got error : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory'. I've read that I should add to my dependency hibernate-jpa-2.0-api and…
Voroshmitov
  • 105
  • 1
  • 10
0
votes
1 answer

Hibernate columns mismatch on persistance

I've been trying to create EJB-based registration user transaction manager for registration purposes - it is very basic prototype, so please don't be concerned with unhashed passwords etc. The issue I'm currently struggling with is column mismatch…
0
votes
1 answer

How to check connection in hibernate

I am new in using hibernate connection, i am having difficulties in checking the connection before executing a query. Currently if i execute a query, my java swing application hangs roughly around 30 seconds before it confirms that the connection is…
0
votes
1 answer

Spring-Data-jpa with Spring XD

I have my Configuration class with Beans as mentioned below @Bean(name = "entityManagerFactory") public LocalContainerEntityManagerFactoryBean entityManagerFactory(@Qualifier("sqlServerDataSource") DataSource dataSource) { …
0
votes
0 answers

MS Sql and Hibernate entityManagerFactory with DAO's in Spring XD

Is it possible to use to use MS Sql and Hibernate entityManagerFactory with DAO's in Spring XD?? I have a Configuration Class in my project in which I am writing Beans necessary for required configurations for my project like my DataSource and…
0
votes
1 answer

persistenceUnitName with JPA2.1

I am having a Spring project (with JPA2.1) and persistenceUnitName is defined as "default" in that project. I have defined the dependency (using maven) of this project (using spring-core.jar in another project to reuse some Entity classes and other…
0
votes
1 answer

Connection to AWS RDS Postgres with a JAVA Web App

I have a Web App that is a RESTful WebService. It tries to connect to a Postgres DB that is located on the Amazon Cloud. Whenever I have a request, it tries to connect to the DB using JPA and Hibernate. I get the error in this line: factory =…
0
votes
3 answers

Spring framework can't save in Database using EntityManager.merge()

I’m trying to set up a website using Spring. I already managed to read data from a database I've set up, but now encountered a problem when trying to update rows in it. I'm using the merge() function of the EntityManager. I don't get any errors or…
0
votes
1 answer

#Resolved - Positional parameter does not exist in query // stored function call

I have this method to call a stored function from ORACLE, in java (spring) - using entity manager + createNativeQuery .. (...) String set_professional = "{? = call …
0
votes
1 answer

EntityManagerFactory nullPointerException if @Autowire

Tell me please where I have error if in one of my DAOImpl Autowiring work normaly, but in PcDAOImpl I have nullPointer Exception? All project located on GitHub And here is stacktrace from tomcat: Jan 27, 2014 12:30:37 PM…
Aleksandrs Rudzitis
  • 661
  • 4
  • 9
  • 30
0
votes
1 answer

MySQL EntityManager Range Query

How can i simplify this Query, to run it only once. My current code: int year = 2014; Query q = entityManager.createQuery("SELECT SUM(s.revenue),SUM(s.mediaSpending),SUM(s.grossProfit) FROM Sale s WHERE YEAR(s.date) = :year AND…
kozla13
  • 1,854
  • 3
  • 23
  • 35
0
votes
2 answers

How to get DB connection state using JPA?

During the server start up(tomcat) I am creating an entitymangerfactory and storing into the memory. My question, is there any way I can check the connection state during this time? What is happening now, it is creating an entitymangerfactory…
Somnath Guha
  • 107
  • 3
  • 13
0
votes
2 answers

ClassNotFound error for HibernateJPAVendorAdapter class

I am creating unit testcases for JPAs using DBUnit and H2. I get following error when I try to run the tests. My JPA runs perfectly fine when I run the project with actual database. I get the error while running unit…
Suman
  • 53
  • 3
  • 8