[ignite] branch ignite-11155 updated: IGNITE-11155 Missed JVM options comment was added for exception

2019-02-11 Thread dpavlov
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch ignite-11155
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-11155 by this push:
 new 0d2915d  IGNITE-11155 Missed JVM options comment was added for 
exception
0d2915d is described below

commit 0d2915d3e69f0cb093c10aab6f5dacc9e67e771c
Author: Dmitriy Pavlov 
AuthorDate: Mon Feb 11 16:58:01 2019 +0300

IGNITE-11155 Missed JVM options comment was added for exception
---
 .../src/main/java/org/apache/ignite/internal/util/FeatureChecker.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
index ec60e53..5aba646 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
@@ -18,7 +18,7 @@ package org.apache.ignite.internal.util;
 
 /**
  * Class extracted for fields from GridUnsafe to be absolutely independent 
with current and future static block
- * initialization prohect.
+ * initialization effects.
  */
 public class FeatureChecker {
 /** Required Options to Run un Java 9, 10, 11. */



[ignite] branch ignite-11155 updated: IGNITE-11155 Missed JVM options comment was added for exception

2019-02-11 Thread dpavlov
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch ignite-11155
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-11155 by this push:
 new 3ea6962  IGNITE-11155 Missed JVM options comment was added for 
exception
3ea6962 is described below

commit 3ea6962648cbcf5717e56845746ec0902725889f
Author: Dmitriy Pavlov 
AuthorDate: Mon Feb 11 16:52:24 2019 +0300

IGNITE-11155 Missed JVM options comment was added for exception
---
 .../main/java/org/apache/ignite/internal/util/FeatureChecker.java | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
index 5952e57..ec60e53 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
@@ -30,7 +30,9 @@ public class FeatureChecker {
 "--illegal-access=permit";
 
 /** Java version specific warning to be added in case access failed */
-public static final String JAVA_VER_SPECIFIC_WARN = "\nPlease make sure 
options: " + JAVA_9_10_11_OPTIONS +
-"\nwere provided at JVM startup." +
-"\nSee 
https://apacheignite.readme.io/docs/getting-started#section-running-ignite-with-java-9-10-11
 for more info";
+public static final String JAVA_VER_SPECIFIC_WARN =
+"\nPlease add the following parameters to JVM startup settings and 
restart the application: {parameters: " +
+JAVA_9_10_11_OPTIONS +
+"\n}" +
+"\nSee 
https://apacheignite.readme.io/docs/getting-started#section-running-ignite-with-java-9-10-11
 for more information.";
 }



[ignite] branch ignite-11155 updated: IGNITE-11155 Missed JVM options comment was added for exception

2019-02-07 Thread dpavlov
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch ignite-11155
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-11155 by this push:
 new a75a035  IGNITE-11155 Missed JVM options comment was added for 
exception
a75a035 is described below

commit a75a035298745ec68cc031f9cf15817c5b6a1396
Author: Dmitriy Pavlov 
AuthorDate: Thu Feb 7 16:56:59 2019 +0300

IGNITE-11155 Missed JVM options comment was added for exception
---
 .../ignite/internal/util/FeatureChecker.java   | 36 ++
 .../apache/ignite/internal/util/GridUnsafe.java|  9 +++---
 2 files changed, 41 insertions(+), 4 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
new file mode 100644
index 000..5952e57
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/FeatureChecker.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ignite.internal.util;
+
+/**
+ * Class extracted for fields from GridUnsafe to be absolutely independent 
with current and future static block
+ * initialization prohect.
+ */
+public class FeatureChecker {
+/** Required Options to Run un Java 9, 10, 11. */
+public static final String JAVA_9_10_11_OPTIONS = 
"--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED\n" +
+"--add-exports=java.base/sun.nio.ch=ALL-UNNAMED\n" +
+"--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED\n" +
+"--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED\n" 
+
+
"--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED\n" +
+"--illegal-access=permit";
+
+/** Java version specific warning to be added in case access failed */
+public static final String JAVA_VER_SPECIFIC_WARN = "\nPlease make sure 
options: " + JAVA_9_10_11_OPTIONS +
+"\nwere provided at JVM startup." +
+"\nSee 
https://apacheignite.readme.io/docs/getting-started#section-running-ignite-with-java-9-10-11
 for more info";
+}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java 
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java
index f3593f0..f485218 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridUnsafe.java
@@ -137,7 +137,8 @@ public abstract class GridUnsafe {
 return buf;
 }
 catch (ReflectiveOperationException e) {
-throw new RuntimeException("JavaNioAccess#newDirectByteBuffer() 
method is unavailable.", e);
+throw new RuntimeException("JavaNioAccess#newDirectByteBuffer() 
method is unavailable."
++ FeatureChecker.JAVA_VER_SPECIFIC_WARN, e);
 }
 }
 
@@ -1452,8 +1453,7 @@ public abstract class GridUnsafe {
 }
 catch (ReflectiveOperationException e) {
 throw new RuntimeException(pkgName + ".misc.JavaNioAccess class is 
unavailable."
-+ "\nPlease make sure 
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED was provided as JVM 
option." +
-"\nSee 
https://apacheignite.readme.io/docs/getting-started#section-running-ignite-with-java-9-10-11
 for more info", e);
++ FeatureChecker.JAVA_VER_SPECIFIC_WARN, e);
 }
 }
 
@@ -1476,7 +1476,8 @@ public abstract class GridUnsafe {
 return mtd;
 }
 catch (ReflectiveOperationException e) {
-throw new RuntimeException(miscPackage() + 
".JavaNioAccess#newDirectByteBuffer() method is unavailable.", e);
+throw new RuntimeException(miscPackage() + 
".JavaNioAccess#newDirectByteBuffer() method is unavailable."
++ FeatureChecker.JAVA_VER_SPECIFIC_WARN, e);
 }
 }