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

Stop shipping unshaded fat jars #83

Closed
ctrueden opened this issue Apr 10, 2014 · 9 comments
Closed

Stop shipping unshaded fat jars #83

ctrueden opened this issue Apr 10, 2014 · 9 comments
Milestone

Comments

@ctrueden
Copy link
Member

A "fat jar" is a JAR that bundles some or all of its dependencies with it. This may be fine if the dependencies are shaded (i.e., their packages are renamed). But in many cases such as the JRuby and Jython uberjars, at least some of the dependencies are not shaded. This causes problems because there are often then multiple versions of the same library available on the classpath from multiple fat jars. To avoid this problem, the Fiji update site should not include any such unshaded fat jars, but instead ship only individual JAR libraries for all its components.

@fcollman
Copy link

The proposed fixed of deleting jruby-complete.jar does not appear to work anymore to fix jython os.path modules.. i am still getting the error after deleting jruby-complete

@ctrueden
Copy link
Member Author

See also Fiji BugZilla bug #741.

@ctrueden
Copy link
Member Author

@ctrueden
Copy link
Member Author

As a workaround, you can delete jffi-1.2.7.jar and Jython will work again.

I figured this out as follows:

  • Plugins > Utilities > Find Jar for Class
  • Paste name of problematic class from the exception: com.kenai.jffi.InvocationBuffer
  • Click OK

Note the warning that appears about how the class is present in two different locations.

@ctrueden
Copy link
Member Author

I fixed Jython. And we already split up JRuby. That just leaves Batik, I think!

@ctrueden ctrueden added this to the m1 milestone Mar 23, 2015
ctrueden added a commit to scijava/pom-scijava that referenced this issue Apr 20, 2016
Components that wish to depend on batik should do so using the official
org.apache.xmlgraphics groupId, not the batik:batik uber-JAR.

See also: fiji/fiji#83
ctrueden added a commit to trackmate-sc/TrackMate that referenced this issue Apr 20, 2016
ctrueden added a commit to fiji/SNT that referenced this issue Apr 20, 2016
ctrueden added a commit to fiji/IO that referenced this issue Apr 20, 2016
ctrueden added a commit to fiji/pom-fiji that referenced this issue Apr 21, 2016
Instead, pom-scijava now manages all the
org.apache.xmlgraphics:batik-* component artifacts.

This avoids problems with uber-JARs; see:
fiji/fiji#83
ctrueden added a commit to trackmate-sc/TrackMate that referenced this issue Apr 21, 2016
ctrueden added a commit to fiji/SNT that referenced this issue Apr 21, 2016
ctrueden added a commit to fiji/IO that referenced this issue Apr 21, 2016
@ctrueden
Copy link
Member Author

ctrueden commented Apr 21, 2016

Progress:

Releases coming soon! Then batik will be fixed, and Fiji will no longer ship any uber-JARs.

@ctrueden
Copy link
Member Author

All is complete, and uploaded to the Java-8 update site. However, there is currently a bug in the updater which prevents marking files obsolete on downstream update sites. So, I cannot remove the old batik uber-JAR yet. As soon as we find a workaround, I'll close this issue.

@bramalingam
Copy link

bramalingam commented Apr 27, 2016

@ctrueden : The workflow (of opening an .msr file with the Java8 update site enabled) works without any issues on the Bio-Formats side, on Windows. (This was previously failing due to dependency clashes)

@ctrueden
Copy link
Member Author

@bramalingam Thanks for the feedback. Glad it is working for your needs. I will close this issue now since all is resolved on the coding side. The removal of the batik uber-JAR will take place when we migrate the Java-8 components back to the core Fiji and ImageJ update sites, hopefully soon.

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

3 participants