net.imagej.table.Column not found

imagej-legacy

#1

Dear Curtis,
@ctrueden
@Christian_Tischer
We are running a plugin (from this repo: https://github.com/tischi/fiji-plugin-morphometry) and are getting this error:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: net/imagej/table/Column
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:303)
	at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:163)
	at ij.IJ.runPlugIn(IJ.java)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: net/imagej/table/Column
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:299)
	... 5 more

It runs locally within our IntelliJ environment but not within Fiji…

Thank you very much for your help!


#2

The net.imagej.table.* package moved to org.scijava.table.* with the latest Fiji updates. If your project uses pom-scijava-24.0.0 as parent, your compiler should warn about these classes.

@Christian_Tischer I tried to clone fiji-plugin-morphometry and build it locally to submit a PR with fixes, but maven complains because it cannot find transforms-utils and table-utils on any public Maven repository.
If you want help in fixing issues like these, please deploy your artifacts to maven.imagej.net :wink: otherwise I leave it up to you to replace the package names in your projects.


NB: the commit message of this commit is highly misleading:


#3

I submitted a PR:

… probably also table-utils needs to be changed in some way, but I couldn’t find it, as this repository contains nothing but a README.md.


#4

In fact, this is something we (@Alex_H) wanted to do for a long time, but somehow I got the message I got was that this is not so easy or not everybody has rights to do this?

You are right :slight_smile: I changed the parent pom in table-utils and accidentally typed the commit message in the wrong tab of my terminal window. Changing everything to 24.0.0 solved the issues. Thanks a lot!


#6

Indeed, the credentials for deploying to the ImageJ Maven repository are secret. If you want to add Travis support for your repository (and thus enable releases to maven.imagej.net), make a post on the Image.sc Forum, @ mention me, tell me the repository for which you want to enable Travis, and I will file a PR adding Travis support. This is done via the travisify.sh script. On your side, once the Travis build is in place, all you have to do to deploy a release version is run release-version.sh with no arguments (also from the scijava-scripts repository).

Another option for easy deployment of Maven artifacts is jitpack.io. It is super easy, and we may start recommending it for community artifacts over the Travis-based approach above. Still early days there.


#7

I was using jitpack.io for some time, but had trouble. It did not always find the latest commit, I think because one has to wait until they build the jar on their servers. Very likely I did something incorrect, but in practice it was not stable for me.

@haesleinhuepf recommended using https://bintray.com/. This is a bit more work to set up, but I think then the building of the jar happens locally and they are just uploaded. My personal experience is that this works more stable.


#8

I think just remembered what one issue was: they used a different version of maven and then things were going wrong. Using the bintray approach this should not be an issue, because one builds locally and has control about the maven version.


#9

@Christian_Tischer It is possible to tell jitpack to use custom commands; see the docs. But there is nothing explicitly documented about overriding the Maven version. I’m would be very surprised if it’s not possible, though.