Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to gradle version for newest JDK? #88

Open
jamesgolden1 opened this issue Nov 7, 2017 · 2 comments
Open

Change to gradle version for newest JDK? #88

jamesgolden1 opened this issue Nov 7, 2017 · 2 comments

Comments

@jamesgolden1
Copy link

[This is unnecessary if we are moving away from the RDT - I know Brian has mentioned this, and I saw a few isetbio commits, but I'm not sure of the status on that.]

After upgrading to MacOS High Sierra Version 10.13, I had to reinstall the JDK. I perhaps unwisely chose the latest version, and this led to problems with the RDT, specifically when running the following from Matlab [as a test for the RDT]:

rdt = RdtClient('isetbio');
rdt.crp('/resources/data/istim');
data = rdt.readArtifact('barMovie_osLinear', 'type', 'mat');

I received the following error:

Error using gradleFetchArtifact (line 121)
error status 1 (
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '9.0.1'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get
more log output.
)

Error in rdtReadArtifact (line 91)
    [localPath, pomPath, downloads] = gradleFetchArtifact(configuration.repositoryUrl, ...

Error in RdtClient/readArtifact (line 287)
                [data, artifact, downloads] = rdtReadArtifact(obj.configuration, ...

I tried reinstalling earlier versions of the JDK, but that didn't work for a number of reasons (apparently the install would check if OSX was newer than 10.7, and 10.13 is less than 10.7, even though it should be 10.13 versus 10.07; anyway...). Some advice from this post led to changing RDT/extenral/gradle/gradle/wrapper/gradle-wrapper.properties to run a newer version of gradle that is compatible with the latest JDK:

#Fri Sep 11 10:12:51 EDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip

This fixed things enough so that the above commands for getting data from the RDT works, but I haven't tried much else, so this could end up causing other problems.

@wandell
Copy link
Contributor

wandell commented Dec 30, 2017

We seem to have to upgrade to Gradle 4.4 when we update to Java 8/9. We need to post instructions about this from Zhenyi, who made it work. Also @DavidBrainard made it work for him.

In my case, however, I couldn't move forward. I am not sure about the whole Java, JDK versions on my computer. I need a model of the situation. How do I check which versions I have?

So, to keep working and be able to ieValidateXXX

  • @DavidBrainard had me clear ~/.gradle
  • Then, I did a git checkout 5af0043
  • to the earlier gradle version.
  • I saved this as the branch 'beforegradleupdate'.

Everything runs for me. Now, I need to figure out how to upgrade to the modern versions.

@jamesgolden1
Copy link
Author

Thanks for the help on this! I had a problem uploading with the RDT that came about because I am still running Matlab 2015. Just in case anyone gets the 'Response stream is undefined' error, look at line 84 of rdtRequestWeb.m:

if forceFallback || verLessThan('matlab', '8.6')
    %% Fall back on third-party RESTful utility.
    ...
else
    %% Use official RESTful utility
    ...
end

This conditional should be false for anyone with a recent version of Matlab where the 'webread' and 'webwrite' commands are included. I had to change the '8.6' because my version is '8.5', and then uploading worked. This is my fault, and I know this fix is ugly, but I wanted to record it in case anyone has the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants