payara / Payara

Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.
http://www.payara.fish
Other
883 stars 305 forks source link

Bug Report: Exception When Datasource Isolationlevel 'TRANSACTION_READ_UNCOMMITTED' is Used / FISH-6472 #5885

Open fschuerer opened 2 years ago

fschuerer commented 2 years ago

Description


Hello,

when using the isolationlevel 'TRANSACTION_READ_UNCOMMITTED' in 'DataSourceDefinition' an exception is thrown

Current Outcome

Caused by: javax.resource.ResourceException: Invalid transaction isolation; the transaction isolation level can be empty or any of the following: read-uncommitted, read-committed, repeatable-read, serializable, custom

Steps to reproduce

@ApplicationScoped
@DataSourceDefinition(
        name = "java:app/jdbc/db",
        className = "org.postgresql.xa.PGXADataSource",
        serverName = "${MPCONFIG=POSTGRES_SERVER_NAME:localhost}",
        databaseName = "${MPCONFIG=POSTGRES_DB:postgres}",
        user = "${MPCONFIG=POSTGRES_USER:postgres}",
        password = "${MPCONFIG=POSTGRES_PASSWORD}",
        isolationLevel = Connection.TRANSACTION_READ_UNCOMMITTED, 
        portNumber = 5432
)
public class DatabaseConfiguration {
}

Environment

Analysis

In 'com.sun.appserv.connectors.internal.api.ConnectorsUtil' at line 542 is missing a 't':

image

JamesHillyard commented 2 years ago

Hi @fschuerer,

Thank you for reporting this issue, I have been able to successfully reproduce it. I have raised an internal issue FISH-6472 to address this bug. We always encourage you to contribute, so if you wish you can submit a PR with a fix and we will gladly review it.

As you have already identified the fix, I would strongly recommend you submit a PR for this to get the fix as quick as possible. The following documentation pages may help you in doing so:

If you choose not to submit a PR, we will pick up the issue at some point in the future.

Thanks, James

myresd commented 9 months ago

Hi @JamesHillyard,

I ran into the same issue so I opened a PR here.