WildFly 27.0.0.Final and PostgreSQL driver not found or installed

4,892 views
Skip to first unread message

Betto McRose DEV

unread,
Nov 28, 2022, 2:25:50 PM11/28/22
to WildFly
Hi all
I started to migrate a system to Jakarta EE 10

I just cannot get deploy my war because of postgresql driver not found or no installed

Case 1: everything by default and configs as before... meaning:
-> copied my postgres module from WF26
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="org.postgresql">
    <resources>
        <resource-root path="postgresql-42.2.5.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
    </dependencies>
</module>

with this configuration I had this errors
16:12:00,843 INFO  [org.jipijapa] (MSC service thread 1-3) JIPIORMV6020260: Second level cache enabled for skymed-core.war#skytelSkyMedCore
16:12:00,844 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 81) MSC000001: Failed to start service jboss.persistenceunit."skymed-core.war#skytelSkyMedCore".__FIRST_PHASE__: org.jboss.msc.service.StartException in service jboss.persistenceunit."skymed-core.war#skytelSkyMedCore".__FIRST_PHASE__: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.reactive.provider.impl.ReactiveIntegrator could not be instantiated
    at org.jbos...@27.0.0.Final//org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:130)
    at org.jbos...@27.0.0.Final//org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:106)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at org.wildfly.secu...@2.0.0.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:664)
    at org.jbos...@27.0.0.Final//org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1.run(PhaseOnePersistenceUnitServiceImpl.java:139)
    at org.jbos...@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at org.jbos...@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.reactive.provider.impl.ReactiveIntegrator could not be instantiated
    at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:586)
    at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:813)
    at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:729)
    at org.hi...@6.1.5.Final//org.hibernate.boot.registry.classloading.internal.AggregatedServiceLoader$ClassPathAndModulePathAggregatedServiceLoader.collectServiceIfNotDuplicate(AggregatedServiceLoader.java:184)
    at org.hi...@6.1.5.Final//org.hibernate.boot.registry.classloading.internal.AggregatedServiceLoader$ClassPathAndModulePathAggregatedServiceLoader.loadAll(AggregatedServiceLoader.java:125)
    at org.hi...@6.1.5.Final//org.hibernate.boot.registry.classloading.internal.AggregatedServiceLoader$ClassPathAndModulePathAggregatedServiceLoader.getAll(AggregatedServiceLoader.java:112)
    at org.hi...@6.1.5.Final//org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:241)
    at org.hi...@6.1.5.Final//org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:38)
    at org.hi...@6.1.5.Final//org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:191)
    at org.hi...@6.1.5.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildBootstrapServiceRegistry(EntityManagerFactoryBuilderImpl.java:495)
    at org.hi...@6.1.5.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:241)
    at org.hi...@6.1.5.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:189)
    at org.hi...@6.1.5.Final//org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:35)
    at org.hi...@6.1.5.Final//org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:102)
    at org.hibernate.ji...@27.0.0.Final//org.jboss.as.jpa.hibernate.TwoPhaseBootstrapImpl.<init>(TwoPhaseBootstrapImpl.java:40)
    at org.hibernate.ji...@27.0.0.Final//org.jboss.as.jpa.hibernate.HibernatePersistenceProviderAdaptor.getBootstrap(HibernatePersistenceProviderAdaptor.java:233)
    at org.jbos...@27.0.0.Final//org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.createContainerEntityManagerFactoryBuilder(PhaseOnePersistenceUnitServiceImpl.java:256)
    at org.jbos...@27.0.0.Final//org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:127)
    ... 10 more
Caused by: java.lang.NoClassDefFoundError: javax/persistence/PersistenceException
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:467)
    at org.jbos...@3.4.3.Final//org.jboss.logging.Logger.doGetMessageLogger(Logger.java:2562)
    at org.jbos...@3.4.3.Final//org.jboss.logging.Logger.getMessageLogger(Logger.java:2530)
    at org.jbos...@3.4.3.Final//org.jboss.logging.Logger.getMessageLogger(Logger.java:2516)
    at deployment.skymed-core.war//org.hibernate.reactive.logging.impl.LoggerFactory.make(LoggerFactory.java:20)
    at deployment.skymed-core.war//org.hibernate.reactive.provider.impl.ReactiveIntegrator.<clinit>(ReactiveIntegrator.java:42)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:789)
    ... 26 more
Caused by: java.lang.ClassNotFoundException: javax.persistence.PersistenceException from [Module "deployment.skymed-core.war" 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)
    ... 39 more

16:12:00,872 WARN  [org.jboss.as.jaxrs] (MSC service thread 1-3) WFLYRS0018: Explicit usage of Jackson annotation in a Jakarta RESTful Web Services deployment; the system will disable Jakarta JSON Binding processing for the current deployment. Consider setting the 'resteasy.preferJacksonOverJsonB' property to 'false' to restore Jakarta JSON Binding.
16:12:00,900 INFO  [org.jboss.weld.Version] (MSC service thread 1-3) WELD-000900: 5.1.0 (Final)
16:12:01,150 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "skymed-core.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"skymed-core.war#skytelSkyMedCore\".__FIRST_PHASE__" => "java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.reactive.provider.impl.ReactiveIntegrator could not be instantiated
    Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.reactive.provider.impl.ReactiveIntegrator could not be instantiated
    Caused by: java.lang.NoClassDefFoundError: javax/persistence/PersistenceException
    Caused by: java.lang.ClassNotFoundException:
javax.persistence.PersistenceException from [Module \"deployment.skymed-core.war\" from Service Module Loader]"}}

Case 2: reading some stuff here and in stackoverflow I change thinks like
the module: 

<?xml version="1.0" encoding="UTF-8"?>
<module name="org.postgresql.jdbc" xmlns="urn:jboss:module:1.9">
    <resources>
        <resource-root path="postgresql-42.5.0.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
    </dependencies>
</module>

and in the standalonexml:
                <drivers>
                    <driver name="postgresql" module="org.postgresql.jdbc">
                        <driver-class>org.postgresql.Driver</driver-class>
                        <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
                    </driver>
                    <driver name="h2" module="com.h2database.h2">
                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                    </driver>
                </drivers>

and I got ....
16:21:00,910 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 45) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "postgresql")
]) - failure description: "WFLYJCA0115: Module for driver [org.postgresql.jdbc] or one of it dependencies is missing: [org.postgresql.jdbc]"

.....
16:21:17,372 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "SkymedDS")
]) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.postgresql"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
        "jboss.driver-demander.java:jboss/datasources/SkymedDS is missing [jboss.jdbc-driver.postgresql]",
        "org.wildfly.data-source.SkymedDS is missing [jboss.jdbc-driver.postgresql]"
    ]
}
16:21:17,373 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "SkymedDS")
]) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => [
        "jboss.jdbc-driver.postgresql",
        "jboss.jdbc-driver.postgresql"
    ],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
        "jboss.driver-demander.java:jboss/datasources/SkymedDS is missing [jboss.jdbc-driver.postgresql]",
        "org.wildfly.data-source.SkymedDS is missing [jboss.jdbc-driver.postgresql]",
        "org.wildfly.data-source.SkymedDS is missing [jboss.jdbc-driver.postgresql]"
    ]
}
16:21:17,379 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 46) WFLYSRV0010: Deployed "skymed-core.war" (runtime-name : "skymed-core.war")
16:21:17,380 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184:    New missing/unsatisfied dependencies:
      service jboss.jdbc-driver.postgresql (missing) dependents: [service org.wildfly.data-source.SkymedDS, service jboss.driver-demander.java:jboss/datasources/SkymedDS]
WFLYCTL0448: 27 additional services are down due to their dependencies being missing or failed


and now I don't know what else to try

any ideas ?

Emmanuel Hugonnet

unread,
Nov 28, 2022, 2:54:44 PM11/28/22
to Betto McRose DEV, WildFly
javax.persistence.PersistenceException is Java EE8 while WildFly 27 is JakartaEE 10.
Are you sure your application is using the JakartaEE namespace ?
Cheers,
Emmanuel


Le 28/11/2022 à 20:25, Betto McRose DEV a écrit :
> Hi all
> I started to migrate a system to Jakarta EE 10
>
> I just cannot get deploy my war because of postgresql driver not found or no installed
>
> *Case 1:* /everything by default and configs as before... meaning:/
> -> copied my postgres module from WF26
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.3" name="org.postgresql">
>     <resources>
>         <resource-root path="postgresql-42.2.5.jar"/>
>     </resources>
>     <dependencies>
>         <module name="javax.api"/>
>         <module name="javax.transaction.api"/>
>     </dependencies>
> </module>
>
> */with this configuration I had this errors/*
>     Caused by: *java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider
> org.hibernate.reactive.provider.impl.ReactiveIntegrator could not be instantiated
>     Caused by: java.lang.NoClassDefFoundError: javax/persistence/PersistenceException
>     Caused by: java.lang.ClassNotFoundException:* javax.persistence.PersistenceException from [Module \"deployment.skymed-core.war\" from
> Service Module Loader]"}}
>
> *Case 2: */reading some stuff here and in stackoverflow I change thinks like/
> /the module:**/
>
> <?xml version="1.0" encoding="UTF-8"?>
> <module name="org.postgresql*.jdbc*" xmlns="urn:jboss:module:1.9">
>     <resources>
>         <resource-root path="postgresql-42.5.0.jar"/>
>     </resources>
>     <dependencies>
>         <module name="javax.api"/>
>         <module name="javax.transaction.api"/>
>     </dependencies>
> </module>
>
> /and in the standalonexml:/
>                 <drivers>
>                     <driver name="postgresql" module="org.postgresql.jdbc">
> <driver-class>org.postgresql.Driver</driver-class>
> <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
>                     </driver>
>                     <driver name="h2" module="com.h2database.h2">
> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
>                     </driver>
>                 </drivers>
>
> /and I got ..../
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wildfly/820a28c3-80b8-4a27-9e35-b5fd8f1a0295n%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/820a28c3-80b8-4a27-9e35-b5fd8f1a0295n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Betto McRose DEV

unread,
Nov 28, 2022, 3:37:18 PM11/28/22
to WildFly
yes, that is the more strange part

        <dependency>
            <groupId>jakarta.platform</groupId>
            <artifactId>jakarta.jakartaee-api</artifactId>
            <version>10.0.0</version>
            <scope>provided</scope>
        </dependency>

and for example:
import jakarta.enterprise.inject.Produces;
import jakarta.enterprise.inject.spi.InjectionPoint;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

public class Resources {

    @Produces
    @PersistenceContext(unitName="myDataSource")
    private EntityManager em;

just in case, I will review all entities and services

Emmanuel Hugonnet

unread,
Nov 29, 2022, 4:18:25 AM11/29/22
to Betto McRose DEV, WildFly
I don't see org.hibernate.reactive.provider.impl.ReactiveIntegrator in WildFly Hibernate module but this is not my area of expertise.
Are you by any chance adding hibernate-reactive as part of your war ?
Emmanuel
> <https://groups.google.com/d/msgid/wildfly/820a28c3-80b8-4a27-9e35-b5fd8f1a0295n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wildfly/b7219843-7855-49d5-93db-42e2c9ffa508n%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/b7219843-7855-49d5-93db-42e2c9ffa508n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Betto McRose DEV

unread,
Nov 29, 2022, 7:01:35 AM11/29/22
to WildFly
man, I have a jar with entities from other project that uses quarkus-reactive-panache
I guess I will remove that before it gets creepy 



Betto McRose DEV

unread,
Nov 29, 2022, 9:09:10 AM11/29/22
to WildFly
everything corrected
reploying... no more errors

but! restarting the server throws this

11:04:50,529 INFO  [org.jboss.modules] (main) JBoss Modules version 2.0.3.Final
11:04:51,342 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.13.Final
11:04:51,350 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
11:04:51,475 INFO  [org.jboss.as] (MSC service thread 1-3) WFLYSRV0049: WildFly Full 27.0.0.Final (WildFly Core 19.0.0.Final) starting
11:04:52,282 INFO  [org.wildfly.security] (ServerService Thread Pool -- 28) ELY00001: WildFly Elytron version 2.0.0.Final
11:04:52,688 WARN  [org.jboss.as.controller] (ServerService Thread Pool -- 8) WFLYCTL0481: The runtime dependency package 'io.smallrye.opentracing-contrib' is already registered at location '/subsystem=microprofile-opentracing-smallrye'
11:04:52,689 WARN  [org.jboss.as.controller] (ServerService Thread Pool -- 8) WFLYCTL0481: The runtime dependency package 'io.smallrye.opentracing-contrib' is already registered at location '/subsystem=microprofile-opentracing-smallrye'
11:04:52,998 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 26) WFLYCTL0028: Attribute 'cluster' in the resource at address '/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
11:04:53,087 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found skymed-core.war in deployment directory. To trigger deployment create a file called skymed-core.war.dodeploy
11:04:53,125 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
11:04:53,147 INFO  [org.xnio] (MSC service thread 1-5) XNIO version 3.8.8.Final
11:04:53,161 INFO  [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementation Version 3.8.8.Final
11:04:53,224 INFO  [org.jboss.as.jaxrs] (ServerService Thread Pool -- 58) WFLYRS0016: RESTEasy version 6.2.1.Final
11:04:53,252 INFO  [org.wildfly.extension.health] (ServerService Thread Pool -- 55) WFLYHEALTH0001: Activating Base Health Subsystem
11:04:53,263 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 76) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
11:04:53,264 INFO  [org.wildfly.extension.elytron.oidc._private] (ServerService Thread Pool -- 54) WFLYOIDC0001: Activating WildFly Elytron OIDC Subsystem
11:04:53,264 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 56) WFLYCLINF0001: Activating Infinispan subsystem.
11:04:53,272 INFO  [org.wildfly.extension.microprofile.config.smallrye] (ServerService Thread Pool -- 66) WFLYCONF0001: Activating MicroProfile Config Subsystem
11:04:53,275 INFO  [org.wildfly.extension.microprofile.jwt.smallrye] (ServerService Thread Pool -- 67) WFLYJWT0001: Activating MicroProfile JWT Subsystem
11:04:53,292 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 63) WFLYJSF0007: Activated the following Jakarta Server Faces Implementations: [main]
11:04:53,323 INFO  [org.wildfly.extension.microprofile.opentracing] (ServerService Thread Pool -- 68) WFLYTRACEXT0001: Activating MicroProfile OpenTracing Subsystem
11:04:53,327 INFO  [org.wildfly.extension.metrics] (ServerService Thread Pool -- 65) WFLYMETRICS0001: Activating Base Metrics Subsystem
11:04:53,331 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 57) WFLYIO001: Worker 'default' has auto-configured to 16 IO threads with 128 max task threads based on your 8 available processors
11:04:53,357 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 69) WFLYNAM0001: Activating Naming Subsystem
11:04:53,384 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 78) WFLYWS0002: Activating WebServices Extension
11:04:53,423 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "skymed-core.war" (runtime-name: "skymed-core.war")
11:04:53,470 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0003: Undertow 2.3.0.Final starting
11:04:53,492 INFO  [org.jboss.as.connector] (MSC service thread 1-6) WFLYJCA0009: Starting Jakarta Connectors Subsystem (WildFly/IronJacamar 1.5.9.Final)
11:04:53,512 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 45) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 42.5)
11:04:53,568 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 45) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 2.1)
11:04:53,591 INFO  [org.jboss.remoting] (MSC service thread 1-6) JBoss Remoting version 5.0.26.Final
11:04:53,634 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = postgresql
11:04:53,636 INFO  [org.jboss.as.naming] (MSC service thread 1-2) WFLYNAM0003: Starting Naming Service
11:04:53,641 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = h2
11:04:53,642 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
11:04:53,658 WARN  [org.wildfly.extension.elytron] (MSC service thread 1-8) WFLYELY00023: KeyStore file 'C:\opt\servers\wildfly-27.0.0.Final\standalone\configuration\application.keystore' does not exist. Used blank.
11:04:53,708 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 77) WFLYUT0014: Creating file handler for path 'C:\opt\servers\wildfly-27.0.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
11:04:53,750 WARN  [org.wildfly.extension.elytron] (MSC service thread 1-2) WFLYELY01084: KeyStore C:\opt\servers\wildfly-27.0.0.Final\standalone\configuration\application.keystore not found, it will be auto generated on first use with a self-signed certificate for host localhost
11:04:53,875 INFO  [org.jboss.as.ejb3] (MSC service thread 1-5) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 128 (per class), which is derived from thread worker pool sizing.
11:04:53,875 INFO  [org.jboss.as.ejb3] (MSC service thread 1-1) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 32 (per class), which is derived from the number of CPUs on this host.
11:04:53,901 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0012: Started server default-server.
11:04:53,902 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) Queuing requests.
11:04:53,907 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0018: Host default-host starting
11:04:54,031 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
11:04:54,139 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
11:04:54,222 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) WFLYDS0013: Started FileSystemDeploymentService for directory C:\opt\servers\wildfly-27.0.0.Final\standalone\deployments
11:04:54,232 INFO  [org.jboss.as.patching] (MSC service thread 1-3) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none
11:04:54,271 INFO  [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0493: Jakarta Enterprise Beans subsystem suspension complete
11:04:54,356 INFO  [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBossWS 6.1.0.Final (Apache CXF 3.5.2.jbossorg-3)
11:04:54,365 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
11:04:54,365 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:jboss/datasources/SkymedDS]
11:04:57,979 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) WFLYJPA0002: Read persistence.xml for skytelSkyMedCore
11:04:58,219 INFO  [org.jipijapa] (MSC service thread 1-5) JIPIORMV6020260: Second level cache enabled for skymed-core.war#skytelSkyMedCore
11:04:58,457 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) WFLYWELD0003: Processing weld deployment skymed-core.war
11:04:58,628 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-5) HV000001: Hibernate Validator 8.0.0.Final
11:04:59,032 WARN  [org.wildfly.extension.microprofile.opentracing] (MSC service thread 1-5) WFLYTRACEXT0012: No Jaeger endpoint or sender-binding configured. Installing a no-op sender
11:04:59,034 INFO  [org.infinispan.CONTAINER] (ServerService Thread Pool -- 80) ISPN000556: Starting user marshaller 'org.wildfly.clustering.infinispan.marshalling.jboss.JBossMarshaller'
11:04:59,057 INFO  [io.jaegertracing.internal.JaegerTracer] (MSC service thread 1-5) No shutdown hook registered: Please call close() manually on application shutdown.
11:04:59,065 INFO  [org.wildfly.microprofile.opentracing.smallrye] (MSC service thread 1-5) WFLYTRAC0001: Tracer initialized: JaegerTracer(version=Java-1.6.0, serviceName=skymed-core.war, reporter=RemoteReporter(sender=NoopSender(), closeEnqueueTimeout=1000), sampler=ConstSampler(decision=true, tags={sampler.type=const, sampler.param=true}), tags={hostname=NBPY-AS-RGAMA, jaeger.version=Java-1.6.0, ip=192.168.0.7}, zipkinSharedRpcSpan=false, expandExceptionLogs=false, useTraceId128Bit=false)
11:04:59,115 INFO  [org.jipijapa] (MSC service thread 1-6) JIPIORMV6020260: Second level cache enabled for skymed-core.war#skytelSkyMedCore
11:04:59,179 INFO  [org.jboss.weld.Version] (MSC service thread 1-6) WELD-000900: 5.1.0 (Final)
11:04:59,590 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 80) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'skymed-core.war#skytelSkyMedCore'
11:04:59,616 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 80) HHH000204: Processing PersistenceUnitInfo [name: skytelSkyMedCore]
11:04:59,700 INFO  [org.hibernate.Version] (ServerService Thread Pool -- 80) HHH000412: Hibernate ORM core version 6.1.5.Final
11:04:59,914 WARN  [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 80) HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead
11:05:00,172 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 80) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'skymed-core.war#skytelSkyMedCore'11:05:00,494 INFO  [SQL dialect] (ServerService Thread Pool -- 80) HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
11:05:00,547 WARN  [org.hibernate.dialect.PostgreSQLPGObjectJdbcType] (ServerService Thread Pool -- 80) PostgreSQL JDBC driver classes are inaccessible and thus, certain DDL types like JSONB, JSON, GEOMETRY can not be used!: java.lang.ClassNotFoundException: org.postgresql.util.PGobject from [Module "org.hibernate" version 6.1.5.Final from local module loader @1608bcbd (finder: local module finder @5bf8fa12 (roots: C:\opt\servers\wildfly-27.0.0.Final\modules,C:\opt\servers\wildfly-27.0.0.Final\modules\system\layers\base))]
    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)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:467)
    at org.hi...@6.1.5.Final//org.hibernate.internal.util.ReflectHelper.classForName(ReflectHelper.java:163)
    at org.hi...@6.1.5.Final//org.hibernate.dialect.PostgreSQLPGObjectJdbcType.<clinit>(PostgreSQLPGObjectJdbcType.java:45)
    at org.hi...@6.1.5.Final//org.hibernate.dialect.PostgreSQLDialect.registerColumnTypes(PostgreSQLDialect.java:231)
    at org.hi...@6.1.5.Final//org.hibernate.dialect.Dialect.contributeTypes(Dialect.java:1341)
    at org.hi...@6.1.5.Final//org.hibernate.dialect.PostgreSQLDialect.contributeTypes(PostgreSQLDialect.java:1229)
    at org.hi...@6.1.5.Final//org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:386)
    at org.hi...@6.1.5.Final//org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:143)
    at org.hi...@6.1.5.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1350)
    at org.hi...@6.1.5.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421)
    at org.hibernate.ji...@27.0.0.Final//org.jboss.as.jpa.hibernate.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:45)
    at org.jbos...@27.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:171)
    at org.jbos...@27.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:129)

    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at org.wildfly.secu...@2.0.0.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:664)
    at org.jbos...@27.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:214)

    at org.jbos...@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:833)
    at org.jbos...@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
11:05:00,560 INFO  [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 80) Envers integration enabled? : true
11:05:05,031 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 5) WELD-001125: Illegal bean type interface jakarta.ws.rs.ext.MessageBodyWriter<jakarta.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Produces @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
11:05:05,034 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 5) WELD-001125: Illegal bean type interface jakarta.ws.rs.ext.MessageBodyReader<jakarta.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Produces @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
11:05:05,034 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 5) WELD-001125: Illegal bean type class org.jboss.resteasy.plugins.providers.AbstractEntityProvider<jakarta.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Produces @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
11:05:05,034 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 5) WELD-001125: Illegal bean type interface org.jboss.resteasy.spi.AsyncMessageBodyWriter<jakarta.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Produces @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
11:05:05,034 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 5) WELD-001125: Illegal bean type org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider<jakarta.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Produces @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
11:05:05,034 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 5) WELD-001125: Illegal bean type interface org.jboss.resteasy.core.messagebody.AsyncBufferedMessageBodyWriter<jakarta.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Produces @Consumes @Provider class org.jboss.resteasy.plugins.providers.jaxb.JAXBElementProvider
11:05:05,071 WARN  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 3) WELD-000167: Class org.jboss.resteasy.core.AsynchronousDispatcher is annotated with @RequestScoped but it does not declare an appropriate constructor therefore is not registered as a bean!
11:05:05,084 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 7) WELD-001125: Illegal bean type jakarta.ws.rs.ext.MessageBodyReader<java.util.List<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.multipart.ListMultipartReader
11:05:05,085 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 3) WELD-001125: Illegal bean type jakarta.ws.rs.ext.MessageBodyReader<java.util.Map<?, ?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Consumes @Provider class org.jboss.resteasy.plugins.providers.multipart.MapMultipartFormDataReader
11:05:05,870 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 84) WFLYUT0021: Registered web context: '/skymed-core' for server 'default-server'
11:05:05,960 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 46) WFLYSRV0010: Deployed "skymed-core.war" (runtime-name : "skymed-core.war")
11:05:06,015 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
11:05:06,017 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 27.0.0.Final (WildFly Core 19.0.0.Final) started in 15778ms - Started 457 of 688 services (369 services are lazy, passive or on-demand) - Server configuration file in use: standalone.xml
11:05:06,020 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
11:05:06,021 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

Scott Marlow

unread,
Nov 29, 2022, 11:26:58 AM11/29/22
to Betto McRose DEV, WildFly

To address the warning, ensure that the PostgreSQL JDBC driver is contained in a module named org.postgresql.jdbc which is an optional dependency of the Hibernate ORM module.  From modules/system/layers/base/org/hibernate/main/module.xml:

"
       <!-- If the Oracle JDBC driver classes are accessible, Hibernate ORM will use them to tailor OracleDialect behavior -->
       <module name="com.oracle.ojdbc" optional="true"/>
       <!-- If the PostgreSQL JDBC driver classes are accessible, Hibernate ORM will use them to tailor PostgresDialect and CockroachDialect behavior -->
       <module name="org.postgresql.jdbc" optional="true"/>
"

Scott

Betto McRose [icarus]

unread,
Nov 30, 2022, 6:38:07 AM11/30/22
to Scott Marlow, WildFly
Hi Scott
yes, is there ( don't remember if I could attach or insert images, just in case I don't )

PS C:\opt\servers\wildfly-27.0.0.Final\modules\system\layers\base\org\hibernate\main> type .\module.xml
...
        <module name="org.infinispan.hibernate-cache" services="import" optional="true"/>
        <module name="net.bytebuddy"/>
        <module name="java.xml"/>

        <!-- If the Oracle JDBC driver classes are accessible, Hibernate ORM will use them to tailor OracleDialect behavior -->        <module name="com.oracle.ojdbc" optional="true"/>
        <!-- If the PostgreSQL JDBC driver classes are accessible, Hibernate ORM will use them to tailor PostgresDialect and CockroachDialect behavior -->
        <module name="org.postgresql.jdbc" optional="true"/>
    </dependencies>
</module>

--
Roberto Gamarra [icarus]
about.me/mcrose
Betto McRose
Java/JavaEE Developer

Betto McRose DEV

unread,
Dec 5, 2022, 1:23:49 PM12/5/22
to WildFly
well

I created a "from starter" project (start.jakarta.ee) and: added the wildfly-jar-maven-plugin and add the postgresql configuration to it

one entity, one repository, one resource


the hellos resource work fine
 [py.com.icarusdb.platform.resources.RestResource] (default task-1) hello! -> RestResource -> 2022-12-05T14:46:47.7761322

http://localhost:8080/modules/
[py.com.icarusdb.platform.resources.ModulesResource] (default task-1) Hello! from ModulesResource -> 2022-12-05T14:46:51.6105226

but when I do 
--> Cannot invoke "Object.getClass()" because "beanInstance" is null

the stacktrace is in the stacktrace.txt file 

Betto McRose DEV

unread,
Dec 12, 2022, 11:32:06 AM12/12/22
to WildFly
Hi all, just to give a clousure with this error

I added to my pom.xml

<dependency>

   <groupId>org.postgresql</groupId>

   <artifactId>postgresql</artifactId>

   <version>42.5.1</version>

</dependency>


and everything works fine

Reply all
Reply to author
Forward
0 new messages