Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Hubert Felber
error importing a LAR file
22 de Março de 2011 08:46
Resposta

Hubert Felber

Ranking: Regular Member

Mensagens: 157

Data de entrada: 23 de Novembro de 2009

Mensagens recentes

Hi,

I am using Liferay 6.06/JBoss

I cannot import a LAR file exported from another Liferay portal (6.06), neither can other developers do this.
The LAR file can be imported on the machine that exported it, but not on other machines.
It seams that a unique index IX_88DF994A is violated.
The LAR is exported using the standard settings.

What is going wrong? Could anybody please help, give a hint?
Thank you
Hubert


 1
 216:27:49,713 ERROR [JDBCExceptionReporter] Fehler bei nicht atomarer Batch-Operation. Der Batch wurde ³bergeben. Bei einem Batch-Member ist jedoch mindestens eine Ausnahme eingetreten. Mit getNextExce
 3ption() k÷nnen Sie die Ausnahmen f³r bestimmte Batch-Elemente abrufen.
 416:27:49,722 ERROR [JDBCExceptionReporter] Fehler f³r das Batch-Element0: Die Anweisung wurde abgebrochen, weil sie in einer f³r 'JOURNALARTICLERESOURCE' definierten Vorgabe f³r einen eindeutigen oder
 5 Primõrschl³ssel bzw. f³r einen von 'IX_88DF994A' bezeichneten eindeutigen Index zu einem duplizierten Schl³sselwert gef³hrt hõtte.
 616:27:49,732 ERROR [SearchPermissionCheckerImpl] com.liferay.portal.kernel.search.SearchException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException:
 7org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
 8com.liferay.portal.kernel.search.SearchException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: Cou
 9ld not execute JDBC batch update
10        at com.liferay.portal.kernel.search.BaseIndexer.reindex(BaseIndexer.java:98)
11        at com.liferay.portal.search.SearchPermissionCheckerImpl.doUpdatePermissionFields_6(SearchPermissionCheckerImpl.java:488)
12        at com.liferay.portal.search.SearchPermissionCheckerImpl.updatePermissionFields(SearchPermissionCheckerImpl.java:135)
13        at com.liferay.portal.kernel.search.SearchEngineUtil.updatePermissionFields(SearchEngineUtil.java:238)
14        at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.doUpdateResourcePermission(ResourcePermissionLocalServiceImpl.java:404)
Hitoshi Ozawa
RE: error importing a LAR file
22 de Março de 2011 16:51
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

The LAR is exported using the standard settings.


Had the same problem. The fault was with the default settings.
I think this is what I did.
During import:
Data Strategy: Copy as New
User ID Strategy: Always us my user ID

During Export, I may have unchecked "Setup" and "Images". Try unchecking some others as well.
Hubert Felber
RE: error importing a LAR file
23 de Março de 2011 01:14
Resposta

Hubert Felber

Ranking: Regular Member

Mensagens: 157

Data de entrada: 23 de Novembro de 2009

Mensagens recentes

Hey Hitoshi,

Thank you. I will try it and feedback here.

Hubert
Karolin Anna Heiss
RE: error importing a LAR file
31 de Março de 2011 03:58
Resposta

Karolin Anna Heiss

Ranking: Junior Member

Mensagens: 53

Data de entrada: 17 de Dezembro de 2009

Mensagens recentes

Thank you Hitoshi for the hint.
Data Strategy "Copy as New" solved the import problem for me :-)

Cheers Karolin
Hitoshi Ozawa
Resolved: error importing a LAR file
31 de Março de 2011 05:04
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Glad that you got it working.emoticon
unai alba
RE: Resolved: error importing a LAR file
18 de Abril de 2011 03:20
Resposta

unai alba

Ranking: New Member

Mensagens: 15

Data de entrada: 7 de Junho de 2010

Mensagens recentes

Hi,

I've faced with the same problem but in other scenario. My problem was with the LAR for the new users, so I couldn't decide the strategy (atleast I didn't find how to do it in portal properties), so to "solve" the problem I have done the following, change the index from unique to index:

ALTER TABLE `lportal6GA4`.`journalarticleresource` DROP INDEX `IX_88DF994A`,
ADD INDEX `IX_88DF994A` USING BTREE(`groupId`, `articleId`);


It'd be worse in terms of performance, but is the only solution in this scenario.

I hope it helps to someone,

regards,

Unai
pammu naik
RE: error importing a LAR file
3 de Maio de 2011 23:16
Resposta

pammu naik

Ranking: New Member

Mensagens: 10

Data de entrada: 3 de Maio de 2011

Mensagens recentes

Data Strategy "Copy as New" solved the import problem. Thnak u very much
Rajesh Nathi
RE: Resolved: error importing a LAR file
9 de Junho de 2011 08:22
Resposta

Rajesh Nathi

Ranking: Junior Member

Mensagens: 71

Data de entrada: 8 de Março de 2011

Mensagens recentes

Hi Hitoshi,

Is there any other solution to avoid this duplicate index exception, other than - deleting , recreating that index or copying LAR as new ?

Regards
-Rajesh
kaushal verkey
RE: error importing a LAR file
14 de Julho de 2011 02:43
Resposta

kaushal verkey

Ranking: New Member

Mensagens: 1

Data de entrada: 14 de Julho de 2011

Mensagens recentes

pammu naik:
Data Strategy "Copy as New" solved the import problem. Thnak u very much


HI,

I have used "Copy as New" data Strategy but still not able to import the lar file.
Do you let me know what options you have selected while exporting and them selected options while importing the lar file

Thanks in adavance
Kaushal
Jean-Carl AMSLER
RE: Resolved: error importing a LAR file
30 de Agosto de 2011 08:11
Resposta

Jean-Carl AMSLER

Ranking: New Member

Mensagens: 5

Data de entrada: 14 de Março de 2011

Mensagens recentes

unai alba:
Hi,

I've faced with the same problem but in other scenario. My problem was with the LAR for the new users, so I couldn't decide the strategy (atleast I didn't find how to do it in portal properties), so to "solve" the problem I have done the following, change the index from unique to index:

ALTER TABLE `lportal6GA4`.`journalarticleresource` DROP INDEX `IX_88DF994A`,
ADD INDEX `IX_88DF994A` USING BTREE(`groupId`, `articleId`);


It'd be worse in terms of performance, but is the only solution in this scenario.

I hope it helps to someone,

regards,

Unai


Hi Unai,

I followed your post, and didn't have any error : LAR has been imported correctly (no error apparently). However, the information was not good in the table journalarticleresource, with the field articleId containing an empty value ("") that generated broken links in my website.

So i continued to investigate in the liferay forum and issue, and found the fix for the 6.0.6 CE here : http://issues.liferay.com/browse/LPS-17334 (thanks to Artur Linhart (BC))
I created a copy of the jar \webapps\ROOT\WEB-INF\lib\portal-impl.jar, opening the jar with winrar and have replaced the good Java Class "com\liferay\portlet\journal\lar\JournalPortletDataHandlerImpl.class" and have replaced the "patched" jar under the repository \webapps\ROOT\WEB-INF\lib.
I restored the index `IX_88DF994A` as UNIQUE, then I restarted my server, tried the same LAR importation and all was fine (DB and website)!!

Have fun !

JC
Dana Oredson
RE: error importing a LAR file
7 de Outubro de 2011 14:07
Resposta

Dana Oredson

Ranking: Junior Member

Mensagens: 70

Data de entrada: 14 de Outubro de 2008

Mensagens recentes

Similar issue, which appears to be related to the BatchSession being used.

This thing is configured by default with 20 as the JDBC batch size:
#
# Set the JDBC batch size to improve performance.
#
# If you're using Hypersonic, you SHOULD set the batch size to 0 as a
# workaround for a logging bug in the Hypersonic driver. See LPS-5426 for
# more information.
#
# If you're using Oracle 9i, you MUST set the batch size to 0 as a
# workaround for a hanging bug in the Oracle driver. See LEP-1234 for more
# information.
#
hibernate.jdbc.batch_size=20
#hibernate.jdbc.batch_size=0

However, I have seen it sometimes fail and I believe this is due to something being in the batch and not yet in the database, but the LAR import is validating that it is in the database. Such as when inserting a new Article, then later trying to fetch the latest copy of the article and throwing an NoSuchArticleException.

I'm attempting to set batch size to 0. When I debug through BatchSessionImpl, it acts like the property is still set to 20, so still trying to figure out why.
Orin Fink
RE: error importing a LAR file
21 de Dezembro de 2011 21:31
Resposta

Orin Fink

Ranking: Junior Member

Mensagens: 43

Data de entrada: 24 de Março de 2010

Mensagens recentes

For the folks just defaulting to "Copy as New"... I think there will be trouble if you need to upload then a second LAR as you may end up with mulitple copies of your web content... this was a real pain for me when I realized what had happened.

However, when I modified the hibernate.jdbc.batch_size property in the portal-ext.properties file to be 0, my import did work and no duplicate content. I should also note that my experience was with Postgres 9 so that platform maybe aught to be added to the list of ones to look out for.