Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESTEASY002020: Unhandled asynchronous exception, sending back 500: java.lang.IllegalStateException: Found unknown codepoint: 0x1153 / 4435 #14268

Closed
arunav-bhattacharya opened this issue Jan 13, 2021 · 4 comments
Labels
area/vertx kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant

Comments

@arunav-bhattacharya
Copy link

Describe the bug
While I am trying to fetch a record from a DB2 Table using a reactive datasource, I am getting the following exception. The exception doesn't tell me much what is causing the issue. However a similar code on the same codebase when used to query on a PostgreSQL Table using a Postgres reactive datasource, it is working fine.

2021-01-12 17:50:52,656 ERROR [org.jbo.res.res.i18n] (vert.x-eventloop-thread-14) RESTEASY002020: Unhandled asynchronous exception, sending back 500: java.lang.IllegalStateException: Found unknown codepoint: 0x1153 / 4435
	at io.vertx.db2client.impl.drda.DRDAResponse.throwUnknownCodepoint(DRDAResponse.java:847)
	at io.vertx.db2client.impl.drda.DRDAConnectResponse.parseVALNSPRM(DRDAConnectResponse.java:220)
	at io.vertx.db2client.impl.drda.DRDAConnectResponse.parseCommonError(DRDAConnectResponse.java:118)
	at io.vertx.db2client.impl.drda.DRDAConnectResponse.parseSECCHKreply(DRDAConnectResponse.java:1047)
	at io.vertx.db2client.impl.drda.DRDAConnectResponse.readSecurityCheck(DRDAConnectResponse.java:50)
	at io.vertx.db2client.impl.codec.InitialHandshakeCommandCodec.decodePayload(InitialHandshakeCommandCodec.java:102)
	at io.vertx.db2client.impl.codec.DB2Decoder.decodePayload(DB2Decoder.java:80)
	at io.vertx.db2client.impl.codec.DB2Decoder.decode(DB2Decoder.java:53)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:501)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:440)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:834)

Expected behavior
The exception doesn't tell me much about the issue that is causing it to fail. A similar code when run on the PostgreSQL Table there is no issue. Ideally the behavior for both PostgreSQL and DB2 driver should be consistent.

Actual behavior
A similar code when I am running using a PostgreSQL reactive datasource I m not facing any issue. So the expectation is the behavior should be same for DB2 Datasource as well.

To Reproduce
I cannot share the actual codebase as its against my employer's policy, so I m providing a sample code in Kotlin that is using the DB2Pool. A similar code is working with PgPool.

import io.vertx.mutiny.db2client.DB2Pool
...

class SampleRepo {
    companion object {
        private val table = "table_name"
        private val schema = "schema_name"

        fun find(db2Pool: DB2Pool, str: String): Uni<SampleDO?> {
            val SELECT_ONE = "SELECT * FROM ${schema}.${table} WHERE str=$str"
            return db2Pool.preparedQuery(SELECT_ONE)
                .execute()
                .onItem().transform { it.iterator() }
                .onItem().transform { rowIterator ->
                    if (rowIterator.hasNext())
                        return@transform rowMap2SampleDO(rowIterator.next())
                    else null
                }
        }

        private fun rowMap2SampleDO(row: Row): SampleDO {
            return SampleDO(
                row.getString("xxx1"),
                row.getInteger("xxx2"),
                row.getInteger("xxx3"),
                row.getString("xxx4"))
       }
   }
}

Configuration

# Add your application.properties here, if applicable.
quarkus.datasource.reactive=true

quarkus.datasource.pg.db-kind=postgresql
quarkus.datasource.pg.username=xxx
quarkus.datasource.pg.password=xxx
quarkus.datasource.pg.reactive.url=postgresql://xxx

quarkus.datasource.db2.db-kind=db2
quarkus.datasource.db2.username=xxx
quarkus.datasource.db2.password=xxx
quarkus.datasource.db2.reactive.url=vertx-reactive:db2://xxx

Screenshots
(If applicable, add screenshots to help explain your problem.)

Environment:

  • Output of uname -a or ver: Darwin xxx 19.6.0 Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64 x86_64
  • Output of java -version: I m using Kotlin 1.3.72
 ~$ java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
  • GraalVM version (if different from Java): NA
  • Quarkus version or git rev: 1.10.2.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
~$ mvn --version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /xxx/xxx/xxx/maven/3.6.3_1/libexec
Java version: 11.0.2, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac"

Let me know if you need any additional details. I can provide the same here.

Note: Some of the information that cannot be shared here, has been masked as xxx.

@arunav-bhattacharya arunav-bhattacharya added the kind/bug Something isn't working label Jan 13, 2021
@ghost ghost added the area/kotlin label Jan 13, 2021
@ghost
Copy link

ghost commented Jan 13, 2021

/cc @evanchooly

@arunav-bhattacharya
Copy link
Author

Any update on this ?

@cescoffier
Copy link
Member

I have created eclipse-vertx/vertx-sql-client#1131 as it's most probably a DB2 client issue.

@geoand
Copy link
Contributor

geoand commented Apr 11, 2023

Closing as this has likely been fixed already.

If that is not the case, let us know and we can reopen the issue.

@geoand geoand closed this as completed Apr 11, 2023
@geoand geoand added triage/out-of-date This issue/PR is no longer valid or relevant area/vertx and removed area/kotlin labels Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertx kind/bug Something isn't working triage/out-of-date This issue/PR is no longer valid or relevant
Projects
None yet
Development

No branches or pull requests

3 participants