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

Maven unable to locate persistence.xml

I copied the persistence.xml in every folder, but still maven showing unable to locate the file persistence.xml. Please help. Error: [INFO] using jpaconfiguration task. 19:19:52,652 INFO org.hibernate.cfg.annotations.Version -…
Shashi
  • 12,487
  • 17
  • 65
  • 111
0
votes
2 answers

no persistence provider for entitymanager named - tried everything

I'm new to JPA, and i got this infamous error "no persistence provider for entitymanager named". I search far and wide on google, and tried every single solution available, to no extent i'm afraid. Stack Trace javax.persistence.PersistenceException:…
0
votes
1 answer

persistence.xml and postgresql set 0 == false

We migrate our application from oracle to postgresql. And we have got problem because many question using 0 as false. And now we have got many errors that : operator does not exist: integer = boolean Its possible using settings in persistence.xml…
Łukasz Woźniczka
  • 1,625
  • 3
  • 28
  • 51
0
votes
1 answer

Using criteria-api to dynamic tables

I use criteria-api to made sql query to the database and it work very fine. But now I need to use dynamic tables , where some tables can be create or destroyed and some column can be add or removed. I want to manage this entityties in dynamicBean…
Troncador
  • 3,356
  • 3
  • 23
  • 40
0
votes
2 answers

Web app on EC2 instance doesn't seem to load persistence.xml

I have an instance of EC2 on which I've deployed a web application. The EC2 instance is Linux with Tomcat. The web app works just fine locally on my box, and it connects to an AWS RDS instance of MySQL. When I deploy this web app to the EC2…
AlexG
  • 1,596
  • 2
  • 17
  • 26
0
votes
1 answer

tomee persistence.xml in EJB JAR META-INF crashes my application deployment

I am using TomEE to deploy an EAR file, that contains one EJB JAR and one WAR. I want to add entities using the default provider. I have created a resource in tomee.xml to use MySQL DB. Then I would like to use entity manager so I am trying to…
Eli Avital
  • 21
  • 1
  • 3
0
votes
1 answer

configuring infinispan in jboss 7 programmatically

is there a way i can take away the configuration of infinispan completely from the standalone.xml and have the configuration like the following in my persistence.xml :
Ikthiander
  • 3,917
  • 8
  • 37
  • 54
0
votes
1 answer

Portable JPA application without specifying database username and password inside persistence.xml

I am developing a JPA application for my project. I am using eclipselink. I found this tutorial but it doesn't fit with the complexity of my application link here I want to create an external file for the username, password and url of the database…
ltlynx
  • 51
  • 1
  • 10
0
votes
0 answers

JPA2 Extract info from a persistence.xml

I work with JPA2 and I use a multiple persistence unit configuration that is represented in my persistence.xml, like this:
ilya8891
  • 127
  • 1
  • 1
  • 12
0
votes
1 answer

Wicket+Spring+JPA+Hibernate: No bean named 'dataSource' is defined

I have a working Wicket+Spring+JPA+Hibernate+MySQL application with following beans.xml and persistence.xml files respectively. beans.xml
sdia2000
  • 1
  • 1
  • 1
0
votes
1 answer

No META-INF/persistence.xml was found in classpath

I'm using netbeans 6.8 and the Persistence API. In netbeans 6.8 the persistence.xml is placed in the src/conf/ folder. I've tried creating a /src/META-INF/ folder and copying the persistence.xml in that folder but I still get the error No…
Simon
  • 1,643
  • 7
  • 30
  • 61
0
votes
1 answer

Why am I getting a "No Persistence provider for EntityManager named myclientunit" exception?

I'm trying to deploy a JAR file on JBoss 4.2.3.GA. I'm using Hibernate 4.1.5.SP1 and validator 4.3.0.Final. The Maven dependencies are ... org.hibernate
Dave
  • 15,639
  • 133
  • 442
  • 830
0
votes
2 answers

Maven +Hibernate + JPA error .JavaReflectionManager cannot be cast to org.hibernate.annotations.common

Can someone please provide me with a sample minimalist persistence.xml file that works and how to get it working in code? I am following this document which has frustrating gaps: Hibernate Setup. I have this but
Klaus Nji
  • 18,107
  • 29
  • 105
  • 185
0
votes
1 answer

com.impetus.kundera.utils.InvalidConfigurationException: Could not find any META-INF/persistence.xml file in the classpath

I am trying to deploy sample war file build using Kundera on jboss AS7.1.1.final. Here are the steps which I have followed: 1. created a module (com.impetus.kundera), here is module.xml
vivek mishra
  • 1,162
  • 8
  • 16
0
votes
1 answer

Can not create EntityManager factory bc JTA tx manager requiered

I can not build my entity manager factory and the error I get is "chosen transaction strategy requires access to the JTA Transaction Manager". Can anyone advise what i have to configure to get past this? FYI I'm using Jboss 6, no spring. Here is my…
simgineer
  • 1,754
  • 2
  • 22
  • 49
1 2 3
34
35