ICAT 4.3.2 installation issue

21 visualizações
Pular para a primeira mensagem não lida

anton.t...@gmail.com

não lida,
30 de jan. de 2014, 02:35:1630/01/2014
para icatproje...@googlegroups.com
While updating our current environment to ICAT v4.3.2 we encountered the following issue.

Initial state:
- existing Oracle DB for ICAT
- ICAT v4.2.5 deployed on GlassFish

We followed the instructions described at http://icatproject.org/mvn/site/icat/4.3.2/icat.ear/installation.html.

The upgrade of the database schema completed successfully, but while deploying the icat.ear-4.3.2.ear on our Glassfish, there was a huge series of error messages tracing SQL exceptions.
They stated that the table/constraint already existed and we understood that the application was attempting to re-create the database schema.

The options set in icat-core-4.3.2.jar/META-INF/persistence.xml confirmed this assumption:

<property name="eclipselink.ddl-generation" value="create-tables"/>

Which meant that the application was not expecting the database to be already created.
Disabling this option (default value is "none") solved the problem and the application deployed successfully.
Unfortunately, according to EclipseLink documentation for DDL generation, there is no possibility to use something similar to "create-if-not-exists"...


The question is: is there a way to make the database schema creation optional ?

Rolf Krahl

não lida,
30 de jan. de 2014, 03:15:3130/01/2014
para icatproje...@googlegroups.com
Am Mittwoch, 29. Januar 2014, 23:35:16 schrieb anton.t...@gmail.com:
>
> We followed the instructions described at
> http://icatproject.org/mvn/site/icat/4.3.2/icat.ear/installation.html.
>
> The upgrade of the database schema completed successfully, but while
> deploying the icat.ear-4.3.2.ear on our Glassfish, there was a huge
> series of error messages tracing SQL exceptions.
> They stated that the table/constraint already existed and we
> understood that the application was attempting to re-create the
> database schema.

Did you deploy manually (e.g. asadmin deploy icat.ear-4.3.2.ear) or
did you use the installer (e.g. ./setup install) which among others
deploys the ear? I get the same error messages also when deploying by
hand, but not when I use the installer. (I guess the installer simply
suppresses them.)

In any case, you can happily just ignore these error messages. As you
already guessed, the application tries to create the database schema
and fails because the tables are already there. But that is exactly
what you want: you don't want the creation to succeed, because you
already have your schema in place. After the error messages, the
application deploys nevertheless and works.

HTH
Rolf

--
Rolf Krahl <rolf....@helmholtz-berlin.de>
Helmholtz-Zentrum Berlin für Materialien und Energie (HZB)
Albert-Einstein-Str. 15, 12489 Berlin
Tel.: +49 30 8062 12122
signature.asc

anton.t...@gmail.com

não lida,
30 de jan. de 2014, 03:48:3830/01/2014
para icatproje...@googlegroups.com
Le jeudi 30 janvier 2014 09:15:31 UTC+1, rolf.krahl a écrit :
>
>
> Did you deploy manually (e.g. asadmin deploy icat.ear-4.3.2.ear) or
> did you use the installer (e.g. ./setup install) which among others
> deploys the ear? I get the same error messages also when deploying by
> hand, but not when I use the installer. (I guess the installer simply
> suppresses them.)
>
> In any case, you can happily just ignore these error messages. As you
> already guessed, the application tries to create the database schema
> and fails because the tables are already there. But that is exactly
> what you want: you don't want the creation to succeed, because you
> already have your schema in place. After the error messages, the
> application deploys nevertheless and works.
>
>
>
> HTH
>
> Rolf

Thank you for your reply!

We did not use the installer.
We tried manual deployment with asadmin and then through GlassFish UI. Both of them failed because of these exceptions.


Rolf Krahl

não lida,
30 de jan. de 2014, 04:14:0930/01/2014
para icatproje...@googlegroups.com
Am Donnerstag, 30. Januar 2014, 00:48:38 schrieb anton.t...@gmail.com:
>
> We did not use the installer.
> We tried manual deployment with asadmin and then through GlassFish
> UI. Both of them failed because of these exceptions.

Did they really fail or did they just emit spurious error messages?

The former would surprise me. I just tried it out of curiosity: I
have a working ICAT 4.3.2. When i manually undeploy and then redploy
it (which in a sense simulates the very same situation), I get:

$ asadmin undeploy icat.ear-4.3.2
Command undeploy executed successfully.
$ asadmin deploy icat.ear-4.3.2.ear

PER01003: Deployment encountered SQL Exceptions:
PER01000: Got SQLException executing statement "CREATE TABLE APPLICATION
[skip another zillion of error messages on "Table ... already exists"]
Command deploy completed with warnings.
$ asadmin list-applications
authn_db-1.1.1 <ejb, web>
TopCAT <ejb, webservices, web>
TopCATAdmin <ejb, webservices, web>
authn_simple.ear-1.0.0 <ear, ejb>
icat.ear-4.3.2 <ear, ejb, webservices>
Command list-applications executed successfully.

So, the icat.ear-4.3.2.ear is deployed despite the error messages. I
can log in to the ICAT and everything works fine.
signature.asc

Steve Fisher

não lida,
30 de jan. de 2014, 04:30:5830/01/2014
para icatproje...@googlegroups.com
Anton,

Rolf is quite correct in what he says. 

In addition the "create-tables" is not something that should ever be turned off because it not only creates tables but it also creates indices, constraints etc. My migration script for going from ICAT 4.2 to 4.3 assumes that ICAT 4.3 will be deployed normally and that "create-tables" will run to create whatever does not exist. The setup script cuts out any messages starting with "PER01".

Steve
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem