Questions tagged [persistence.xml]

Used with the Java Persistence API, specifies names and database properties.

When used with the Java Persistence API, the persistence.xml file is usually placed in the META-INF folder; it's used to specify the persistence provider name, entity class names, and properties like the database connection URL, driver, user, password, and so on (taken from http://www.javaworld.com/javaworld/jw-01-2008/jw-01-jpa1.html?page=3).

519 questions
2
votes
3 answers

How to override WebSphere Community Edition (WCE) 2.1's default persistance provider- OpenJPA

In a Spring 3 MVC project running on WebSphere Community Edition 2.1, I'm trying to configure my entityManagerFactory. However it seems that I can't override the PersistanceProvider. It defaults to OpenJPA, and even excluded this as a hidden…
enkor
  • 7,527
  • 3
  • 31
  • 55
2
votes
1 answer

Issue on injecting EntityManagerFactory in Websphere with @PersistenceUnit

I'm having trouble porting a webapp from Glassfish 3.1 to Websphere 8.5. The problem is the use of JPA2: the following configuration running in Glassfish does not work in Websphere:
2
votes
2 answers

How to Improve Performance when Persisting Large Collections using Spring EntityManager Hibernate

I am using Spring/Hibernate done the JPA way using org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean and configured using spring xml, persistence.xml and JPA 2 annotations. Functionally it is fine and persisting correctly. However,…
Matt
  • 557
  • 9
  • 17
2
votes
1 answer

Cannot use JPA EntityManager

I would like to implement a program in Java able to interact with a database. I have already done something like this using EJB, but this time I need it to be able to work without an application server. What I have done so far is (with…
Simon
  • 5,070
  • 5
  • 33
  • 59
2
votes
1 answer

META-INF/persistence.xml cannot be opened because it does not exist

I'm creating a basic spring-maven project that should run as a java application (in process, not over a web server). My application context resides under the resources folder which is in my classpath:
forhas
  • 11,551
  • 21
  • 77
  • 111
2
votes
1 answer

Can't find persistence unit and reverse engineering tools

I'm currently creating my entities and DAO with Hibernate Tools and reverse engineering. My config is Eclipse Indigo, JBoss AS7, Hibernate Tools 3.4 and Hibernate 4. The problem is when I try to deploy my .jar to JBoss AS7 I get this…
LMeyer
  • 2,570
  • 1
  • 24
  • 35
2
votes
1 answer

persistence-unit, different hibernate.transaction.manager_lookup_class property

I have Java EE application, and my EJB module have persistence.xml. I deploy my app on 3 app servers: JBoss, GlassFish and WebLogic, and every server needs own hibernate.transaction.manager_lookup_class property. WL needs
Ilya
  • 29,135
  • 19
  • 110
  • 158
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
2
votes
2 answers

how to fetch a value from build.properties to persistence.xml?

In our project I need to fetch some values from build.properties to persistence.xml. Please let me know if there is any possible way?
2
votes
2 answers

Why does Spring Data JPA break previously working persistence.xml file?

I am attempting to add Spring Data JPA to my project so I can leverage the Repositories interface. Steps taken - ApplicationContext.xml: Added xmlns:jpa="http://www.springframework.org/schema/data/jpa" to the tag of my applicationContext.xml…
8bitjunkie
  • 12,793
  • 9
  • 57
  • 70
2
votes
1 answer

JBOSS 7.1.1 javax.persistence.PersistenceException PersistenceProvider in 'org.apache.openjpa.persistence.PersistenceProviderImpl not found

I am new to JBOSS and m stuck at basic deployment of app in JBOSS 7.1.1 I have created a webapp with persistent.xml as
Legolas
  • 71
  • 1
  • 6
1
vote
1 answer

Spring Persistence archive and entitymanager is null when accessing from web-application

I've created a jar file through spring roo (maven project - persistence archive) unit tests are running fine, the concerned files are on the following…
syed asim
  • 41
  • 1
  • 3
1
vote
1 answer

No Persistence provider for EntityManager error using glassfish v3

I'm getting the below error on Glassfish v3 running in the server tab of Eclipse. javax.servlet.ServletException: javax.persistence.PersistenceException: No Persistence provider for EntityManager named chatroom When I try to run this code from a…
Jazzepi
  • 5,259
  • 11
  • 55
  • 81
1
vote
2 answers

How can I make a JPA application access different databases?

I'm writing a Java SE (desktop) application that has to access different databases all of which will have the same data model (same schema, tables, etc.). I want to reuse the JPA Entities that I already use in a Java EE application that front each…
Dean Schulze
  • 9,633
  • 24
  • 100
  • 165
1
vote
1 answer

Reading a Jta Datasource

I have a JSF, EclipseLink app. I use JasperReports, to export a report I need to create a connection. JasperPrint jasperPrint = JasperFillManager.fillReport(File, Hash Map, Connection) I cant access my current connection (The datasource I define…
Daniel Rojas
  • 407
  • 2
  • 5
  • 16