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

Hibernate not creating tables and un-deploying my app

I'm using Hibernate to create mysql tables automatically within a maven JBoss project. When I deploy I get this info msg: 13:48:24,415 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH000206: hibernate.properties not found and this…
Alice
  • 117
  • 5
  • 16
0
votes
1 answer

EclipseLink MongoDB connection

I have MongoDB database called test with collection called USstates. Now I connect to db using Eclipselink EntityManagerFactory emf = Persistence.createEntityManagerFactory("mongo"); EntityManager em = emf.createEntityManager(); But find…
Kula
  • 125
  • 3
  • 15
0
votes
1 answer

How to combine several jar files with peristence.xml files into one jsf project

I have several jar files (tasks.jar, calendar.jar, user.jar, authentication.jar) which I have developed which contains persistence.xml file inside each and every one of them. All these persistence.xml files have the same persistence unit name, say…
LalakaJ
  • 531
  • 7
  • 16
0
votes
0 answers

EclipseLink doesn't create tables out of EntityClass

I'm using EclipseLink and Spring. This is my persistence.xml:
0
votes
0 answers

How to use persistence unit defined in extern library?

In a project (war), I am using an EntityManager defined using a persistence unit. The definition of this persistence unit is made in a library that is packed as jar and installed on in Glassfish's libs. This lib is not included in the war. Since I…
Mike de Dood
  • 393
  • 1
  • 10
0
votes
1 answer

Inner class - unexpected token

I have an inner class: @Entity public class InnerTypes implements Serializable { private static final long serialVersionUID = 3839105307661662120L; @Id public int id; public PrimitiveInnerTypes primitiveInnerTypes; public…
SaintLike
  • 9,119
  • 11
  • 39
  • 69
0
votes
1 answer

What do values in persistence.xml mean in EJB?

I am new to Java and JBoss and JDeveloper. My legacy project has this persistence.xml file: java:/DoDSRDS dodsr.ManifestsPass1
Dean.DePue
  • 1,013
  • 1
  • 21
  • 45
0
votes
0 answers

java.lang.ClassNotFoundException Entity Persistence

I have a project with Persistence, and when i debug on server, it gives me this exception: Advertencia: Exception or error caught in resource java.lang.NoClassDefFoundError: clibb/flower/data/entity/SupplyEntity at…
Albert Cortada
  • 737
  • 3
  • 10
  • 25
0
votes
1 answer

CWWJP0009E error when creating persistence unit

I was facing the following error when starting my Java EE application in IBM WebSphere Application Server WAS 7. JPAPUnitInfo E CWWJP0009E: The server cannot create an EntityManagerFactory factory for the NAME_OF_THE_PERSISTENCE_UNIT persistent…
Peter Wippermann
  • 4,125
  • 5
  • 35
  • 48
0
votes
1 answer

EclipseLink + Maven: java.lang.NoClassDefFoundError: javax/persistence/Persistence

My Persistence.xml is as follows: org.eclipse.persistence.jpa.PersistenceProvider edu.deakin.sarms.model.StudentAccount
theAntonym
  • 39
  • 1
  • 8
0
votes
1 answer

Still getting PersistenceException: No Persistence provider for EntityManager

I get such an exception after deploying my application: Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named JavaAcademyUnit at…
Bogdan Kobylynskyi
  • 1,150
  • 1
  • 12
  • 34
0
votes
1 answer

No Persistence provider for EntityManager named DataSourcePostgres

I receive the following error in my standalone java application: Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named DataSourcePostgres Here's my persistence.xml:
user2451415
  • 161
  • 1
  • 9
0
votes
2 answers

How to use OpenJpa using persistence.xml without using Enhance.xml ..?

How can I use OpenJpa ,with using Persistence.xml configuration same we use in jpa, I dont want to use Enhance.xml.
klobin
  • 41
  • 1
  • 11
0
votes
0 answers

How can I give reference of properties(connections) of persistence.xml in properties file in java

I have persistence.xml -------- oracle.toplink.essentials.PersistenceProvider false
klobin
  • 41
  • 1
  • 11
0
votes
0 answers

Hibernate Persistence Unit Issue

I'm developing a proof of concept application, learning about spring mvc, hibernate and mysql. I have been working with a single entity (User), but if I add a new one, my code doesn't work I have 2 clases (entities) defined as…
Jawen
  • 1,416
  • 1
  • 14
  • 26