I understand that there are reports of porting from 3.x to 4.x.
However, I cannot decrypt and match what these guides say, what I need to do with my maven dependencies or my code.
In particular, the operation ended after
TypedQuery q = em.createQuery (blah ..);
in
List result = q.getResultList ();
When the driver tries to get a connection, ending with croaking
No suitable driver found ...
I could not find direct answers about whether I need
- make changes to persistence.xml
- make changes to my code
- rebuild my jpa paradigm
Are there any changes in my code and my maven dependencies? Do I even have to work hard to get used to hibernation 4?
persistence.xml:
<?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"> <persistence-unit name="z666" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>z666.Node</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect" /> <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" /> <property name="hibernate.show_sql" value="true" /> <property name="hibernate.connection.username" value="zzz" /> <property name="hibernate.connection.password" value="666" /> <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/z666" /> <property name="hibernate.max_fetch_depth" value="3" /> </properties> </persistence-unit> </persistence>
source share