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
0
votes
1 answer

JBoss, Spring: persistence.xml - why should i avoid this filename?

In the online source code generation tool SpringFuse the suggest when using Spring not to name the persistence unit persistence.xml. Rather they rename the file to spring-persistence.xml: …
Robert Niestroj
  • 15,299
  • 14
  • 76
  • 119
0
votes
1 answer

Play framework 2.2.1 always tries to create DB at startup

I have project in Play 2.1.5 and I've decided to migrate to Play 2.2.1. I followed http://www.playframework.com/documentation/2.2.1/Migration22 and everything works except that on startup it looks like the project is trying to create DB instead…
0
votes
1 answer

JPA: configure persistence provider

I got a simple java project created with maven (quickstart archetype) I am trying to configure JPA persistence for drools sessions (the code comes from drools documentation) I added drools-persistence-jpa, Bitronix Transaction Manager and…
Alex
  • 1,141
  • 1
  • 13
  • 24
0
votes
1 answer

false is not working in SE

I am using eclipselink as JPA provider and needs to keep entities in a jar file. All jar entities are annotated with @Entity.I tried false and true but it didn't auto detect the entities. I don't want to write all classes in persistence.xml.…
Achyut
  • 377
  • 1
  • 3
  • 17
0
votes
1 answer

Taskservice in Spring: NullPointerException on JtaTransactionManager

I started a couple of days with Jbpm5 and run directly in the following problem: I have found the example below and could run it as a JUnit test. All tables with users and groups have been created successfully. After that I created a Spring Service…
Mike
  • 1
  • 3
0
votes
1 answer

Where to set EclipseLink properties using Glassfish if not set in persistence.xml

Is there a way to set the EclipseLink properties (e.g. target database) in a place different from persistence.xml? Rational: I have a JPA module defining the data structure and containing persistence.xml. The module might be used with different…
Claude
  • 1,724
  • 3
  • 17
  • 46
0
votes
1 answer

two persistence units for two schemas?

I'm using Oracle DB as RDBMS, and I want to access, via my JSF2 application, to two database schema. So, I think I must use two in my persistence.xml ?
ThunderPhoenix
  • 1,649
  • 4
  • 20
  • 47
0
votes
1 answer

How to reference a persistence unit name in Liquibase

I want to perform a liquibase:diff between an existing database and my entities defined in JPA annotations. Actually, instead of using a persistence.xml to define the entityManagerFactory, I am using Spring with Java based configuration as such : …
Dimitri
  • 8,122
  • 19
  • 71
  • 128
0
votes
1 answer

remove the uses of tag in persistence.xml hibernate

I have a demo project on Spring 3.1.1 Hibernate 4.1.1 jsf 2.1.6 ***PLEASE IGNORE ANY WHITESPACES AFTER THE START OF "<" IN A TAG : *** In the persistance.xml file, I am using the Configuration like the following : < ?xml version="1.0"…
Imdad Areeph
  • 91
  • 1
  • 8
0
votes
0 answers

javax.persistence.PersistenceException: No Persistence provider for EntityManager named DogovoraPool

I try to make GWT application with JPA on Eclipse. But I get this error: javax.persistence.PersistenceException: No Persistence provider for EntityManager named DogovoraPool on executing this command: EntityManagerFactory emf =…
Valentyn Grygoriev
  • 463
  • 10
  • 29
0
votes
1 answer

Centos JBOSS deploy war file fail, cannot load the persistence.xml. Working on Windows 7 but not centos

i have spent two days still can't solve the problem. My problem is that I have a war file using JPA and Hibernate. When i deploy on windows JBOSS AS 7.1.1 it works prefect. However, when i deployed it on Centos 5.8 JBOSS AS 7.1.1 it throws…
0
votes
1 answer

Play framework 2 + JPA with multiple persistenceUnit

I'm struggling with Play and JPA in order to be able to use two different javax.persistence.Entity model associated to two different persistence units (needed to be able to connect to different DB - for example an Oracle and a MySQL db). The problem…
Nicolas Forney
  • 868
  • 2
  • 13
  • 21
0
votes
1 answer

Android: EclipseLink: No Persistence provider for EntityManager named PU

i have a jpa programm which i wanted to tansform on android. this is the src-file-structure from my android project: +---org | \---manager | +---android | | EnterIndexNumberActivity.java | | MainActivity.java | …
0
votes
1 answer

Persistence Provider for EntityManager not found

I'm trying to persist elements using JPA and EclipseLink. So I've created a class to persist @Entity public class Couple implements Serializable{ private static final long serialVersionUID = 1L; @Column(name = "OBJECTID") private String…
Derbie
  • 413
  • 1
  • 12
  • 28
0
votes
1 answer

EJB with standalone client ignores persistence.xml (?)

Please help, this is driving me crazy. I've been researching this for hours, and couldn't find an example that matches my situation. I'm writing a very simple Java EE App which authenticates users from a standalone client. In Netbeans 7.3, I have a…