Open malopezp91 opened 3 years ago
i also have the same problem
i try to connect my iso 8583 server with this code
interface Iso8583ClientServiceNew {
suspend fun sendSaleMessage(sendSaleMessageRequest: SendSaleMessageRequest)
}
class Iso8583ClientServiceNewImp : Iso8583ClientServiceNew {
val messageFactory: J8583MessageFactory<IsoMessage> =
J8583MessageFactory<IsoMessage>(
ConfigParser.createDefault(),
ISO8583Version.V1987,
MessageOrigin.ACQUIRER
)
val client: Iso8583Client<IsoMessage> = Iso8583Client(
isoMessageFactory = messageFactory,
config = ClientConfiguration.Builder()
.replyOnError(true)
.maxFrameLength(16384)
.build(),
socketAddress = InetSocketAddress(AppConstants.ISO8583_HOST, AppConstants.ISO8583_PORT)
)
override suspend fun sendSaleMessage(sendSaleMessageRequest: SendSaleMessageRequest) {
return withContext(Dispatchers.IO) {
InternalLoggerFactory.setDefaultFactory(JdkLoggerFactory.INSTANCE)
client.addMessageListener(AppIsoMessageListener())
try {
client.init()
client.connect()
if (!client.isConnected) {
throw Exception("Can't connect to the host")
}
client.send(sendSaleMessageRequest.isoMessage(messageFactory))
Log.d("success", "Message sent successfully")
} finally {
client.shutdown()
}
}
}
inner class AppIsoMessageListener : IsoMessageListener<IsoMessage> {
override fun applies(isoMessage: IsoMessage): Boolean {
Log.d("message", isoMessage.debugString())
return true;
}
override fun onMessage(ctx: ChannelHandlerContext, isoMessage: IsoMessage): Boolean {
Log.d("message", isoMessage.debugString())
val response: IsoMessage = client.isoMessageFactory.createResponse(isoMessage);
Log.d("response", response.debugString())
ctx.write(response)
ctx.flush()
return false;
}
}
}
and i hava io.netty.handler.codec.TooLongFrameException and AppIsoMessageListener dosn't work
i use kotlin native (jetpack compose) to development android applications
also
Rejecting re-init on previously-failed class java.lang.Class<androidx.compose.ui.autofill.AutofillCallback>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/autofill/AutofillManager$AutofillCallback;
2024-02-19 15:59:30.553 17338-17343 art com.tatweer.testcompose I (Throwable with empty stack trace)Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.autofill.AutofillManager$AutofillCallback" on path: DexPathList[[zip file "/data/app/com.tatweer.testcompose-2/base.apk"],nativeLibraryDirectories=[/data/app/com.tatweer.testcompose-2/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]
Hi!
Using version 1.2.4, I am getting the following error: io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 8192: 12596 - discarded
Based on this question: https://github.com/kpavlov/jreactive-8583/issues/78, I tried to modify the maxFrameLength in the described way. However, that way is not available in version 1.2.4. I tried it the following way:
but I am having the same error.
Do you have any idea what could be wrong?