[ERROR] NoClassDefFoundError: net/imagej/table/Table

This one has been hard for me to debug:
The beta version of SNT in the Neuroanatomy update site is no longer working. You get the following when you try to run it:

[ERROR] Malfunctioning plugin: net.imagej.ui.swing.widget.SwingTableWidget
java.lang.NoClassDefFoundError: net/imagej/table/Table
	at net.imagej.ui.swing.widget.SwingTableWidget.supports(SwingTableWidget.java:55)
	at net.imagej.ui.swing.widget.SwingTableWidget.supports(SwingTableWidget.java:19)
	at org.scijava.plugin.TypedService.find(TypedService.java:73)
	at org.scijava.plugin.WrapperService.create(WrapperService.java:67)
	at org.scijava.widget.AbstractInputHarvester.addInput(AbstractInputHarvester.java:111)
	at org.scijava.widget.AbstractInputHarvester.buildPanel(AbstractInputHarvester.java:85)
	at org.scijava.widget.InputHarvester.harvest(InputHarvester.java:70)
	at org.scijava.ui.AbstractInputHarvesterPlugin.process(AbstractInputHarvesterPlugin.java:77)
	at org.scijava.module.ModuleRunner.preProcess(ModuleRunner.java:105)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:157)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
	at org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

As far as I can tell this issue started ~2 days ago after the major release of artifacts to the Java8 update site. The confusing part is that everything runs fine locally from Eclipse, even after updating to the latest pom (24.0.0) (which I’ve done here). Things fail once I copy files to an up-to-date ImageJ installation subscribed only to the ImageJ, Fiji, and Java-8 update sites, using the imagej.app.directory property.

I’m guessing this is related to the migration discussed in this topic, but I’m at lost on how to track it.

Sorry for that, the table API has been moved from net.imagej.table to org.scijava.table recently. The original plan was to deprecate the old classes, but as some of the API is spread across multiple components, @ctrueden decided to remove the old classes entirely with the latest ImageJ/Fiji update.

In order to fix the issue:

  • make sure you inherit the latest pom-scijava version 24.0.0 and don’t override any component versions
  • in case you’re using the table API in your own code, replace net.imagej.table.* by org.scijava.table.* in all occurrences.

EDIT: actually, I noticed that net.imagej.ui.swing.widget.SwingTableWidget is part of imagej-plot-service:


But I wasn’t able to find where the source code of this component lives… @tferr, @ctrueden any idea?

1 Like

Thanks a lot @imagejan!
Adopting org.scijava.table. fixes the issue above, but you are right, SNT commands using plot-service still fail. I think the source code is at https://github.com/maarzt/imagej-plot-service. If you don’t have time, I can commit the changes there once I’m in the lab, later in the day.

But actually, this relates to something I wanted to ask for a while: I notice that I seem to be the only one using plot-service? Will it be replaced? Is it an abandoned project? Should I refrain from from using it?

Ah yes, now I remember I had already seen it :slight_smile:

You might be correct that you’re one of the few developers using it.
On the contrary, let’s move the project to the imagej org (or maybe scijava?) so that it becomes more visible and more widely used! @maarzt would you be fine moving it?

I would say scijava, as it seems to to me to that being side-by-side with the table package makes more sense. What do you recommend? Hot fix for plot-service as is? or move it and release a new scijava-pom?
Can I ask you a favor? Could you please assemble a to-do-list of things that need to be done?
I could then help with those, as this is somewhat time-sensitive: I feel a bit like a deceiver: I’ve convinced everyone that they should subscribe to the Neuroanatomy update site to use the new SNT, and now they are stuck with a crippled plugin until this is fixed.

1 Like

In the short term: fix imagej-plot-service, as you’re shipping it via your own update site and have full control over it.

In the long term: move imagej-plot-service to the scijava GitHub org (renaming to scijava-plot or some such), manage its version in pom-scijava, and ship it via the Java-8 update site.

I’ll try to do that when the #I2K conference is over and I’m back in the office.

1 Like

I spoke with @maarzt and we definitely want to continue working on the plot service. We might have time to work on it next week while I am visiting MPI-CBG. I agree that it makes most sense to migrate to the scijava org, and maybe into scijava-common and scijava-ui-swing. The reason it’s still separate, IIRC, is because we did not want to commit to a stable API yet. So @tferr the fact that you are using it is living on the edge.

Perfect thanks! and thanks @maarzt for releasing plot-service 0.1.1. It fixed things on SNT’s end.

1 Like

@maarzt and I made a plan on how to proceed with PlotService. He is going to file some PRs in the right places. @maarzt Please let me know if there is anything you need from me (creating repositories, etc.).

@ctrueden I prepared the PlotService as far as I could. I wrote a list what I think are the next steps, see https://github.com/scijava/scijava-ui-swing/pull/43.

There is now a repository https://github.com/maarzt/scijava-plot (I rename the imagej-plot-service repository) which we need to move to org.scijava. And the are PRs to scijava-ui-swing (https://github.com/scijava/scijava-ui-swing/pull/43) and imagej-legacy (https://github.com/scijava/scijava-ui-swing/pull/43).