Legacy Knowledge Base
Published Sep. 10, 2025

ORA-01408 exception when upgrading custom Service Builder module

Written By

Alexandra Rujzam

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

Running g! upgrade:check it turns out that a component was not migrated successfully, the output is for example:
There is an upgrade process available for ServiceBuilder.service from 0.0.0 to 1.0.0

Upon executing the upgrade, a similar error appears:

com.liferay.portal.kernel.upgrade.UpgradeException: Bundle ServiceBuilder.service_1.0.0 [93] has invalid content in indexes.sql: 
create index IX_F27B1EFC on marketnotice (isEnglish);
create index IX_441C90FD on marketnotice (marketNoticeId);
create index IX_6415039A on marketnotice (uuid_[$COLUMN_LENGTH:75$]);
at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$ModuleApplicationContextExtension$1.upgrade(ModuleApplicationContextExtender.java:350)
at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfosRunnable.run(ReleaseManagerOSGiCommands.java:539)
... 32 more
Caused by: java.sql.SQLException: ORA-01408: such column list already indexed

Environment

  • Portal 6.2
  • DXP 7.0
  • DXP 7.1
  • DXP 7.2

Resolution

The origin of the problem is the presence of a finder element - in this case - marketNoticeId in service.xml, thus the duplication of the index, which Oracle does not allow (it is supported in MySQL and PostgreSQL).

In the DB we can see that the primary key of the marketnotice table is marketNoticeId. Being the primary key of the marketnotice table, marketNoticeId field already has an index and methods to retrieve elements with that field. Therefore this finder is not necessary in this case.

The resolution would be eliminating the said finder and redeploy the custom module. Or optionally the value of the db-index attribute on the finder element can be set to false.

Did this article resolve your issue ?

Legacy Knowledge Base