• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • Start Page
  • Index
  • History
  • Last Change

Development FAQ

Table of Contents

  1. Build
    1. How to add new jars to build
    2. Eclipse projects have errors
    3. Failure because JUnit is missing
    4. Fails with java.lang.StackOverflowError
    5. Fails with an OutOfMemoryError exception
  2. Deployment
    1. Server start or deployment fails with "Trying to install an already …
  3. OmeroBlitz
    1. Method fails with `Ice.UnknownLocalException?: "unknown = …
    2. Method fails with Ice.MemoryLimitException

Build

How to add new jars to build

To add a jar to the repository, copy it to lib/repository with a name matching: NAME-VERSION.jar (where NAME and VERSION can have hypens). Then add a line to the appropriate ivy.xml which matches that jar. In general, a dependency should be added at the highest (or "latest" in the dependency graph) level possible, while still allowing all code to build and all tests to run.

Eclipse projects have errors

The Eclipse projects in the subversion repository rely on the build system to function properly. I.e. they are not completely standalone. If you open the projects from a clean checkout, you will see errors like this:

To use Eclipse, first build from source:

$ java omero quick build
Buildfile: build.xml

BUILD FAILED
/private/tmp/eclipse-test/components/antlib/resources/dependencies.xml:69: missing !

===============================================================================   
Please run "java omero setup" to configure your site.
===============================================================================

Total time: 1 second
josh@josh-moores-computer:/tmp/eclipse-test$ touch etc/local.properties
josh@josh-moores-computer:/tmp/eclipse-test$ java omero quick build
Buildfile: build.xml

deps-buildlist:
:: Ivy 2.0.0-beta1 - 20071206070608 :: http://ant.apache.org/ivy/ ::
:: loading settings :: file = /private/tmp/eclipse-test/etc/ivysettings.xml

deps-retrieve:
Created dir: /private/tmp/eclipse-test/components/dsl/target/libs
:: Ivy 2.0.0-beta1 - 20071206070608 :: http://ant.apache.org/ivy/ ::
:: loading settings :: file = /private/tmp/eclipse-test/etc/ivysettings.xml
:: resolving dependencies :: omero#dsl;working@josh-moores-computer.local
        confs: [core, build, test]
        found ant#ant;1.6.5 in repo
        found commons-collections#commons-collections;3.1 in repo
        found commons-logging#commons-logging;1.0.4 in nested_repo
        found groovy#groovy;all-1.0 in nested_repo
...
deps-publish-local:
:: delivering :: omero#app;working@josh-moores-computer.local :: 3.0-Beta3 :: integration :: Tue Jun 10 12:11:17 CEST 2008
        delivering ivy file to /private/tmp/eclipse-test/components/app/target/app.xml
:: publishing :: omero#app
        published app to /private/tmp/eclipse-test/etc/../lib/repository/omero/app/3.0-Beta3/app-3.0-Beta3.ear
        published ivy to /private/tmp/eclipse-test/etc/../lib/repository/omero/app/3.0-Beta3/ivy.xml

BUILD SUCCESSFUL
Total time: 2 minutes 44 seconds

Here you can see how the dependecies are being resolved by Ivy.

Once the build is finished, update your Eclipse project.

Failure because JUnit is missing

BUILD FAILED
.../OMERO/build.xml:102: The following error occurred while executing this line:
.../OMERO/components/antlib/resources/macros.xml:49: The following error occurred while executing this line:
.../OMERO/components/antlib/resources/macros.xml:59: The following error occurred while executing this line:
.../OMERO/components/antlib/resources/macros.xml:83: The following error occurred while executing this line:
.../OMERO/components/antlib/resources/lifecycle.xml:104: Could not create task or type of type: junit.

*** Use java omero rather than ant for building. JUnit is handled specially in omero.class.

Fails with java.lang.StackOverflowError

$ ant clean cleantools
Buildfile: build.xml

deps-configure:

deps-buildlist:
[ivy:buildlist] :: Ivy 2.0.0-beta1 - 20071206070608 :: http://ant.apache.org/ivy/ ::
:: loading settings :: file = /home/callan/OMERO3/etc/ivysettings.xml

BUILD FAILED
java.lang.StackOverflowError

Total time: 1 second

*** Try unset CLASSPATH.

Fails with an OutOfMemoryError exception

BUILD FAILED
/usr/local/omero-3.0-M2/components/antlib/resources/global.xml:209: The following error occurred while executing this line:
/usr/local/omero-3.0-M2/components/antlib/resources/macros.xml:82: The following error occurred while executing this line:
/usr/local/omero-3.0-M2/components/common/build.xml:63: The following error occurred while executing this line:
/usr/local/omero-3.0-M2/components/antlib/resources/macros.xml:169: org.hibernate.tool.hbm2x.ExporterException: 
MethodInvocationException while processing template Pojo. Invocation of method 'get' in  class 
org.hibernate.tool.hbm2x.TemplateHelper$Templates threw exception class java.lang.OutOfMemoryError : 
Java heap space

*** Use java -Xmx200M omero ... rather than just java omero .... On some platform/JVM combinations, the creation of the Hibernate SessionFactory from within ant is too much for the default memory (can be as low as 2MB). This commands sets the minimum heap to 200MB.

Deployment

Server start or deployment fails with "Trying to install an already registered mbean"

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@3c90a00e { url=file:/Local/josh/jboss-4.0.4.GA/server/default/deploy/omero.ear }
  deployer: org.jboss.deployment.EARDeployer@41e80761
  status: Deployment FAILED reason: Trying to install an already registered mbean: omero:service=LoginConfig
  state: FAILED
  watch: file:/Local/josh/jboss-4.0.4.GA/server/default/deploy/omero.ear
  altDD: null
  lastDeployed: 1165396302921
  lastModified: 1165396288000
  mbeans:

*** Two or more ear files produced by the OMERO build system have been deployed to your JBoss. This happened intentionally between 3.0-M3 and 3.0-Beta1 when the named changed from app-3.0-M3.ear to omero.ear. Simply remove the app-...ear file or any other application archives (.ear) which you do not want running in your JBoss instance.

OmeroBlitz

Method fails with Ice.UnknownLocalException: "unknown = Ice.MemoryLimitException"

Ice.UnknownLocalException: exception ::Ice::UnknownLocalException
{
    unknown = Ice.MemoryLimitException
    reason = (null)
        at IceInternal.BasicStream.expand(BasicStream.java:1956)
        at IceInternal.BasicStream.writeInt(BasicStream.java:818)
        at IceInternal.BasicStream.writeObject(BasicStream.java:1268)
        at omero.api.IObjectListHelper.write(IObjectListHelper.java:28)
        at omero.api._IQueryDisp.___findAll(_IQueryDisp.java:211)
        at omero.api._IQueryDisp.__dispatch(_IQueryDisp.java:463)
        at IceInternal.Incoming.invoke(Incoming.java:147)
        at Ice.ConnectionI.invokeAll(ConnectionI.java:2249)
        at Ice.ConnectionI.message(ConnectionI.java:1362)
        at IceInternal.ThreadPool.run(ThreadPool.java:782)
        at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
        at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:1242)

}

*** The Ice.MessageSizeMax is too small for the method invocation which is being attempted. The UnknownException implies that the server is throwing the MemoryLimitException and so it's configuration needs to be changed. See below for what the client exceptions looks like.

Method fails with Ice.MemoryLimitException

Ice.MemoryLimitException: exception ::Ice::MemoryLimitException
{
    reason = 
}

*** The Ice.MessageSizeMax in ice.config is too small for the method invocation which is being attempted.


See also: OmeroCommunity, OmeroContributing, OmeroDevelopment

Attachments

  • eclipse_errors.png (168.2 kB) - added by jmoore 4 months ago.

Download in other formats:

  • Plain Text

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/