[ome-devel] Error(?) in OMERO 4.4.2 psql profile file

Josh Moore josh at glencoesoftware.com
Tue Aug 28 20:31:27 BST 2012


On Aug 28, 2012, at 3:50 PM, Luca Lianas wrote:

> Hi everyone,

Hi Luca,


> we are going to upgrade our OMERO.biobank installation to the 4.4.2 version
> so I'm doing some tests in order to check if the upgrade can be performed
> safely.
> After successfully building the server, I launched the ./build.py
> build-schema command and the hdm2ddl tool wasn't able to complete the task
> and returned the following exception
> 
> ...
> 
> BUILD FAILED
> /opt/omero_4.4/build.xml:272: The following error occurred while executing
> this line:
> /opt/omero_4.4/components/antlib/resources/global.xml:367: The following
> error occurred while executing this line:
> /opt/omero_4.4/components/model/build.xml:86:
> org.hibernate.HibernateException: Dialect class not found:
> ome.tools.hibernate.PostgresqlDialect
> ...
> 
> I checked the psql profile file and changed the
> 
> omero.db.dialect=ome.tools.hibernate.PostgresqlDialect
> 
> line to
> 
> omero.db.dialect=org.hibernate.dialect.PostgreSQLDialect
> 
> like it was in the 4.3 version of OMERO. After this correction the
> build-schema command was able to successfully complete the task.
> Is there an error in the psql profile file or did I do something wrong when
> I built the server (simply using the ./build.py command)?

There's not an error in the psql but in the build system. At the point where you are generating the DB (components/model) the ome.tools.hibernate classes are not available since they're in components/server. Therefore, for anyone generating the schema, it's necessary to use:

        ./build.py build-schema \
            -Domero.db.dialect=org.hibernate.dialect.PostgreSQLDialect

which I should hard-code in components/model/build.xml before importing the other config files.


> Thanks,
> Luca


Sorry for the confusion,
~Josh


More information about the ome-devel mailing list