Introduction
This article is showing how to solve a specific error message. The error message exist in the log output of the Wildfly Java Application Server. There is a war file generated as an output from building and compiling a Java-based program. Furthermore, it is a Java-based program using Spring Boot framework. The process itself is using maven as its builder tool in a Netbeans IDE. The following are the full log output displaying the error message upon deployment process :
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"apps.war\".undertow-deployment" => "java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer] Caused by: java.lang.reflect.InvocationTargetException Caused by: java.lang.NullPointerException"}}
Solution
This part will discuss about the solution for solving the error message exist in the introduction part. Actually, the error exist as in the last part of the output log of the Wildfly Application Server upon deployment process :
Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
The solution is quite simple. After searching thoroughly, just add another package definition. That package definition exist as follows :
<dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> <version>3.28.0-GA</version> </dependency>
Generally, just add the package definition of ‘org.javassist.javassist’. The version may be vary but the actual solution which ends in a success is using the version of ‘3.28.0-GA’. So, after adding the definition of the above package, just build and compile it once more. After finishing the process, try to deploy it once more in Wildfly Application Server. In this article, it is using a Wildfly Java Application Server with the version of 20.0.1.Final.