fiji plugin : imgOpener exception (scifio class) - image

I'm using Fiji for the first time, I need to open an image as a FloatType so I followed the example found here http://fiji.sc/wiki/index.php/ImgLib2_Examples#Example_1b_-_Opening_an_ImgLib2_image but I get this error:
WARN: Ignoring non-Maven build directory: /home/utente/workspace/my_project/bin
Exception in thread "main" java.lang.IllegalArgumentException: No compatible service: io.scif.SCIFIOService
at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:222)
at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:176)
at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:153)
at org.scijava.Context.<init>(Context.java:200)
at org.scijava.Context.<init>(Context.java:127)
at org.scijava.Context.<init>(Context.java:116)
at io.scif.img.AbstractImgIOComponent.<init>(AbstractImgIOComponent.java:65)
at io.scif.img.ImgOpener.<init>(ImgOpener.java:99)
at SGP_db.StartingJFrame.getGn(StartingJFrame.java:216)
at Plugin.SGP_deblurring_boundary.main(SGP_deblurring_boundary.java:58)
Can't undertand why I get this error, any ideas?
Thanks,
sara

It is almost certainly a build path issue in Eclipse. Are you using the M2E plugin to manage your projects?
If you are not, or aren't sure, please follow the directions on the Fiji web site at:
http://fiji.sc/Developing_ImgLib2#Developing_ImgLib2_with_Eclipse
I would strongly suggest not to manually juggle JAR files in non-Maven Eclipse projects. The Eclipse Maven integration will make your life much easier. For more details, see:
http://fiji.sc/Maven
I've solved importing the ImgOpener class from imglib2.io
Please note that imglib2-io no longer exists; the up-to-date way to access the ImgOpener is to use the io.scif:scifio library instead. If you are basing your work off of the ImgLib2 Examples, please note that you can grab the source from GitHub, which includes a Maven POM with the correct dependencies specified. Start from there, or from the minimal-ij1-plugin project if you need to use ImageJ 1.x routines as well.

Related

Ant to maven conversion

I need to convert few projects from ant to maven. I know the basics of both, also read a lot of articles on how to. However, is it a good idea to write a pom using eclipse? Or is it better to write it without using eclipse? The M2Eclipse plugin needs maven to be tweaked more, will the changes related to M2Eclipse cause problems when the war is built on jenkins?
Pros of using Eclipse IDE:
The formatting of pom.xml will be taken care, when you add the 'maven-eclipse-codestyle.xml' to the code formatter, as mentioned here. Formatting will be harder when you do it without an IDE.
The auto-completion feature of eclipse will make your coding easier, since it will automatically sense the open tags and close them. You need to close all the open tags manually, if you don`t use an IDE.
You can view the dependency hierarchy of the dependencies added and hence it might be a bit helpful while managing the dependencies.This can be extremely useful ,when you have transitive dependencies (Dependencies within other dependencies). You can find more about transitive dependencies here.
An IDE will warn you of common mistakes that may occur while coding (something like, 'forgetting to close an open tag','placing a tag in an incorrect location'). This will save a whole lot of time. If you don`t use an IDE, you need to correct the mistakes only when you get an exception after executing a maven command.
Eclipse will warn of missing artifacts (when the dependencies are not present in the local repository), which can help you to fix it before executing the maven goal.
Cons of using Eclipse IDE:
m2e plugin will throw 'Plugin execution not covered by lifecycle configuration' errors all over your pom.xml files. These errors won`t affect your build, but may be quite annoying.
I personally have done migration from Ant to Maven2. IMO it is better to write pom.xml on your own so that you wont face any last minute surprises as well as you will get complete overall knowledge on what you are exactly doing with your pom file.
However if you still want to go with m2e, from my experience it did not create any problems at all. Regarding the build - I guess there shouldn't be any issue. You can refer this link if you need more info about m2e and jekins - m2e and jenkins

Maven project on new Kepler workspace fails with "Could not initialize class AspectJExpressionPointcut"

I have had a working Indigo workspace for quite a while, with many projects checked out from SVN. Mostly Ant projects, but a few critical Maven projects.
I'm struggling to get a Kepler workspace working with the same projects. I've essentially given up on the pure STS installation, as that gives me (different) errors in both Maven projects. I filed both Eclipse and STS bugs, and they both say it's the others problem, so I've given up on that path for now.
I'm now trying to start with pure Eclipse and install the Spring pieces I want. I thought I had all the plugins installed that I need, and I'm not getting the error dialogs that I was getting with the STS installation, but I'm getting a build error I can't handle. It's saying this:
Build path is incomplete. Cannot find class file for Could not initialize class org.springframework.ide.eclipse.springframework.aop.aspectj.AspectJExpressionPointcut
I suppose I'm missing some plugin, but I don't know what it would be.
I even did a somewhat exhaustive search for that class ("AspectJExpressionPointcut") in my workspace and Kepler distro, and it can't find it, unless it's in a jar file that's inside a jar file (my search just looks for classes in jar files in a directory tree). I see references to it on the internet, but I can't get much out of those references.
The solution is to install Spring IDE AJDT Integration. For Eclipse Kepler you need to add
http://dist.springsource.com/release/TOOLS/update/e4.3/
to the list of update sites, then install "Spring IDE AJDT Integration"

Including LWJGL on Netbeans via Maven

I have a problem with including LWJGL on Netbeans via Maven 2.
I create my own project, and I added new depency. I haven't problems with writting code, but when I try to compile and run it I always getting exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
I read some articles about this problem, because it is common problem; And I know that I should use -Djava.library.path=/native/
But...
I don't get so much Maven and I cannot find the path, where maven stored these libraries. Maybe should I make some other things?
BTW I have not idea, why maven not linked it
if you are running the project via exec-maven-plugin, you need to tell netbeans to include the exec.args property when running and within that property have the right -Djava.library.path=. That's done in the Actions panel in project customizer.

STS M2E 'Plugin execution not covered by lifecycle configuration" Error - Flex-Mojos

I am trying to write my pom.xml for a multimodal flex application. I have been using this resource as an example:
http://www.sonatype.com/books/mvnref-book/reference/flex-dev-sect-creating-with-archetype.html
I am using M2E v1.01 but I am faced with a number of 'Plugin execution not covered by lifecycle configuration" errors. As far as I can see - there are no m2E connectors available to resolve this and I have tried all the Maven advice I can find - to include:
Clean
Update dependencies
Update project configuration
The problem only occurs if the project is declared as swc or swf package. My next move to ask Eclipse to 'permanently mark goal as ignored' - which seems a little brash.
Any advice would be appreciated.
Thanks in advance.
With STS 2.8.0, we have upgraded m2eclipse to be version 1.0. However, this can cause a bit of trouble with existing projects. I wrote a blog on this a couple of months ago.
http://blog.springsource.org/2011/10/18/upgrading-maven-integration-for-springsource-tool-suite-2-8-0/
Essentially, the new architecture for m2eclipse requires that each maven plugin you use must be mapped to one Eclipse plugin to handle the plugin's execution inside of Eclipse. This obviously causes problems since not every maven plugin author has the knowledge or time to create also create and maintain an Eclipse plugin.
By marking the plugin as ignored, you are saying that the plugin should never be executed inside of Eclipse (implying that whenever you need it to be executed, you will do so from the command line). Once marked as ignored, you can then change it to execute, which means that it should always be executed whenever the associated lifecycle is performed in Eclipse. This may cause performance problems, and so only do it if you know the risks.
If all this is too much for you, then STS provides a downgrade option to revert to an older version of m2eclipse. Go to the Dashboard extensions page. Unfortunately, you will have to manually revert all changes to your .project and .classpath files (we provide an auto-upgrade mechanism, but not a downgrade mechanism...presumably everything is in version control).
Any questions or problems should be sent to the STS forums:
http://forum.springsource.org/forumdisplay.php?32-SpringSource-Tool-Suite
You can check this alpha connector "Flex Maven Integration for Flash Builder" on the eclipse marketplace: http://marketplace.eclipse.org/node/648556.

Missing websphere.jar when migrating project from WAS4 to WAS7

I have been assigned a job to compile an old Websphere(WAS4) project, so we can find out which parts of it need to be changed for the project upgrating( to WAS7).
But when I was trying to fix the jar errors, wesphere.jar is missing!! And WAS7 installation path never hava this jar anymore, searching google failed. And I don't like to install older WAS again to just get this jar.
please anybody can help with this, providing an WAS4 version webspere.jar???
TKX in advance!
The jar file itself isn't important, the classes within it are. I don't recall what was in websphere.jar, but there's a good chance that what was is now in j2ee.jar. In fact, if your code isn't using any WebSphere-specific extensions, there's a good chance j2ee.jar is the only jar from WebSphere that you'll need for compiling.
But you should be able to see what specific classes are being complained about by the compiler and if necessary search for those by opening the jar files in like WinZip.
(Keep in mind that the larger changes are the changes to J2EE and Servlet specification levels.)

Resources