We're Hiring!

building insight

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

building insight

Postby axkibe » Fri Dec 11, 2015 11:57 am

Hi, I got two question to build insight.
Code: Select all
./build.py && ./build.py release-clients

Seems to work fine,

However the resulting jar files seems to have some issue:

Code: Select all
dist$ pwd
/home/axel/om/openmicroscopy-axel/components/insight/OUT/dist
dist$ java -Xms256000000 -Xmx1024000000 -jar omero.insight.jar

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "Initializer"
dist$


I also tried to only build insight following this guide:

http://www.openmicroscopy.org/site/supp ... uting.html

Code: Select all
/home/axel/om/openmicroscopy-axel/components/insight/build
build$ java build
Error: Could not find or load main class build


Which is as far I understood "java" command is no wonder, shouldn't this be "ant" or something?
axkibe
 
Posts: 19
Joined: Wed Mar 04, 2015 10:12 am

Re: building insight

Postby Dominik » Tue Dec 15, 2015 11:49 am

Hi,

thanks for pointing this out.
Code: Select all
java build
won't work any more, we have to update the documentation with respect to this. Yes, the recommended way is to use the Python script on the top level directory.

Launching the Insight jar from the command line is a bit tricky. You need to pass on the classpath, the relative path to the config (container.xml) and the path to the application directory.
In your case this should work (assuming you are in the OUT/dist directory:
Code: Select all
java -cp "*:../app/libs/*" org.openmicroscopy.shoola.Main container.xml /home/axel/om/openmicroscopy-axel/components/insight/OUT/app


Regards,
Dominik
User avatar
Dominik
Team Member
 
Posts: 149
Joined: Mon Feb 10, 2014 11:26 am

Re: building insight

Postby axkibe » Wed Dec 16, 2015 12:52 pm

I don't know what your testing workflow is, after executing the python scripts once to build all dependencies I ended up running

in "components/insight/build/": "ant compile"
and in: "components/insight/OUT/app/compiled"
"cp -r ../config ." (only needed once)
"java -classpath .:../libs/\* -Xms256000000 -Xmx1024000000 org.openmicroscopy.shoola.Main"
axkibe
 
Posts: 19
Joined: Wed Mar 04, 2015 10:12 am

Re: building insight

Postby Dominik » Thu Dec 17, 2015 10:37 am

I think the easiest way for building insight is running the top-level python script pointing it to the insight build.xml:
Code: Select all
./build.py -f components/insight/build.xml

Launching insight from the command line then depends from which directory you're launching it, so that it can find the config files, either copying them or setting the 'app' directory via command line argument, should work both, whatever you prefer.

By the way, with the upcoming 5.2.1 release (should be just a couple of hours now) we're also going to update/fix the "Contributing to OMERO.insight" page you were referring to.

Regards,
Dominik
User avatar
Dominik
Team Member
 
Posts: 149
Joined: Mon Feb 10, 2014 11:26 am


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest