-3
This my project does not recognize my Persistence Provider. It follows the same below.
Your location plus dependencies:
I’m calling the same through a very simple XHTML using a Managebean. Below images:
Finally follows the error image.
-3
This my project does not recognize my Persistence Provider. It follows the same below.
Your location plus dependencies:
I’m calling the same through a very simple XHTML using a Managebean. Below images:
Finally follows the error image.
3
The problem was simple! The code was correct...
There was a problem because the in my pom.xml made explicit for the dependencies to be Provider. That is, at the time of going up to the server, War went without the dependencies.
To solve the problem, I started using a server with the project libs already inside the server lib folder and this solved the problem. You could also use a specific attribute (which I now can’t remember the name) to force War to generate with the dependencies, but this was not the case since the default here in the sector is to leave the libs on the server itself.
Thank you for your attention!
Browser other questions tagged java jsf hibernate
You are not signed in. Login or sign up in order to post.
@Jokanaan, try taking your
<provider/>
of the comment area?<!-- -->
in thepersistence.xml
– Marcos Sousa
@Jocsã try to get persistence.xml out of META-INF, leave it only inside Resources. And also try to do what Marcos suggested.
– DiegoAugusto
Hello @Renan the version of Hibernate is the same as the version of Parent, that is, the other projects we use here. We use Nexus, and we always try to use the same versions.
– Jocsã
@Marcossousa I’ve left without Provider, and I’ve also used both org.hibernate.jpa.Hibernatepersistenceprovider and org.hibernate.ejb.Hibernatepersistence and nothing.
– Jocsã
@Diegoaugusto I tried the same way. I even put inside the java folder, but without success. I thank everyone for their attention!
– Jocsã
The correct location is within the /Resources META-INF, you need to add the Provider
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
I also saw a blank in the true value in show_sql.– Dilnei Cunha
These code images help little, or even harm. Prefer to put the same code.
– Maniero
Is this class up to date? Because in your error log you accuse line 24 of the Viewjocsa class, but line 24 there is a blank line. If it is, clean the design and test again.
– Giuliana Bezerra
I managed to solve the problem, I do not know why they gave - in question. Anyway... I will answer the question.
– Jocsã
@Dilneicunha persistence was in the right place, the problem was other. Grateful!
– Jocsã
@bigown preferences, each has its own. Grateful!
– Jocsã
@Giulianabezerra managed to solve the problem and closed this topic. Grateful!
– Jocsã
Read this: http://meta.pt.stackoverflow.com/q/5149/132
– Victor Stafusa
@John as Victor showed is not a matter of preference. It makes the work of those who want to help you very difficult. Since you are asking for help, would you be so kind as to facilitate the work of this person who is earning nothing and has no obligation whatsoever.
– Maniero