Unable to build Hibernate SessionFactory - could not instantiate test object - java

I have a very strange error happening
I have a program developed in Java WEB using Hibernate to connect to the MySQL Database
The program is working correctly on several computers here but there is a computer that the program does not work!
I already tried to change the version of the server, the JDK and even the IDE and even then on this computer the program is not working
The error mentions that "could not instantiate test object" but I'm not doing any tests on any classes / objects on any computer where the project is working
Log
14:42:36,750 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 87) MSC000001: Failed to start service jboss.persistenceunit."SA2021.war#SA2021PU": org.jboss.msc.service.StartException in service jboss.persistenceunit."SA2021.war#SA2021PU": javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
at org.jboss.as.jpa#23.0.2.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:198)
at org.jboss.as.jpa#23.0.2.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:128)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at org.wildfly.security.elytron-private#1.15.3.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:664)
at org.jboss.as.jpa#23.0.2.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:213)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:832)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
at org.hibernate#5.3.20.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1327)
at org.hibernate#5.3.20.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1253)
at org.hibernate.jipijapa-hibernate5-3#23.0.2.Final//org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
at org.jboss.as.jpa#23.0.2.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:170)
... 10 more
Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
at org.hibernate#5.3.20.Final//org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:123)
at org.hibernate#5.3.20.Final//org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:77)
at org.hibernate#5.3.20.Final//org.hibernate.metamodel.internal.MetamodelImpl.initialize(MetamodelImpl.java:154)
at org.hibernate#5.3.20.Final//org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:295)
at org.hibernate#5.3.20.Final//org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:467)
at org.hibernate#5.3.20.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1250)
... 12 more
Caused by: org.hibernate.InstantiationException: could not instantiate test object : model.entity.Tabcadastro
at org.hibernate#5.3.20.Final//org.hibernate.engine.internal.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:43)
at org.hibernate#5.3.20.Final//org.hibernate.engine.internal.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:68)
at org.hibernate#5.3.20.Final//org.hibernate.tuple.PropertyFactory.buildIdentifierAttribute(PropertyFactory.java:62)
at org.hibernate#5.3.20.Final//org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:136)
at org.hibernate#5.3.20.Final//org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:557)
at org.hibernate#5.3.20.Final//org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:124)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.hibernate#5.3.20.Final//org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:96)
... 17 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.hibernate#5.3.20.Final//org.hibernate.engine.internal.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:40)
... 28 more
Caused by: java.lang.RuntimeException:
at deployment.SA2021.war//model.entity.Tabcadastro.<init>(Tabcadastro.java:1)
... 34 more
14:42:36,800 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "SA2021.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"SA2021.war#SA2021PU\"" => "javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
Caused by: org.hibernate.InstantiationException: could not instantiate test object : model.entity.Tabcadastro
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.RuntimeException: "}}
14:42:37,049 INFO [org.jboss.as.server] (ServerService Thread Pool -- 48) WFLYSRV0010: Deployed "SA2021.war" (runtime-name : "SA2021.war")
14:42:37,055 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.persistenceunit."SA2021.war#SA2021PU": javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
WFLYCTL0448: 142 additional services are down due to their dependencies being missing or failed
14:42:37,196 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
14:42:37,207 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 23.0.2.Final (WildFly Core 15.0.1.Final) started (with errors) in 22372ms - Started 683 of 1011 services (146 services failed or missing dependencies, 365 services are lazy, passive or on-demand)
14:42:37,212 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
14:42:37,212 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
14:42:52,501 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 18) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'SA2021.war#SA2021PU'
14:42:52,503 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0019: Stopped Driver service with driver-name = SA2021.war_com.mysql.cj.jdbc.Driver_8_0
14:42:52,547 INFO [org.infinispan.manager.DefaultCacheManager] (ServerService Thread Pool -- 18) Stopping cache manager null on null
14:42:52,561 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0028: Stopped deployment SA2021.war (runtime-name: SA2021.war) in 65ms
14:42:52,566 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "SA2021.war" (runtime-name: "SA2021.war")
14:42:54,989 INFO [org.jboss.as.jpa] (MSC service thread 1-4) WFLYJPA0002: Read persistence.xml for SA2021PU
14:42:55,123 INFO [org.jipijapa] (MSC service thread 1-6) JIPIORMV53020253: Second level cache enabled for SA2021.war#SA2021PU
14:42:55,201 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 18) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'SA2021.war#SA2021PU'
14:42:55,201 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 18) HHH000204: Processing PersistenceUnitInfo [
name: SA2021PU
...]
14:42:55,463 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0003: Processing weld deployment SA2021.war
14:42:56,114 INFO [io.jaegertracing.internal.JaegerTracer] (MSC service thread 1-6) No shutdown hook registered: Please call close() manually on application shutdown.
14:42:56,208 INFO [org.jipijapa] (MSC service thread 1-7) JIPIORMV53020253: Second level cache enabled for SA2021.war#SA2021PU
14:42:56,933 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.cj.jdbc.Driver (version 8.0)
14:42:57,250 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0018: Started Driver service with driver-name = SA2021.war_com.mysql.cj.jdbc.Driver_8_0
14:42:57,294 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 18) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'SA2021.war#SA2021PU'
14:42:57,299 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 18) HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
14:42:57,305 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 18) Envers integration enabled? : true
14:42:57,379 INFO [org.hibernate.orm.beans] (ServerService Thread Pool -- 18) HHH10005004: Stopping BeanContainer : org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl#26cf2ff5
14:42:57,383 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 18) MSC000001: Failed to start service jboss.persistenceunit."SA2021.war#SA2021PU": org.jboss.msc.service.StartException in service jboss.persistenceunit."SA2021.war#SA2021PU": javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
at org.jboss.as.jpa#23.0.2.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:198)
at org.jboss.as.jpa#23.0.2.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:128)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at org.wildfly.security.elytron-private#1.15.3.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:664)
at org.jboss.as.jpa#23.0.2.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:213)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:832)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
at org.hibernate#5.3.20.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1327)
at org.hibernate#5.3.20.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1253)
at org.hibernate.jipijapa-hibernate5-3#23.0.2.Final//org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
at org.jboss.as.jpa#23.0.2.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:170)
... 10 more
Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
at org.hibernate#5.3.20.Final//org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:123)
at org.hibernate#5.3.20.Final//org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:77)
at org.hibernate#5.3.20.Final//org.hibernate.metamodel.internal.MetamodelImpl.initialize(MetamodelImpl.java:154)
at org.hibernate#5.3.20.Final//org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:295)
at org.hibernate#5.3.20.Final//org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:467)
at org.hibernate#5.3.20.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1250)
... 12 more
Caused by: org.hibernate.InstantiationException: could not instantiate test object : model.entity.Tabcadastro
at org.hibernate#5.3.20.Final//org.hibernate.engine.internal.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:43)
at org.hibernate#5.3.20.Final//org.hibernate.engine.internal.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:68)
at org.hibernate#5.3.20.Final//org.hibernate.tuple.PropertyFactory.buildIdentifierAttribute(PropertyFactory.java:62)
at org.hibernate#5.3.20.Final//org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:136)
at org.hibernate#5.3.20.Final//org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:557)
at org.hibernate#5.3.20.Final//org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:124)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.hibernate#5.3.20.Final//org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:96)
... 17 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.hibernate#5.3.20.Final//org.hibernate.engine.internal.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:40)
... 28 more
Caused by: java.lang.RuntimeException:
at deployment.SA2021.war//model.entity.Tabcadastro.<init>(Tabcadastro.java:1)
... 34 more
14:42:57,426 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"SA2021.war#SA2021PU\"" => "javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
Caused by: org.hibernate.InstantiationException: could not instantiate test object : model.entity.Tabcadastro
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.RuntimeException: "}}
14:42:57,583 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0016: Replaced deployment "SA2021.war" with deployment "SA2021.war"
14:42:57,585 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.persistenceunit."SA2021.war#SA2021PU": javax.persistence.PersistenceException: [PersistenceUnit: SA2021PU] Unable to build Hibernate SessionFactory
My Tabcadastro class
package model.entity;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
#Entity
#Table(name="tabcadastro")
public class Tabcadastro implements Serializable{
#Id
#GeneratedValue(strategy = GenerationType.AUTO)
private Integer Id;
#Column
private String nome;
#Column
private String email;
#Column
private Integer cep;
#Column
private Integer cpf;
#Column
private String senha;
public Integer getId() {
return Id;
}
public void setId(Integer Id) {
this.Id = Id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Integer getCep() {
return cep;
}
public void setCep(Integer cep) {
this.cep = cep;
}
public Integer getCpf() {
return cpf;
}
public void setCpf(Integer cpf) {
this.cpf = cpf;
}
public String getSenha() {
return senha;
}
public void setSenha(String senha) {
this.senha = senha;
}
}
My Persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="SA2021PU" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>model.entity.Tabcadastro</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/bancodreambk?zeroDateTimeBehavior=CONVERT_TO_NULL"/>
<property name="javax.persistence.jdbc.user" value="root"/>
<property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
<property name="javax.persistence.schema-generation.database.action" value="create"/>
</properties>
</persistence-unit>
</persistence>

I ran into a similar issue recently, in a web app with relatively basic java code for entity persistence to a database, restful web services, and web UI code and supporting files such as images, for testing the restful services. The code was stable and functioned properly for several years, but after upgrading the environment and dev tools and rebuilding, I started getting an error during deployment to wildfly. The server produced the same stack trace - except originating from a different entity class - during deployment as described in this issue, on both wildfly 22 and 23, and a similar but not identical error on wildfly 11.
Eventually I found that the built-in deploy function in Netbeans fails, but building a war file and deploying it by hand to wildfly 23 succeeds. Specifically, the deploy function in netbeans deploys the project as a folder, projectname.war, and it fails to deploy properly in wildfly. Building the same project sources into war file in netbeans, projectname.war, and then deploying that war file by hand, by simply dropping it in the standalone deployment folder, succeeds. Whether the problem reported in the original post is due a similar issue is difficult to determine.
p.s. Here's the environment for my case:
windows 10
Apache Netbeans 12.3
adoptopenjdk's jdk-11.0.10.9-hotspot
wildfly (multiple versions tested)
postgresql 13 database running on the same box
postgresql jdbc driver 42.2.20
minimal persistence.xml referencing a jndi data source configured in wildfly

Looks like the constructor of Tabcadastro throws a RuntimeException. Did you recompile your code? Are you using some kind of Java Agent that transforms the constructor somehow?

Related

error when deploying my javaEE app - class not found jasypt/StrongPasswordEncryptor

Hi i have a javaEE application with wildfly server i use the library jasypt to encrypt password and at the time to run my server app it throws me this jasypt.StrongPasswordEncryptor class not found exception and other exceptions, any ideas of what is this exception caused by? here's the
server output:
18:51:59,300 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."ProyectoServidor.ear"."ProyectoEJB-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ProyectoServidor.ear"."ProyectoEJB-ejb.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "ProyectoEJB-ejb.jar" of deployment "ProyectoServidor.ear"
at org.jboss.as.server#18.1.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
at org.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class com.fannog.proyectoservidor.utils.Encryptor with ClassLoader ModuleClassLoader for Module "deployment.ProyectoServidor.ear.ProyectoEJB-ejb.jar" from Service Module Loader
at org.jboss.as.server#18.1.0.Final//org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:78)
at org.jboss.as.server#18.1.0.Final//org.jboss.as.server.deployment.reflect.ClassReflectionIndexUtil.findMethod(ClassReflectionIndexUtil.java:57)
at org.jboss.as.ejb3#26.1.0.Final//org.jboss.as.ejb3.deployment.processors.dd.DeploymentDescriptorMethodProcessor.handleStatelessSessionBean(DeploymentDescriptorMethodProcessor.java:99)
at org.jboss.as.ejb3#26.1.0.Final//org.jboss.as.ejb3.deployment.processors.dd.DeploymentDescriptorMethodProcessor.deploy(DeploymentDescriptorMethodProcessor.java:76)
at org.jboss.as.server#18.1.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
... 8 more
Caused by: java.lang.NoClassDefFoundError: org/jasypt/util/password/StrongPasswordEncryptor
at java.base/java.lang.Class.getDeclaredFields0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3297)
at java.base/java.lang.Class.getDeclaredFields(Class.java:2371)
at org.jboss.as.server#18.1.0.Final//org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
at org.jboss.as.server#18.1.0.Final//org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
... 12 more
Caused by: java.lang.ClassNotFoundException: org.jasypt.util.password.StrongPasswordEncryptor from [Module "deployment.ProyectoServidor.ear.ProyectoEJB-ejb.jar" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:200)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 17 more
Here is the wildfly server configuration (Standalone.xml) im using wildfly server wildfly-26.1.0.Final version
LINK: https://docs.google.com/document/d/1jBfLbo2Wm-3M8gR5Xw65zNyPBTQv-EynkvWb4gwVkQ4/edit?usp=sharing

jboss error: java.lang.NoSuchMethodError: org.hibernate.internal.CoreMessageLogger.debugf(Ljava/lang/String;I)V

I'm trying to create a simple hello world java web application that is using JPA through hibernate and using JBoss 6.4.0 as application Server. The application has been created through maven. Furthermore I'm using Intellij as an IDE. However when I run the application Server I receive the following error:
16:09:04,772 INFO [org.hibernate.Version] (ServerService Thread Pool -- 25) HHH000412: Hibernate Core {5.3.7.Final}
16:09:04,774 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 25) HHH000206: hibernate.properties not found
16:09:04,970 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 25) HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
16:09:05,141 WARN [org.hibernate.orm.connections.pooling] (ServerService Thread Pool -- 25) HHH10001002: Using Hibernate built-in connection pool (not for production use!)
16:09:05,145 INFO [org.hibernate.orm.connections.pooling] (ServerService Thread Pool -- 25) HHH10001005: using driver [com.mysql.cj.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/testdb]
16:09:05,146 INFO [org.hibernate.orm.connections.pooling] (ServerService Thread Pool -- 25) HHH10001001: Connection properties: {user=smattes, password=****}
16:09:05,147 INFO [org.hibernate.orm.connections.pooling] (ServerService Thread Pool -- 25) HHH10001003: Autocommit mode: false
16:09:05,150 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 25) MSC000001: Failed to start service jboss.persistenceunit.javahelloworld#NewPersistenceUnit: org.jboss.msc.service.StartException in service jboss.persistenceunit.javahelloworld#NewPersistenceUnit: java.lang.NoSuchMethodError: org.hibernate.internal.CoreMessageLogger.debugf(Ljava/lang/String;I)V
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_191]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_191]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
Caused by: java.lang.NoSuchMethodError: org.hibernate.internal.CoreMessageLogger.debugf(Ljava/lang/String;I)V
at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections.<init>(DriverManagerConnectionProviderImpl.java:276)
at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections.<init>(DriverManagerConnectionProviderImpl.java:260)
at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections$Builder.build(DriverManagerConnectionProviderImpl.java:401)
at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.buildPool(DriverManagerConnectionProviderImpl.java:112)
at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:75)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:100)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:94)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:179)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:119)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:904)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:935)
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99)
... 4 more
16:09:05,164 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) JBAS014612: Operation ("deploy") failed - address: ([("deployment" => "javahelloworld")]) - failure description: {"JBAS014671: Failed services" => {"jboss.persistenceunit.javahelloworld#NewPersistenceUnit" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.javahelloworld#NewPersistenceUnit: java.lang.NoSuchMethodError: org.hibernate.internal.CoreMessageLogger.debugf(Ljava/lang/String;I)V
Caused by: java.lang.NoSuchMethodError: org.hibernate.internal.CoreMessageLogger.debugf(Ljava/lang/String;I)V"}}
16:09:05,179 ERROR [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "javahelloworld.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.persistenceunit.javahelloworld#NewPersistenceUnit" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.javahelloworld#NewPersistenceUnit: java.lang.NoSuchMethodError: org.hibernate.internal.CoreMessageLogger.debugf(Ljava/lang/String;I)V
Caused by: java.lang.NoSuchMethodError: org.hibernate.internal.CoreMessageLogger.debugf(Ljava/lang/String;I)V"}}
16:09:05,211 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment javahelloworld (runtime-name: javahelloworld.war) in 42ms
16:09:05,213 INFO [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report
The persistence.xml file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" version="2.1">
<persistence-unit name="NewPersistenceUnit">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<class>jpa.AuthorsEntity</class>
<class>jpa.UserEntity</class>
<properties>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/testdb"/>
<property name="hibernate.connection.driver_class" value="com.mysql.cj.jdbc.Driver"/>
<property name="hibernate.connection.username" value="myusername"/>
<property name="hibernate.connection.password" value="mypassword"/>
<property name="hibernate.archive.autodetection" value="class"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hbm2ddl.auto" value="update"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.DB2400Dialect"/>
</properties>
</persistence-unit>
</persistence>
and the jpa.AuthorsEntity and jpa.UserEntity are two java Entity classes that correspond to the tables authors and user correspondingly.
Any help would be appreciated.
Such errors are typically caused by having different versions of a library on the compile time and runtime classpath.
Application servers - such as JBoss - typically provide their own versions of the Hibernate libraries at runtime. This version is then most likely incompatible with the compile time version specified in your POM.
JBoss AS 6.4 only supports JPA spec 2. You can then either roll-back the compile time Hibernate version in your POM to be compatible with the runtime dependency supplied by JBoss or, if you really need JPA 2.1 features, tell JBoss you are bundling the Hibernate libraries with your app.
For the former approach, this document indicates EAP 6.4 supports Hibarnate 4.2.18.Final
https://access.redhat.com/articles/112673#EAP_6
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.2.18.Final</version>
<!-- Don't bundle in the WAR as provided by the server -->
<scope>provided</scope>
</dependency>
Check there are no hibernate libs in the deployed war (as a result of transitive dependencies for example).
For the latter approach see here:
https://issues.jboss.org/browse/WFCORE-209?_sscc=t
for future readers, recently i had this issues, i had in the project the hibernate version 5.1 with glassfish 4.1 and it is generated this issues, for resolved i agregated in the WEB-INF folder the file glassfish-web.xml
as i showing to continuation
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<class-loader delegate="false"/>
</glassfish-web-app>

Error getting reflective information for class

I am running dynamic web project in Wildfly 10.1.0. I have richfaces-ui.3.3.3.jar in my WEB-INF\lib folder but I am still getting this error.
I have this library included in my web-inf folder
10:32:09,011 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment RGWeb.war (runtime-name: RGWeb.war) in 110ms
10:32:09,012 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "RGWeb.war" (runtime-name: "RGWeb.war")
10:32:18,918 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry logkit-1.2.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGWeb.war/WEB-INF/lib/jacorb.jar does not point to a valid jar for a Class-Path reference.
10:32:18,919 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry avalon-framework-4.1.5.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGWeb.war/WEB-INF/lib/jacorb.jar does not point to a valid jar for a Class-Path reference.
10:32:18,919 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry concurrent-1.3.2.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGWeb.war/WEB-INF/lib/jacorb.jar does not point to a valid jar for a Class-Path reference.
10:32:18,919 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry antlr-2.7.2.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGWeb.war/WEB-INF/lib/jacorb.jar does not point to a valid jar for a Class-Path reference.
10:32:18,936 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry activation.jar in /D:/wildfly-10.1.0.Final/standalone/deployments/RGWeb.war/WEB-INF/lib/mail.jar does not point to a valid jar for a Class-Path reference.
10:32:19,679 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."RGWeb.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."RGWeb.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "RGWeb.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class com.revguru.crs.web.rm.vo.RevenueRules with ClassLoader ModuleClassLoader for Module "deployment.RGWeb.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
Caused by: java.lang.NoClassDefFoundError: Lorg/richfaces/component/html/HtmlDataTable;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)
... 10 more
Caused by: java.lang.ClassNotFoundException: org.richfaces.component.html.HtmlDataTable from [Module "deployment.RGWeb.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
... 15 more
10:32:19,680 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"RGWeb.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"RGWeb.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"RGWeb.war\"
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class com.revguru.crs.web.rm.vo.RevenueRules with ClassLoader ModuleClassLoader for Module \"deployment.RGWeb.war:main\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: Lorg/richfaces/component/html/HtmlDataTable;
Caused by: java.lang.ClassNotFoundException: org.richfaces.component.html.HtmlDataTable from [Module \"deployment.RGWeb.war:main\" from Service Module Loader]"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"RGWeb.war\".POST_MODULE"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
10:32:19,710 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0016: Replaced deployment "RGWeb.war" with deployment "RGWeb.war"
10:32:19,711 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."RGWeb.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."RGWeb.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "RGWeb.war"
service jboss.deployment.unit."RGWeb.war".POST_MODULE
From Wildfly.org webpage:
Java 7 support has been discontinued allowing for deeper
integration with the Java 8 runtime. While Java 9 is still in
development, this release runs on the current development snapshots.
Please make sure, you build your war with Java 1.8
I got this error when I accidently deployed a JAR file instead of a WAR file. Sometimes it's not easy to figure out such simple failures.
Maybe this is your case?
Good luck.
This error comes if your java class is referring for some jar or xml file like persistence.xml and does not exists
In my case when i try to deploy a war file it gave me the error you are pointing.
the thing is there is a line called
java.lang.**NoClassDefFoundError**: Lorg/richfaces/component/html/HtmlDataTable; at java.lang.Class.getDeclaredFields0(Native Method)
that means wildfly is looking for Lorg/richfaces/component/html/HtmlDataTable
and it cannot find that in given location
you can check if the module is really there.if not put the module to correct location and it will work.hope this is helpfull to someone

jboss Services which failed to start

During deployment to jbosss 7.2.final, the ear project received the following error exception:
JBAS014777: Services which failed to start: service
jboss.persistenceunit."Morfeusflex-ear-1.0.ear/Morfeusflex-
ejb-1.0.jar#MorfeusflexPU": org.jboss.msc.service.StartException in
service jboss.persistenceunit."Morfeusflex-ear-1.0.ear/Morfeusflex-
ejb-1.0.jar#MorfeusflexPU": java.lang.AbstractMethodError
This error happened when I upgraded hibernate 3 to hibernate 5 in the pom.xml file.
All Exceptions from log file
16:14:30,049 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 312) MSC00001: Failed to start service jboss.persistenceunit."Morfeusflex-ear-1.0.ear/Morfeusflex-ejb-1.0.jar#MorfeusflexPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."Morfeusflex-ear-1.0.ear/Morfeusflex-ejb-1.0.jar#MorfeusflexPU": java.lang.AbstractMethodError
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_76]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_76]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_76]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.AbstractMethodError
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:303)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1742)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99)
... 4 more
16:14:30,055 FINE [javax.xml.bind] (MSC service thread 1-7) Trying to locate morfeusflex/service/billingaddress/jaxws_asm/jaxb.properties
16:14:30,056 FINE [javax.xml.bind] (MSC service thread 1-7) not found
16:14:30,435 FINE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 309) javax.naming.NameNotFoundException: env/ClientStateSavingPassword -- service jboss.naming.context.java.module."Morfeusflex-ear-1.0"."Morfeusflex-web-1.0".env.ClientStateSavingPassword
16:14:30,435 FINE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 309) javax.naming.NameNotFoundException: env/jsf/ProjectStage -- service jboss.naming.context.java.module."Morfeusflex-ear-1.0"."Morfeusflex-web-1.0".env.jsf.ProjectStage
{"JBAS014671: Failed services" => {"jboss.persistenceunit.\"Morfeusflex-ear-1.0.ear/Morfeusflex-ejb-1.0.jar#MorfeusflexPU\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"Morfeusflex-ear-1.0.ear/Morfeusflex-ejb-1.0.jar#MorfeusflexPU\": java.lang.AbstractMethodError
16:14:31,954 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 313) MSC00001: Failed to start service jboss.persistenceunit."Morfeusflex-ear-1.0.ear/Morfeusflex-ejb-1.0.jar#MorfeusflexPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."Morfeusflex-ear-1.0.ear/Morfeusflex-ejb-1.0.jar#MorfeusflexPU": java.lang.AbstractMethodError
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_76]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_76]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_76]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.AbstractMethodError
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:303)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1742)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99)
... 4 more
16:14:32,507 FINE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 308) javax.naming.NameNotFoundException: env/ClientStateSavingPassword -- service jboss.naming.context.java.module."Morfeusflex-ear-1.0"."Morfeusflex-web-1.0".env.ClientStateSavingPassword
16:14:32,507 FINE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 308) javax.naming.NameNotFoundException: env/jsf/ProjectStage -- service jboss.naming.context.java.module."Morfeusflex-ear-1.0"."Morfeusflex-web-1.0".env.jsf.ProjectStage
Please have a look and provide me solution

JDBC_PING on infinispan server not working

I'm in phase of experimentation with infinispan server and I have a problem in set-up a infinispan cluster on my local machine.
Configuration files:
I change configuration file cluster.xml by changing part of jgroup stack with udp stack and jdbc_ping discovery.
<subsystem xmlns="urn:infinispan:server:jgroups:7.0" default-stack="${jboss.default.jgroups.stack:udp-jdbc}">
<stack name="udp-jdbc">
<transport type="UDP" socket-binding="jgroups-udp">
<property name="ip_mcast">false</property>
</transport>
<protocol type="JDBC_PING">
<property name="connection_url">jdbc:mysql://localhost/jgroups</property>
<property name="connection_username">root</property>
<property name="connection_password">root</property>
<property name="connection_driver">com.mysql.jdbc.Driver</property>
</protocol>
<protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
<protocol type="RSVP"/>
</stack>
I put mysql driver in folder standalone/deployments, run the server and here is what I have as output
20:13:15,389 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "mysql-connector-java-5.1.34-bin.jar" (runtime-name: "mysql-connector-java-5.1.34-bin.jar")
20:13:15,461 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.jgroups.channel.clustered: org.jboss.msc.service.StartException in service jboss.jgroups.channel.clustered: java.lang.IllegalArgumentException: JDBC Driver required for JDBC_PING protocol could not be loaded: 'com.mysql.jdbc.Driver'
at org.jboss.as.clustering.jgroups.subsystem.ChannelService.start(ChannelService.java:74)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
Caused by: java.lang.IllegalArgumentException: JDBC Driver required for JDBC_PING protocol could not be loaded: 'com.mysql.jdbc.Driver'
at org.jgroups.protocols.JDBC_PING.loadDriver(JDBC_PING.java:267)
at org.jgroups.protocols.JDBC_PING.init(JDBC_PING.java:93)
at org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:860)
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:481)
at org.jgroups.JChannel.init(JChannel.java:848)
at org.jgroups.JChannel.<init>(JChannel.java:159)
at org.jboss.as.clustering.jgroups.JChannelFactory.createChannel(JChannelFactory.java:87)
at org.jboss.as.clustering.jgroups.subsystem.ChannelService.start(ChannelService.java:69)
... 5 more
20:13:15,559 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
20:13:15,561 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.fabric.jdbc.FabricMySQLDriver (version 5.1)
20:13:15,563 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) JBAS010417: Started Driver service with driver-name = mysql-connector-java-5.1.34-bin.jar_com.mysql.jdbc.Driver_5_1
20:13:15,564 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) JBAS010417: Started Driver service with driver-name = mysql-connector-java-5.1.34-bin.jar_com.mysql.fabric.jdbc.FabricMySQLDriver_5_1
20:13:15,597 INFO [org.jboss.as.server] (ServerService Thread Pool -- 18) JBAS018559: Deployed "mysql-connector-java-5.1.34-bin.jar" (runtime-name : "mysql-connector-java-5.1.34-bin.jar")
20:13:15,599 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.jgroups.channel.clustered: org.jboss.msc.service.StartException in service jboss.jgroups.channel.clustered: java.lang.IllegalArgumentException: JDBC Driver required for JDBC_PING protocol could not be loaded: 'com.mysql.jdbc.Driver'
As you can see from the jboss log, the subsystem infinispan:server:jgroups failed to start because the JDBC driver isn't loaded (required by JDBC_PING), but after that step infinispan server successfully deployed mysql jdbc driver. This same error occupy in conditions where I work with datasource.
Is there any way to tell the infinispan:server:jgroups subsystem to be started before driver loading or before jndi naming creation ?
Or any workaround that will help
Thanks in advance
For direct JDBC use, you need to allow JGroups module to load your JDBC driver module. To do that, install JDBC driver jar as a module, then open modules/system/layers/base/org/jgroups/main/module.xml, add your JDBC driver module under the dependencies section.
For datasource lookup with EAGER caches, I think it's currently not possible to ensure that the datasource is available before JGroups tries to use it. The services boot order is controlled by programmatic dependencies but there is no way to declare the dependencies through config files so JGroups doesn't wait for the datasource.

Categories