• Register
0 votes
3.2k views

Problem :

I am very new to the hibernate and I want to set up two classes. Also want to create a one to one bidirectional dependency using annotations. I have added all the libraries to the build path.

But when i try to run the simple main class by creating some objects and saving them, for testing purpose I face the following issues.

INFO: HHH000397: Using ASTQueryTranslatorFactory
%%%% Error Creating SessionFactory %%%% 
org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister

Because of this error I am confused. My  SQL DB is running via XAMPP.

May I get the solution for above error?

6 5 3
7,540 points

1 Answer

0 votes

Solution :

I guess you must be missing the setter method for your some property as pointed by the exception

Please try add the setter as follows :

 public void setSome (long some) {
      this. some = some;
 }

 

If above solution is not working for you then you must be having the problem because of conflicting Jars.

Below is the full list of jars which is working absolutely fine for me.

antlr-2.7.7.jar
byte-buddy-1.8.12.jar
c3p0-0.9.5.2.jar
classmate-1.3.4.jar
dom4j-1.6.1.jar
geolatte-geom-1.3.0.jar
hibernate-c3p0-5.3.1.Final.jar
hibernate-commons-annotations-5.0.3.Final.jar
hibernate-core-5.3.1.Final.jar
hibernate-envers-5.3.1.Final.jar
hibernate-jpamodelgen-5.3.1.Final.jar
hibernate-osgi-5.3.1.Final.jar
hibernate-proxool-5.3.1.Final.jar
hibernate-spatial-5.3.1.Final.jar
jandex-2.0.3.Final.jar
javassist-3.22.0-GA.jar
javax.interceptor-api-1.2.jar
javax.persistence-api-2.2.jar
jboss-logging-3.3.2.Final.jar
jboss-transaction-api_1.2_spec-1.1.1.Final.jar
jts-core-1.14.0.jar
mchange-commons-java-0.2.11.jar
mysql-connector-java-5.1.21.jar
org.osgi.compendium-4.3.1.jar
org.osgi.core-4.3.1.jar
postgresql-42.2.2.jar
proxool-0.8.3.jar
slf4j-api-1.6.1.jar

 

9 7 4
38,600 points

Related questions

0 votes
1 answer 1.8K views
1.8K views
Problem : I want to configure the hibernate orm mapping tool to my java class and want to use PostgreSQL as my database also I have configured the password as "password". But when I tried to run the application, I am facing following error ... in thread "main" org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
asked Dec 4, 2019 alecxe 7.5k points
0 votes
2 answers 241 views
241 views
Problem : I want to run the spring-boot application which uses thre hibernate via spring-jpa, but i am facing below error: Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo ... .AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:345) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:308)
asked Jan 3 alecxe 7.5k points
0 votes
1 answer 3.7K views
3.7K views
Problem : After executing spring boot with h2 database and JPA i am facing below error org.hibernate.tool.schema.spi.commandacceptanceexception: error executing ddl via jdbc statement
asked Nov 12, 2019 peterlaw 6.9k points