mongodb,openshift,persistence.xml,hibernate-ogm
which version of OGM are you using? In the latest version the properties to specify host and port are: hibernate.ogm.datastore.host hibernate.ogm.datastore.port ...
java,jpa,jdbc,websphere,persistence.xml
Found it! These full JNDI names doesn't seem to work in Websphere. I used a plain "jdbc/sgodb" instead and it could find the context. <jta-data-source>jdbc/sgodb</jta-data-source> instead of <jta-data-source>java:comp/env/jdbc/sgodb</jta-data-source> ...
java,inner-classes,persistence.xml
Paragraph 2.1 of the JPA specifications: The entity class must be a top-level class. So you can't use a nested class for an entity. Make it a top-level class....
My problem was I didn't put the persistence.xml into a META-INF folder. After I fixed that everything worked.
create a orm file: <persistence-unit name="YOU_PU" ...> <provider>YOU_PROVIDER</provider> <mapping-file>orm.xml</mapping-file> Inside the ORM file you will write the entities. There is a sample here: https://github.com/uaihebert/uaicriteria/blob/master/src/test/resources/orm.xml...
I was using a wrong JDBC drive
java,xml,eclipse,maven,persistence.xml
Any way... i found a solution (i dont know if another one exists) and it was adding the resource into the <build> of the pom.xml <resource> <directory>src/main/resources/META-INF/</directory> <targetPath>${project.basedir}/target/classes/META-INF/</targetPath> <includes> <include>*.xml</include> </includes> </resource> ...
I think should always look at the root cause of exception. In your case Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named k19pu at javax.persistence.Persistence.createEntityManagerFactory Your persistence.xml is not valid that's why EntityManagerFactory can't be get created. due this you are also getting NLP at CarroRepository#buscaTodos method Caused by:...
If you rely on some non-IDE tool to build your app, you can enhance automatically during buildtime. For Maven, for example, see this
mysql,openshift,persistence.xml
You need to change your create-drop to something else, <property name="hibernate.hbm2ddl.auto" value="create-drop" /> Basically you are telling your application to drop all tables, and recreate them. You should look up other values for that option....
java,eclipselink,moxy,persistence.xml
The logging you wish to disable is SAX Parser logging. The odds are that at the moment there is no way to disable this logging from within MOXy. I have filed a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=461829
jboss7.x,datasource,persistence.xml
I use a method that works well for hibernate. 1) put the hibernate configuration properties in a xml file (call it hibernate.cfg.xml but it's not mandatory) this is an example: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>...
java,hibernate,jpa,entitymanager,persistence.xml
Finally, after 4 hours of googling, I found the reason: Artifacts folder must have lib folder in its root with needed libraries: Hope it will help someone....