[jira] [Commented] (GEODE-1808) gemstone.gemfire.internal.cache.MinimumSystemRequirements can't handle java version 1.7.0_101

2016-10-03 Thread Sergio Valenti (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15542415#comment-15542415
 ] 

Sergio Valenti commented on GEODE-1808:
---

Yes, we are using an extended support version of JDK7.

> gemstone.gemfire.internal.cache.MinimumSystemRequirements can't handle java 
> version 1.7.0_101
> -
>
> Key: GEODE-1808
> URL: https://issues.apache.org/jira/browse/GEODE-1808
> Project: Geode
>  Issue Type: Bug
>  Components: general
>Reporter: Sergio Valenti
>
> We have recently updated out Java version to 1.7.0_101 on our server.
> However, after starting our java component which runs Gemfire version 8, we 
> get the following log line:
> | FATAL | 20160821 18:05:30,626 | main | 
> gemstone.gemfire.internal.cache.MinimumSystemRequirements | Java version 
> older than 1.7.0_72.
> After looking at the source, it is apparent that the issue is in 
> com.gemstone.gemfire.internal.lang.SystemUtils when dealing with java 
> revisions which are 3 digits long
> public static boolean isJavaVersionAtLeast(String expectedVersion)
> {
> String actualVersionDigits = 
> StringUtils.getDigitsOnly(System.getProperty("java.version"));
> String expectedVersionDigits = 
> StringUtils.padEnding(StringUtils.getDigitsOnly(expectedVersion), '0', 
> actualVersionDigits.length());
> try
> {
> return Long.parseLong(actualVersionDigits) >= 
> Long.parseLong(expectedVersionDigits);
> }
> catch(NumberFormatException ignore)
> {
> return false;
> }
> }
> If you walk through this code with an expected version of java: 1.7.0_72 and 
> an actual version of java: 1.7.0_101, it will create the following two long 
> variables and compare them:
> actualVersionDigits   "170101"
> expectedVersionDigits "170720"
> Which causes the comparison check to fail.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (GEODE-1808) gemstone.gemfire.internal.cache.MinimumSystemRequirements can't handle java version 1.7.0_101

2016-08-22 Thread Sergio Valenti (JIRA)
Sergio Valenti created GEODE-1808:
-

 Summary: gemstone.gemfire.internal.cache.MinimumSystemRequirements 
can't handle java version 1.7.0_101
 Key: GEODE-1808
 URL: https://issues.apache.org/jira/browse/GEODE-1808
 Project: Geode
  Issue Type: Bug
  Components: general
Reporter: Sergio Valenti


We have recently updated out Java version to 1.7.0_101 on our server.

However, after starting our java component which runs Gemfire version 8, we get 
the following log line:

| FATAL | 20160821 18:05:30,626 | main | 
gemstone.gemfire.internal.cache.MinimumSystemRequirements | Java version older 
than 1.7.0_72.

After looking at the source, it is apparent that the issue is in 
com.gemstone.gemfire.internal.lang.SystemUtils when dealing with java revisions 
which are 3 digits long

public static boolean isJavaVersionAtLeast(String expectedVersion)
{
String actualVersionDigits = 
StringUtils.getDigitsOnly(System.getProperty("java.version"));
String expectedVersionDigits = 
StringUtils.padEnding(StringUtils.getDigitsOnly(expectedVersion), '0', 
actualVersionDigits.length());
try
{
return Long.parseLong(actualVersionDigits) >= 
Long.parseLong(expectedVersionDigits);
}
catch(NumberFormatException ignore)
{
return false;
}
}

If you walk through this code with an expected version of java: 1.7.0_72 and an 
actual version of java: 1.7.0_101, it will create the following two long 
variables and compare them:
actualVersionDigits "170101"
expectedVersionDigits   "170720"

Which causes the comparison check to fail.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)