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

Does not build under Intellij #76

Closed
javadba opened this issue Jan 26, 2016 · 16 comments
Closed

Does not build under Intellij #76

javadba opened this issue Jan 26, 2016 · 16 comments

Comments

@javadba
Copy link

javadba commented Jan 26, 2016

Intellij can not work with the dependencies listed in this project: one of the maven dependencies com.github.jai-imageio has invalid metadata.

Screenshot is attached

screen shot 2016-01-26 at 1 15 08 pm

@raver119
Copy link

I've just checked current master

[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:01.663s
[INFO] Finished at: Wed Jan 27 00:29:25 MSK 2016
[INFO] Final Memory: 111M/685M

@javadba
Copy link
Author

javadba commented Jan 26, 2016

Your answer is NOT intellij. This builds on the command line no problem. I need an IDE . Thanks.

@raver119
Copy link

My answer IS intelliJ, i've thought copy&paste will be enough.

Here's screenshot: http://www.image123.net/endpzz39ashrpic.html
As you can see: latest intelliJ, master branch, install clicked, nothing is wrong in pom.xml

@raver119
Copy link

p.s. and obviously, if you know that maven from command line build everything fine, we both know then: problem isn't in project's pom.xml :)

Something is wrong with your intelliJ.

p.s. checked that on my mac, everything fine there as well.

@javadba
Copy link
Author

javadba commented Jan 26, 2016

From my other searches it appears the problem were in an upstream project / dependency. Take a look at this.

google/gson#596

afa my intellij: I have dozens of IJ projects working - so let's not mark this as a general IJ problem.

@agibsonccc
Copy link
Contributor

@javadba We'll work on this thanks for the issue.

@AlexDBlack
Copy link
Contributor

I had a bit of a look into this. I had assumed the issue was with Java 7, though I'm unable to reproduce this in IntelliJ 14.1.4 (including with setting the project JDK to Java 7)
the issue it is complaining about is here: https://github.com/jai-imageio/jai-imageio-core/blob/master/pom.xml#L198
@javadba can you report the version of maven you are using? afaik intellij needs a maven installation, so it could be an issue with the maven version

@javadba
Copy link
Author

javadba commented Jan 27, 2016

Here is what comes back from mvn -version

$mvn -version
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T04:57:37-07:00)
Maven home: /usr/local/Cellar/maven/3.3.3/libexec
Java version: 1.8.0_40, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10", arch: "x86_64", family: "mac"

@AlexDBlack
Copy link
Contributor

I've tested maven 3.2,3 and 3.3.3, no difference on my machine. IntelliJ is happy with either version of maven. Java 1.8.0_20 on Windows 8.1
So: not sure at this point.

@javadba
Copy link
Author

javadba commented Feb 4, 2016

I have tried again with latest dl4j, java 1.7 as well as 1.8, different versions of IJ (14/15). They all give similar errors.

@javadba
Copy link
Author

javadba commented Feb 4, 2016

This is a serious showstopper. My team wants to consider dl4j but we can not proceed.

@AlexDBlack
Copy link
Contributor

Problem is: if none of us can reproduce it, I'm not sure what to tell you. We've got devs on Windows, Linux and OSX (all on IntelliJ), and we're not seeing this. Nor have we had any other reports of this.

Now, the dependency in question is used for the core image loading functionality, so it's non-trivial to do anything about it. In your case, if you might try setting some maven exclusions under canova-nd4j-image (or, remove that entirely). You wouldn't be able to use the image loading functionality in Canova, but it might allow you to run other examples.

@jameyg42
Copy link

I stumbled across this by accident, but after reading the thread I'm curious why no one's actually logged an issue in the JAI repo. The version range is clearly wrong (missing the closing )..) - and although that doesn't explain the cases where it works, it seems to be a pretty good explanation for the case here that's failing.

@javadba you actually linked to a description of a workaround until the problem gets addressed in JAI - but the followup conversation seems to suggest you're not aware that the workaround needed to be applied to your local repo (in your .m2/ directory - there's nothing the DL4J project can really do to address the downstream problem). Although if you look closely at what that java8-and-higher profile is actually doing in JAI, you can pretty much delete the entire <profiles> section in your local POM (it's just setting up some javadoc options)

@javadba
Copy link
Author

javadba commented Feb 25, 2016

@AlexDBlack The issue is not simply addressed by removing canova: even after commenting out those dependencies the original error on the OP still shows. I see this issue across (a) all dl4j projects (b) across different versions of IJ (14 and 15, ultimate and community) and even different versions of OS/X (I upgraded ten days ago from Yosemite to El Capitan). One project/team already punted on this - since as you mentioned I did not have bandwidth to dive in and fix the issue. Longer term I still would like to evaluate this project.

Biding my time to see if answers like from @jameyg42 might help. I started to look into his suggestion: it will take a bit more work to see if can make it happen that way.

@javadba
Copy link
Author

javadba commented Feb 28, 2016

OK ! The issue is on my laptop . I did not know about brew switch command. I have four versions of maven installed via brew and they were not resolving properly. Did brew switch maven 3.3.9 and now things are building fine. Closing this issue - apologies for the hassle. I just really wanted to use this project but had been unable to do so over months.

@javadba javadba closed this as completed Feb 28, 2016
@agibsonccc
Copy link
Contributor

@javadba FWIW, it may be worth trying on a VPS next time. We'll ideally provide docker containers or something to help fix this kind of stuff long term. Macs are particularly finnicky as far as dev machines go though ;/.

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

5 participants