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

Wildfly 8.2.0.Final: Misconfiguration because of example datasource or persistence.xml?

I have three datasources configured in my persistence.xml:
Bevor
  • 8,396
  • 15
  • 77
  • 141
0
votes
1 answer

Enhance persistence.xml for database update

For development and deployment of my WAR application I use the drop-and-create functionality. Basically erasing everything from the database and then automatically recreating all the necessary tables and fields according to my…
Socrates
  • 8,724
  • 25
  • 66
  • 113
0
votes
0 answers

Exception in thread "main" java.lang.ClassFormatError: ... NON Maven project

Exception in thread "main" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/Persistence at java.lang.ClassLoader.defineClass1(Native Method) at…
aka
  • 1
  • 1
0
votes
1 answer

Postgresql driver error

I have this code:
dasavi
  • 25
  • 4
0
votes
0 answers

Openshift doesn't deploy persistence.xml?

Hello there internet community, So I went into JAVA and started test things localy on my WildFly 8. Everything is OK with maven web projects, looks and works good. Now I decided to go to openshift as the first choice of free cloud for JAVA. I…
cheatera
  • 1
  • 1
0
votes
0 answers

Glassfish 4.1, JPA 2.1 persistance.xml

i faced with error like this : Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://xmlns.jcp.org/xml/ns/persistence", local:"persistence"). Expected elements are <{http://java.sun.com/xml/ns/persistence}persistence> …
Benjamin
  • 531
  • 2
  • 6
  • 18
0
votes
1 answer

presistence.xml not found when using runnable jar

I have some troubles running a runnable jar due to HHH000318: Could not find any META-INF/persistence.xml file in the classpath Directory structure: JAR META-INF/Manifest content: Manifest-Version: 1.0 Archiver-Version: Plexus…
Antoniossss
  • 31,590
  • 6
  • 57
  • 99
0
votes
1 answer

Error starting JBOSS 7.0.0.0 Final - Services with missing/unavailable dependencies

I am having problems while starting a sample app on JBoss server 7.0. Below follow piece of start log: 12:19:10,156 ERROR [org.jboss.as] (MSC service thread 1-7) JBoss AS 7.0.0.Final "Lightning" started (with errors) in 16391ms - Started 207 of…
Tarcisio M.
  • 59
  • 3
  • 10
0
votes
2 answers

How to declare connection properties with ComboPooledDataSource or BasicDataSource

How to declare useFetchSizeWithLongColumn=true with Hibernate? either under com.mchange.v2.c3p0.ComboPooledDataSource or org.apache.commons.dbcp.BasicDataSource in a properties bean configuration file? I already tried:
Dobermaxx99
  • 318
  • 5
  • 16
0
votes
1 answer

javax.persistence.PersistenceException: [PersistenceUnit: NG] Error while reading JPA XML file: META-INF/SQLQueries.xml

I have tried several suggested methods to resolve this java persistence exception but have not been successful yet. Any suggestions or help would be greatly appreciated. Below are the details SQLQueries.xml -----------------------------
0
votes
1 answer

Need help in creating persistence.xml..?

I'm new to jbpm process. I'm using Eclipse to create jBPM process and to call it, For this we need persistance.xml it seems. I have no idea about it. Can somebody help me to create the persistance.xml file. How to create that file or if there is…
JustCode
  • 41
  • 1
  • 12
0
votes
1 answer

Disable internal logging of MOXy (eclipselink)

For a project I'm using MOXy in order to (un)marshal XML files, and I have some problem with it that I didn't have with the standard jaxb engine. But here, I'll focus on a single issue: I want to disable the internal logging of eclipselink. For…
Tiller
  • 436
  • 1
  • 4
  • 22
0
votes
1 answer

Openshift MySQL database contents resets at build

I am using Openshift to build an EJB database using MySQL. My application is working as expected. However, when I rebuild it, the database contents is removed and the database starts from empty. Here is my persistence unit from my persistence.xml …
0
votes
1 answer

Glassfish4.1 + Hibernate + persistence.xml = Exception

I'm trying to use hibernate as JTA provider in glassfish. For that purpose i created sample bean @Entity @Table public class BlogEntry implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue …
0
votes
1 answer

Unable to connect to MongoDB from local machine to Openshift using persistence.xml and hibernate ogm 4.1.1

I'm struggling to connect my jboss running on my local machine to a MongoDB database in Openshift. It works fine using a local database (localhost:27017). My persistence.xml:
JGS
  • 813
  • 2
  • 8
  • 17