Code Monkey home page Code Monkey logo

Comments (3)

akudiyar avatar akudiyar commented on August 29, 2024

First of all, it is not a bug, it is a warning specific to JDK 17+. See the related issues:

And this warning should have been already mitigated by the commit 14e051a. So I need a bit more details about the Java version and the build steps.

This warning is not shown on 1.8 (see the last CI check results for example).

from cartridge-java.

ArtDu avatar ArtDu commented on August 29, 2024

And this warning should have been already mitigated by the commit 14e051a

But in warning we can see that msgpack-core-0.9.6 is used.

WARNING: Illegal reflective access by org.msgpack.core.buffer.DirectBufferAccess (file:/Users/artyom.dubinin/.m2/repository/org/msgpack/msgpack-core/0.9.6/msgpack-core-0.9.6.jar) to constructor java.nio.DirectByteBuffer(long,int,java.lang.Object)

So I need a bit more details about the Java version and the build steps.

I ran it on jdk 11

$ JAVA_HOME=~/Library/Java/JavaVirtualMachines/corretto-11.0.13/Contents/Home mvn exec:java -Dexec.mainClass="io.tarantool.driver.Test"

Running `/Users/artyom.dubinin/tarantool/cartridge-java/mvnw`...
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] -------------------< io.tarantool:cartridge-driver >--------------------
[INFO] Building Java driver for Tarantool Cartridge 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ cartridge-driver ---
18:40:57.062 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework
18:40:57.068 [io.tarantool.driver.Test.main()] DEBUG io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 16
18:40:57.074 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.concurrent.GlobalEventExecutor - -Dio.netty.globalEventExecutor.quietPeriodSeconds: 1
18:40:57.081 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
18:40:57.081 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
18:40:57.100 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
18:40:57.100 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 11
18:40:57.101 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
18:40:57.102 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
18:40:57.102 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.storeFence: available
18:40:57.102 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
18:40:57.103 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - direct buffer constructor: unavailable: Reflective setAccessible(true) disabled
18:40:57.103 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
18:40:57.105 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable: class io.netty.util.internal.PlatformDependent0$7 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @7f9b89d0
18:40:57.107 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, {int,long}): unavailable
18:40:57.107 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available
18:40:57.107 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: /var/folders/yp/ymwg4wxs381bmvgjp70khxy40000gp/T (java.io.tmpdir)
18:40:57.107 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
18:40:57.107 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent - Platform: MacOS
18:40:57.108 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: -1 bytes
18:40:57.108 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
18:40:57.109 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.CleanerJava9 - java.nio.ByteBuffer.cleaner(): available
18:40:57.109 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
18:40:57.109 [io.tarantool.driver.Test.main()] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
18:40:57.110 [io.tarantool.driver.Test.main()] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
18:40:57.116 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.internal.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
18:40:57.182 [io.tarantool.driver.Test.main()] DEBUG io.tarantool.driver.core.connection.AbstractTarantoolConnectionManager - Current connection mode: FULL
18:40:57.205 [io.tarantool.driver.Test.main()] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.processId: 99345 (auto-detected)
18:40:57.210 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv4Stack: false
18:40:57.210 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv6Addresses: false
18:40:57.216 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.NetUtilInitializations - Loopback interface: lo0 (lo0, 0:0:0:0:0:0:0:1%lo0)
18:40:57.217 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.NetUtil - Failed to get SOMAXCONN from sysctl and file /proc/sys/net/core/somaxconn. Default: 128
18:40:57.219 [io.tarantool.driver.Test.main()] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.machineId: ac:de:48:ff:fe:00:11:22 (auto-detected)
18:40:57.228 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.level: simple
18:40:57.229 [io.tarantool.driver.Test.main()] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.targetRecords: 4
18:40:57.249 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 16
18:40:57.249 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 16
18:40:57.249 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
18:40:57.249 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 9
18:40:57.249 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 4194304
18:40:57.249 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
18:40:57.249 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
18:40:57.249 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
18:40:57.250 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
18:40:57.250 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimIntervalMillis: 0
18:40:57.250 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: false
18:40:57.250 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023
18:40:57.259 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: pooled
18:40:57.259 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 0
18:40:57.259 [io.tarantool.driver.Test.main()] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384
18:40:57.266 [io.tarantool.driver.Test.main()] DEBUG io.netty.bootstrap.ChannelInitializerExtensions - -Dio.netty.bootstrap.extensions: null
18:40:57.324 [nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacityPerThread: 4096
18:40:57.324 [nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.ratio: 8
18:40:57.324 [nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.chunkSize: 32
18:40:57.324 [nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.blocking: false
18:40:57.324 [nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.batchFastThreadLocalOnly: true
18:40:57.329 [nioEventLoopGroup-2-1] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.checkAccessible: true
18:40:57.330 [nioEventLoopGroup-2-1] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.checkBounds: true
18:40:57.330 [nioEventLoopGroup-2-1] DEBUG io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@29861931
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.msgpack.core.buffer.DirectBufferAccess (file:/Users/artyom.dubinin/.m2/repository/org/msgpack/msgpack-core/0.9.6/msgpack-core-0.9.6.jar) to constructor java.nio.DirectByteBuffer(long,int,java.lang.Object)
WARNING: Please consider reporting this to the maintainers of org.msgpack.core.buffer.DirectBufferAccess
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
18:40:57.361 [nioEventLoopGroup-2-1] INFO io.tarantool.driver.core.connection.AbstractTarantoolConnectionManager - Connected to Tarantool server at localhost/127.0.0.1:3301
18:40:57.370 [nioEventLoopGroup-2-1] DEBUG io.tarantool.driver.api.connection.TarantoolConnection - Request 1 sent, status Success
hello
package io.tarantool.driver;

import io.tarantool.driver.api.TarantoolClient;
import io.tarantool.driver.api.TarantoolClientFactory;
import io.tarantool.driver.api.TarantoolResult;
import io.tarantool.driver.api.tuple.TarantoolTuple;

public class Test {
    private static TarantoolClient<TarantoolTuple, TarantoolResult<TarantoolTuple>> getClient(Integer connections) {
        return TarantoolClientFactory.createClient()
            .withAddress("localhost", 3301)
            .withConnections(connections)
            .withConnectTimeout(3000)
            .build();
    }

    public static void main(String[] args) throws Exception {
        TarantoolClient<TarantoolTuple, TarantoolResult<TarantoolTuple>> client = getClient(1);
        client.eval("return 1").join();
        System.out.println("hello");
    }
}

This warning is not shown on 1.8 (see the last CI check results for example).

You are right, it doesn't happen on 1.8

from cartridge-java.

dkasimovskiy avatar dkasimovskiy commented on August 29, 2024

Not a bug

from cartridge-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.