Foros de discusión

RE: Migration from 6.0 to 6.2 fails while migrating Kaleo-web

Aleix Casagolda, modificado hace 8 años.

Migration from 6.0 to 6.2 fails while migrating Kaleo-web

New Member Mensajes: 9 Fecha de incorporación: 14/06/13 Mensajes recientes
Hi,

We have to migrate a Liferay installation from version 6.0.2 to 6.2-ga4. When the automated database migration process starts, it seems to work fine but when it begins to upgrade the kaleo tables, it throws a lot of errors like the following:

"ORA-00955: name is already used by an existing object: create table KaleoAction (kaleoActionId number(30,0) not null primary key,groupId number(30,0),companyId number(30,0),userId number(30,0),userName VARCHAR2(200 CHAR) null,createDate timestamp null,modifiedDate timestamp null,kaleoClassName VARCHAR2(200 CHAR) null,kaleoClassPK number(30,0),kaleoDefinitionId number(30,0),kaleoNodeName VARCHAR2(200 CHAR) null,name VARCHAR2(200 CHAR) null,description varchar2(4000) null,executionType VARCHAR2(20 CHAR) null,script clob null,scriptLanguage VARCHAR2(75 CHAR) null,scriptRequiredContexts varchar2(4000) null,priority number(30,0));_ [Sanitized]"

and:

"Invalid column type: getCLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor"

At the end, Liferay starts but kaleo tables are in an inconsistent state, for example, in one side, every time that I start the server I get the following error:

"Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "KALEONODEID": invalid identifier_ [Sanitized]"

I think that this column shouldn't be there in the new version, but it tries to find it. And in the other side, I get this other error too:

ORA-00904: "KALEONODEI0_"."METADATA": invalid identifier_ [Sanitized]

In this case, this METADATA attribute should be in the database but it isn't. I've compared the "migrated" kaleo tables with a working Liferay 6.2 installation and there are some differences in the attributes so, as expected, the migration has failed.

One important thing: our database is Oracle 12c and we are running Liferay Tomcat 7 bundle in CentOS.

Any hint will be appreciated!

Thanks.
thumbnail
Alberto Chaparro, modificado hace 8 años.

RE: Migration from 6.0 to 6.2 fails while migrating Kaleo-web

Liferay Master Mensajes: 549 Fecha de incorporación: 25/04/11 Mensajes recientes
Hi Aleix,

It seems that the 6.2 portal does not recognize the existence of a previous installation of Kaleo and it tries to install it again instead of uprgading it.

Could you verify that kaleo is installed properly in 6.0 version? You could check ServiceComponent and Release: tables for that. Also, the whole log file could be good for knowing what it's happening.

Regards.
Aleix Casagolda, modificado hace 8 años.

RE: Migration from 6.0 to 6.2 fails while migrating Kaleo-web

New Member Mensajes: 9 Fecha de incorporación: 14/06/13 Mensajes recientes
Hi Alberto,

First of all, thank you very much for the hint!

I've checked that tables but I'm not sure which values should I expect to see there....

In servicecomponent table, regarding Kaleo I see one row with the following information:

servicecomponentid:721008
buildnamespace: Kaleo
buildnumber: 2
builddate: 1279742623917
data: a big xml file with DDL scripts for the tables

In release table, only one row:

releaseid: 1
createddate: 01/04/11 06:01:24,000000000
modifeddate: 25/06/15 20:59:39,638000000
servletcontextname: portal
buildnumber: 6010
builddate: 07/09/10 00:00:00,000000000
verified: 1
teststring: You take t.....

Then, I guess that the most interesting information is from the "servicecomponent" table. Do you know what should I look to know if the kaleo information is correct? And if there is something wrong, how to fix it?

Thanks again!
thumbnail
Alberto Chaparro, modificado hace 8 años.

RE: Migration from 6.0 to 6.2 fails while migrating Kaleo-web

Liferay Master Mensajes: 549 Fecha de incorporación: 25/04/11 Mensajes recientes
Hi Aleix,

The data seems ok. The process should detect an old version of the kaleo tables (buildnumber 2) and regenerate the tables with the old data to not to lose anything.

In order to see what is happening:
- Does the database user have enough permissions over kaleo tables?
- Have you modifiy kaleo plugin setting the property build.auto.upgrade to false? It has to be set to true.
- If everything is ok, please, attach the whole log for the upgrade process.

Best regards.
Aleix Casagolda, modificado hace 8 años.

RE: Migration from 6.0 to 6.2 fails while migrating Kaleo-web

New Member Mensajes: 9 Fecha de incorporación: 14/06/13 Mensajes recientes
Hi Alberto,

Thanks again.

Regarding your questions:

- Does the database user have enough permissions over kaleo tables?

It should. It's the same schema and the same user. As far as I know, there are not differences in the permissions

- Have you modifiy kaleo plugin setting the property build.auto.upgrade to false? It has to be set to true.

No. I've checked it and it is set to true.

- If everything is ok, please, attach the whole log for the upgrade process.

Of course, I've attached the log. I've taken only the (I guess) relevant sections because the full log (with all the errors that it throws, most of them all the same) is more than 3GB!

Thanks again.

Best regards,
Aleix.
Aleix Casagolda, modificado hace 8 años.

RE: Migration from 6.0 to 6.2 fails while migrating Kaleo-web

New Member Mensajes: 9 Fecha de incorporación: 14/06/13 Mensajes recientes
Hi again Alberto,

I think that I found something interesting... The database has been migrated to Oracle 12c, so I was using the latest Oracle driver for 12c (12.1.0.2). As in the logs one of the error messages is "getCLOB is not implemented", I've tried to use the old driver that we were using with Liferay 6.0, Oracle driver (11.1.0.7, for Oracle 11) and in the first test that I've done, the kaleo migration has been successfull! I've to try it in the server where I've found the issue the first time but with the first test, it seems to work.

The strange thing is that I've two dumps of the same Liferay database taken at different points of time. With the first one, the migration was successfull using the correct (12c) driver but with the second one, I got that errors. Then, changing the driver to the old version (11) seems to work. I've compared both databases and the structure is exactly the same (the contents are different, but the tables and attributes are the same) so I don't know why it works in one case and it doesn't work in the other.

Well, anyway, as a temporary workaround seems that using the Oracle version 11 works in both cases... I'll have to ensure that using this version of the driver against Oracle 12c won't give us other problems in the future.

If you know what can be causing this issue please let me know, as I'm very curious.

Thanks and regards,
Aleix.

UPDATE: Confirmed. I've deleted the database and reimported the 6.0 dump again, executed Liferay 6.2 with the old Oracle database driver (11 instead of 12) and the upgrade of all components have been successfull so it seems to be a problem between Liferay 6.2 and the latest Oracle database driver.
thumbnail
Alberto Chaparro, modificado hace 8 años.

RE: Migration from 6.0 to 6.2 fails while migrating Kaleo-web

Liferay Master Mensajes: 549 Fecha de incorporación: 25/04/11 Mensajes recientes
Hi Aleix,

It seems that it could be a bug because you should be able to use the driver 12 since your are using Oracle 12c as database. I will try to verify it these days but, could you open a ticket in JIRA (https://issues.liferay.com/) so that I can analyze it deeply?

Please, once you have opened the issue add the link to this post so I can assign it to myself.

Thanks.
Aleix Casagolda, modificado hace 8 años.

RE: Migration from 6.0 to 6.2 fails while migrating Kaleo-web

New Member Mensajes: 9 Fecha de incorporación: 14/06/13 Mensajes recientes
Hi Alberto,

Ok, I've created the issue: https://issues.liferay.com/browse/LPS-57314

Thanks and best regards,
Aleix.
thumbnail
Alberto Chaparro, modificado hace 8 años.

RE: Migration from 6.0 to 6.2 fails while migrating Kaleo-web

Liferay Master Mensajes: 549 Fecha de incorporación: 25/04/11 Mensajes recientes
Great! I will let you know about the findings regarding this issue.

Thanks!