Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10996

[Postgres] Database queries result in NoClassDefFound for org/wildfly/transaction/client/ContextTransactionManager

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Blocker
    • 15.0.0.Final
    • 14.0.1.Final, 14.0.0.Final
    • JPA / Hibernate
    • None
    • Hide

      Deploy the module

      1. Unzip jpa-war.tar.gz. Its a maven module and it also contains the target directory that has the binaries
      2. Copy target/jpa-war-1.0-SNAPSHOT.war under <wildfly-dir>/standalone/deployments folder

      Add driver binary as module in wildfly

      1. Unzip pgsql.module.tar.gz and place the contents under modules/system/layers/base/org/postgresql

      Configure datasource in standalone-full.xml

      1. Navigate to <wildfly-dir>
      2. - Either run git apply <tmp-folder>/standalone-full.diff
      3. - Or alternatively you can modify the standalone-full.xml manually to add/replace the datasource for postgres

      Reproduce the issue:

      1. Start the server
      2. Run curl http://localhost:8080/jpa-war-1.0-SNAPSHOT/jpaServlet
      Show
      Deploy the module Unzip jpa-war.tar.gz. Its a maven module and it also contains the target directory that has the binaries Copy target/jpa-war-1.0-SNAPSHOT.war under <wildfly-dir>/standalone/deployments folder Add driver binary as module in wildfly Unzip pgsql.module.tar.gz and place the contents under modules/system/layers/base/org/postgresql Configure datasource in standalone-full.xml Navigate to <wildfly-dir> - Either run git apply <tmp-folder>/standalone-full.diff - Or alternatively you can modify the standalone-full.xml manually to add/replace the datasource for postgres Reproduce the issue: Start the server Run curl http://localhost:8080/jpa-war-1.0-SNAPSHOT/jpaServlet

    Description

      Basically WildFly is unable to either build the persistence context or it fails to query postgres db.

      The changes are so minimal that it should basically work.

      Attached:

      1. error.log - exception in the server log
      2. jpa-war.tar.gz - maven module that can be used to reproduce the issue
      3. pgsql.module.tar.gz - postgres driver module that can be unpacked under modules/system/layers/base/org/postgresql
      4. standalone-full.diff - diff that can be applied to standalone-full.xml to define required datasource

      Note:

      • Tested same steps with wildfly 13 and there its woking fine.
      • Tested with latest postgres driver and issue exists with v14.0.0 (and v14.0.1). Postgres driver is thus ruled out.

      Attachments

        1. error.log
          26 kB
        2. jpa-war.tar.gz
          9 kB
        3. pgsql.driver.tar.gz
          1003 kB
        4. standalone-full.diff
          2 kB

        Issue Links

          Activity

            People

              smarlow1@redhat.com Scott Marlow
              rakcheru Rakesh Cherukuri (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: