ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Mekhanikov <dmekhani...@gmail.com>
Subject Re: Do I have to use --illegal-access=permit for Java thin client and JDBC with JDK 9/10/11.
Date Thu, 05 Sep 2019 11:22:46 GMT
Alex,

Thanks for providing the details.
Ignite 2.7.0 doesn’t officially support Java 11+, so what you wrote seems valid. So, currently
we don’t have an example, that fails with an Ignite thin client version 2.7.5 and Java 11+.
Please let us know if you find a counterexample.

Denis
On 3 Sep 2019, 19:00 +0300, Alex Plehanov <plehanov.alex@gmail.com>, wrote:
> Denis, there is almost nothing to share: thin client connects to the
> server, creates a cache, do some puts, gets and queries. I run this test by
> IDE specifying different JVM options, JDK versions and dependency Ignite
> versions (it's not scripted anyhow)
>
> pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
>
> <artifactId>thin-client-test</artifactId>
> <groupId>org.apache.ignite</groupId>
> <version>1.0-SNAPSHOT</version>
>
> <dependencies>
> <dependency>
> <groupId>org.apache.ignite</groupId>
> <artifactId>ignite-core</artifactId>
> <version>2.7.0</version>
> </dependency>
> </dependencies>
> </project>
>
> java:
> public static void main(String[] args) throws Exception {
> IgniteClient igniteClient = Ignition.startClient(new
> ClientConfiguration().setAddresses("127.0.0.1:10800"));
> ClientCache<Integer, String> cache =
> igniteClient.getOrCreateCache("test.cache");
> cache.put(1, "value1");
> cache.put(2, "value2");
> cache.get(1);
> cache.query(new SqlFieldsQuery("SELECT * FROM
> IGNITE.NODES")).getAll();
> }
>
> вт, 3 сент. 2019 г. в 17:26, Denis Mekhanikov <dmekhanikov@gmail.com>:
>
> > Alex,
> >
> > Could you share the project you’re checking? A GitHub repository would be
> > nice.
> >
> > Denis
> > On 3 Sep 2019, 17:10 +0300, Alex Plehanov <plehanov.alex@gmail.com>,
> > wrote:
> > > Dmitrii,
> > >
> > > What version of Ignite you are using?
> > >
> > > I've rechecked Java thin client recently (forgot to share results here),
> > in
> > > my tests:
> > > Client Version 2.7.0
> > > OracleJDK 11: Client won't start unless
> > > "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED" option is
> > specified.
> > > OpenJDK 12: Client can't start at all
> > >
> > > Client Version 2.7.5
> > > OracleJDK 11: Client starts without any additional options
> > > OpenJDK 12: Client starts without any additional options
> > >
> > > "--add-opens=java.base/java.nio=ALL-UNNAMED" suppress warning messages on
> > > all versions.
> > >
> > >
> > > вт, 3 сент. 2019 г. в 16:35, Dmitrii Sherstobitov <
> > dnsherstobitov@gmail.com
> > > > :
> > >
> > > > Hi!
> > > >
> > > > I've made some simple tests using Apache Ignite documentation for JDBC
> > and
> > > > Java Thin client with using of following API functions:
> > > >
> > > > JDBC: executeQuery, execute, preparedStatement
> > > > Java Thin: cache get, put, create
> > > >
> > > > None of these API requires additional options for JVM. However, some
> > > > options are optional and used to suppress warning messages.
> > > >
> > > > Tested with Open JDK 9.0.4, 10.0.2, 11.0.2, 12.0.2 on Ubuntu and Mac
> > OS.
> > > >
> > > >
> > > > Best regards, Dmitry Sherstobitov
> > > > On 26 Aug 2019, 16:22 +0300, Alex Plehanov <plehanov.alex@gmail.com>,
> > > > wrote:
> > > > >
> > > > > Dmitry,
> > > > >
> > > > > As I said before, thin client uses BinaryHeapOutputStream, which
uses
> > > > > Unsafe, so "--illegal-access=deny" has an effect.
> > > > > With "--illegal-access=deny" thin client will not start unless you
> > > > specify
> > > > > "--add-opens=java.base/java.nio=ALL-UNNAMED"
> > > >
> >

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message