NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 1061 - java.lang.NoSuchMethodException: Could not find method net.imglib2.view.Views.extendMirrorDouble
java.lang.NoSuchMethodException: Could not find method net.imglib2.view.Views...
Status: RESOLVED INVALID
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2015-05-04 09:37 CDT by Lukas Jagos
Modified: 2015-05-04 12:07 CDT
2 users (show)

See Also:

Description Lukas Jagos 2015-05-04 09:37:13 CDT
Hi,

I have created plugin in NetBeans IDE. When I run it there, it works (imglib2-2.0.0.jar library is used). However when I compile plugin in Fiji ((imglib2-2.2.1.jar library is used)) I get this:

java.lang.NoSuchMethodException: Could not find method net.imglib2.view.Views.extendMirrorDouble(Lnet/imglib2/RandomAccessibleInterval;)Lnet/imglib2/ExtendedRandomAccessibleInterval;
There was a problem with the class net.imglib2.view.Views which can be found here:
/C:/Fiji/Fiji.app/jars/imglib2-2.2.1.jar
java.lang.NoSuchMethodError: net.imglib2.view.Views.extendMirrorDouble(Lnet/imglib2/RandomAccessibleInterval;)Lnet/imglib2/ExtendedRandomAccessibleInterval;
	at Structure_Ball.gaussianFilter(Structure_Ball.java:199)
	at Structure_Ball.run(Structure_Ball.java:613)
	at ij.IJ.runUserPlugIn(IJ.java:199)
	at ij.IJ.runPlugIn(IJ.java:163)
	at ij.Executer.runCommand(Executer.java:131)
	at ij.Executer.run(Executer.java:64)
	at java.lang.Thread.run(Thread.java:662)

	at Structure_Ball.gaussianFilter(Structure_Ball.java:199)
	at Structure_Ball.run(Structure_Ball.java:613)
	at ij.IJ.runUserPlugIn(IJ.java:199)
	at ij.IJ.runPlugIn(IJ.java:163)
	at ij.Executer.runCommand(Executer.java:131)
	at ij.Executer.run(Executer.java:64)
	at java.lang.Thread.run(Thread.java:662)

Thanks for help.

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 7
  os.version => 6.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\Fiji\Fiji.app/java/win64/jdk1.6.0_24//jre
  imagej.dir => C:\Fiji\Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20150501204914)
Fiji: http://fiji.sc/update/ (last check:20150504154352)

Files not up-to-date:
  aafefe57 (LOCAL_ONLY) 20150408223749 jars/EJML-core-0.26.jar
  6de01bcf (LOCAL_ONLY) 20150504155702 plugins/Structure_Ball-0.1.2-sources.jar
  7dc163ab (LOCAL_ONLY) 20150504155702 plugins/Structure_Ball-0.1.2.jar
Comment 1 Mark Hiner 2015-05-04 12:07:57 CDT
Hi Lukas,

The problem comes from the return type:

>net.imglib2.view.Views.extendMirrorDouble(Lnet/imglib2/RandomAccessibleInterval;)Lnet/imglib2/ExtendedRandomAccessibleInterval

Note the return value: net/imglib2/ExtendedRandomAccessibleInterval

This class moved to net.imglib2.view.ExtendedRandomAccessibleInterval before the official 2.0.0 release[1], so that's why you're getting the NoSuchMethodException.

>imglib2-2.0.0.jar library is used

Given the dependency skew, it seems very likely that this jar is NOT the actual ImgLib2-2.0.0 release jar. In any case, you should update your plugin to use the same ImgLib2 release that is distributed with Fiji.

The most robust way to do this is to use Maven[2] to manage your dependency versions. If you convert your plugin to a Maven project and extend the latest pom-fiji[3] you are guaranteed to see the same version of all dependencies that ship with Fiji. A good starting point for your own pom would be to look at other Fiji plugins, like Stitching[4], that also use ImgLib2.

I'm going to close this issue since it's not truly a bug, but you are welcome to reply with any questions you may have. The mailing lists and chat[5] are also good resources for getting development help.

Thank you for taking the time to contact us!

Best,
Mark

[1] https://github.com/imglib/imglib2/blob/imglib2-2.0.0/src/main/java/net/imglib2/view/ExtendedRandomAccessibleInterval.java
[2] http://imagej.net/Maven
[3] https://github.com/fiji/pom-fiji/releases
[4] https://github.com/fiji/Stitching/blob/Stitching_-3.0.2/pom.xml
[5] http://imagej.net/Help:Contents