Maven problem

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Maven problem

Preibisch, Stephan
Hi guys,

I am almost there with the new spimreconstruction branch (https://github.com/fiji/spimreconstruction/tree/newspimreconstruction), and I re-implemented the first fusion in ImgLib2. Now I run into the problem that a simple

ImageJFunctions.show( ArrayImgs.floats( new long[]{ 300, 100, 200} ) );

fails with:

Exception in thread "main" java.lang.NoClassDefFoundError: net/imglib2/display/projector/Projector2D
at net.imglib2.img.display.imagej.ImageJVirtualStack.<init>(ImageJVirtualStack.java:93)
at net.imglib2.img.display.imagej.ImageJVirtualStackFloat.<init>(ImageJVirtualStackFloat.java:51)
at net.imglib2.img.display.imagej.ImageJFunctions.wrapFloat(ImageJFunctions.java:238)
at net.imglib2.img.display.imagej.ImageJFunctions.wrap(ImageJFunctions.java:170)
at net.imglib2.img.display.imagej.ImageJFunctions.show(ImageJFunctions.java:219)
at net.imglib2.img.display.imagej.ImageJFunctions.show(ImageJFunctions.java:123)
at spim.fiji.plugin.Image_Fusion.run(Image_Fusion.java:40)
at spim.fiji.plugin.Image_Fusion.main(Image_Fusion.java:104)
Caused by: java.lang.ClassNotFoundException: net.imglib2.display.projector.Projector2D
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 8 more


I have all imglib projects checked out, up-to-date and maven depencies updated.

If anyone has any idea where this comes from would be great!

Thanks so much,
Steffi

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel
Reply | Threaded
Open this post in threaded view
|

Re: Maven problem

Preibisch, Stephan
Hi,

Christian helped me, I changed the version of ImgLib2 to ${imglib2.version}, now it works. 

But Eclipse doesn't recognize the opened project anymore (see screenshot). It also complains that "Overriding managed version 2.0.0-beta-25 for imglib2", no idea what that means.

Again, any help would be great.

Thanks a lot,
Steffi

On Apr 11, 2014, at 17:53 , Stephan Preibisch wrote:

Hi guys,

I am almost there with the new spimreconstruction branch (https://github.com/fiji/spimreconstruction/tree/newspimreconstruction), and I re-implemented the first fusion in ImgLib2. Now I run into the problem that a simple

ImageJFunctions.show( ArrayImgs.floats( new long[]{ 300, 100, 200} ) );

fails with:

Exception in thread "main" java.lang.NoClassDefFoundError: net/imglib2/display/projector/Projector2D
at net.imglib2.img.display.imagej.ImageJVirtualStack.<init>(ImageJVirtualStack.java:93)
at net.imglib2.img.display.imagej.ImageJVirtualStackFloat.<init>(ImageJVirtualStackFloat.java:51)
at net.imglib2.img.display.imagej.ImageJFunctions.wrapFloat(ImageJFunctions.java:238)
at net.imglib2.img.display.imagej.ImageJFunctions.wrap(ImageJFunctions.java:170)
at net.imglib2.img.display.imagej.ImageJFunctions.show(ImageJFunctions.java:219)
at net.imglib2.img.display.imagej.ImageJFunctions.show(ImageJFunctions.java:123)
at spim.fiji.plugin.Image_Fusion.run(Image_Fusion.java:40)
at spim.fiji.plugin.Image_Fusion.main(Image_Fusion.java:104)
Caused by: java.lang.ClassNotFoundException: net.imglib2.display.projector.Projector2D
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 8 more


I have all imglib projects checked out, up-to-date and maven depencies updated.

If anyone has any idea where this comes from would be great!

Thanks so much,
Steffi
_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel


_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel
Reply | Threaded
Open this post in threaded view
|

Re: Maven problem

Tobias Pietzsch
Hi Steffi,

Projector2D has been replaced by IterableIntervalProjector2D recently in imglib2 core.
Apparently the version of imglib2 core you have is more recent than 2.0.0-beta-25, because that one doesn't have this change yet.
However, your imglib-ij project probably is build against the beta-25 and thinks Projector2D is still there.
(I'm really not looking forward to the world of split imglib repositories, I fear we'll see a lot of problems like this…)


Instead of overriding individually the version of imglib2, I would recommend just setting the version property in your pom to

<properties>
<imglib2.version>2.0.0-SNAPSHOT</imglib2.version>
</properties>

Then in the actual dependencies don't give any version:

<dependency>
<groupId>net.imglib2</groupId>
<artifactId>imglib2</artifactId>
</dependency>
<dependency>
<groupId>net.imglib2</groupId>
<artifactId>imglib2-realtransform</artifactId>
</dependency>

and it should pick the managed one which is now 2.0.0-SNAPSHOT.

Could you try this?

best regards,
Tobias


On Apr 11, 2014, at 10:16 AM, Stephan Preibisch <[hidden email]> wrote:

Hi,

Christian helped me, I changed the version of ImgLib2 to ${imglib2.version}, now it works. 

But Eclipse doesn't recognize the opened project anymore (see screenshot). It also complains that "Overriding managed version 2.0.0-beta-25 for imglib2", no idea what that means.

Again, any help would be great.

Thanks a lot,
Steffi

<Screen.jpeg>
On Apr 11, 2014, at 17:53 , Stephan Preibisch wrote:

Hi guys,

I am almost there with the new spimreconstruction branch (https://github.com/fiji/spimreconstruction/tree/newspimreconstruction), and I re-implemented the first fusion in ImgLib2. Now I run into the problem that a simple

ImageJFunctions.show( ArrayImgs.floats( new long[]{ 300, 100, 200} ) );

fails with:

Exception in thread "main" java.lang.NoClassDefFoundError: net/imglib2/display/projector/Projector2D
at net.imglib2.img.display.imagej.ImageJVirtualStack.<init>(ImageJVirtualStack.java:93)
at net.imglib2.img.display.imagej.ImageJVirtualStackFloat.<init>(ImageJVirtualStackFloat.java:51)
at net.imglib2.img.display.imagej.ImageJFunctions.wrapFloat(ImageJFunctions.java:238)
at net.imglib2.img.display.imagej.ImageJFunctions.wrap(ImageJFunctions.java:170)
at net.imglib2.img.display.imagej.ImageJFunctions.show(ImageJFunctions.java:219)
at net.imglib2.img.display.imagej.ImageJFunctions.show(ImageJFunctions.java:123)
at spim.fiji.plugin.Image_Fusion.run(Image_Fusion.java:40)
at spim.fiji.plugin.Image_Fusion.main(Image_Fusion.java:104)
Caused by: java.lang.ClassNotFoundException: net.imglib2.display.projector.Projector2D
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 8 more


I have all imglib projects checked out, up-to-date and maven depencies updated.

If anyone has any idea where this comes from would be great!

Thanks so much,
Steffi
_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel


_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Maven problem

dscho
Administrator
Hi Tobias,

On Fri, 11 Apr 2014, Tobias Pietzsch wrote:

> Projector2D has been replaced by IterableIntervalProjector2D recently in
> imglib2 core.

Please keep in mind that such problems are easily avoided by leaving
@Deprecated placeholders in place.

These deprecated classes/methods need to removed eventually, and keeping
with SemVer implies that the major version number needs to be increased in
that case.

In the ImageJ project we did not do that so far, because we exempt all the
software which is still in beta phase from being versioned in SemVer,
explaining that all the APIs are still in flux during the beta period.

However, to provide a dependable software project that is useful for other
developers than only the core developers of said project, once we are out
of beta, we cannot simply rename classes or methods or move them between
packages anymore, not without leaving deprecated placeholders in place
(and eventually biting the bullet and bumping the major version when we
remove the deprecated APIs).

Ciao,
Johannes

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel