Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Archi Madhu
Document library conversion from jackrabbit to file system fails.
September 12, 2011 7:42 AM
Answer

Archi Madhu

Rank: Regular Member

Posts: 239

Join Date: March 24, 2008

Recent Posts

Hello,

We are using LR6 SP1 with DB2 v9.5.
We want to convert documents stored in jackrabbit to file system. Jackrabbit folder size is around 69GB.

We tried this from control panel > data migration.
After few hours, it complained about loading persisted repository state .

 1com.liferay.portal.kernel.exception.SystemException: javax.jcr.RepositoryException: failed to load persisted repository state
 2                at com.liferay.documentlibrary.util.JCRHook.getFileAsStream(JCRHook.java:471)
 3                at com.liferay.portal.convert.ConvertDocumentLibrary.migrateFile(ConvertDocumentLibrary.java:170)
 4                at com.liferay.portal.convert.ConvertDocumentLibrary.migrateDLFileEntry(ConvertDocumentLibrary.java:158)
 5                at com.liferay.portal.convert.ConvertDocumentLibrary.migrateDL(ConvertDocumentLibrary.java:125)
 6                at com.liferay.portal.convert.ConvertDocumentLibrary.migratePortlets(ConvertDocumentLibrary.java:242)
 7                at com.liferay.portal.convert.ConvertDocumentLibrary.doConvert(ConvertDocumentLibrary.java:93)
 8                at com.liferay.portal.convert.ConvertProcess.convert(ConvertProcess.java:44)
 9                at com.liferay.portal.convert.messaging.ConvertProcessMessageListener.doReceive(ConvertProcessMessageListener.java:47)
10                at com.liferay.portal.convert.messaging.ConvertProcessMessageListener.receive(ConvertProcessMessageListener.java:32)
11                at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63)
12                at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:59)
13                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
14                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
15                at java.lang.Thread.run(Thread.java:619)
16Caused by: javax.jcr.RepositoryException: failed to load persisted repository state
17                at org.apache.jackrabbit.core.RepositoryImpl.loadRootNodeId(RepositoryImpl.java:588)
18                at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:325)
19                at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:673)
20                at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:231)
21                at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:279)
22                at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:375)
23                at com.liferay.portal.jcr.jackrabbit.JCRFactoryImpl.createSession(JCRFactoryImpl.java:67)
24                at com.liferay.portal.jcr.JCRFactoryUtil.createSession(JCRFactoryUtil.java:43)
25                at com.liferay.portal.jcr.JCRFactoryUtil.createSession(JCRFactoryUtil.java:47)
26                at com.liferay.documentlibrary.util.JCRHook.getFileAsStream(JCRHook.java:457)
27                ... 13 more
28Caused by: java.io.FileNotFoundException: /home/lroehrs/Production11.2Dump/dlrepository/data/jackrabbit/home/repository/meta/rootUUID (Too many open files)
29                at java.io.FileInputStream.open(Native Method)
30                at java.io.FileInputStream.<init>(FileInputStream.java:106)
31                at org.apache.jackrabbit.util.LazyFileInputStream.open(LazyFileInputStream.java:91)
32                at org.apache.jackrabbit.util.LazyFileInputStream.read(LazyFileInputStream.java:180)
33                at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
34                at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
35                at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
36                at java.io.InputStreamReader.read(InputStreamReader.java:167)
37                at java.io.Reader.read(Reader.java:123)
38                at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1128)
39                at org.apache.commons.io.IOUtils.copy(IOUtils.java:1104)
40                at org.apache.commons.io.IOUtils.copy(IOUtils.java:1050)
41                at org.apache.commons.io.IOUtils.toCharArray(IOUtils.java:297)
42                at org.apache.jackrabbit.core.RepositoryImpl.loadRootNodeId(RepositoryImpl.java:580)
43                ... 22 more

and after that we got java heap space error:
1
2Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#4" java.lang.OutOfMemoryError: Java heap space
3Exception in thread "liferay/convert_process" java.lang.OutOfMemoryError: Java heap space


We can try again by increasing java heap size.

Before that,I have few question to ensure that conversion happens successfully.

1) As during conversion we cannot access portal, what can be downtime to convert files from jackrabbit folder(size: 69Gemoticon to file system?
2) Has anyone done this type of conversion before? what were the challenges they faced and how did they resolve it?
3) Is there any way we can do it in parts?


Your inputs/help would be very helpful.

Thanks,
Christopher Lui
RE: Document library conversion from jackrabbit to file system fails.
September 16, 2011 11:02 AM
Answer

Christopher Lui

LIFERAY STAFF

Rank: Junior Member

Posts: 38

Join Date: March 22, 2010

Recent Posts

Hi Archi,

1) As during conversion we cannot access portal, what can be downtime to convert files from jackrabbit folder(size: 69Gemoticon to file system?
It's hard to give an estimate, since it depends on your hardware specs and environment setup. Sorry

2) Has anyone done this type of conversion before? what were the challenges they faced and how did they resolve it?
I've performed this a few times, converting JCR hook to AdvancedFileSystemHook.
I did not receive any errors during my tests. As long as your JCR is setup correctly, and your Liferay has read/write access to the /data folder, then all should be ok.

3) Is there any way we can do it in parts?
Unfortunately, no. It must be done all at once.
Navin Singh
RE: Document library conversion from jackrabbit to file system fails.
August 15, 2012 8:02 AM
Answer

Navin Singh

Rank: New Member

Posts: 8

Join Date: November 14, 2011

Recent Posts

This is what I receive when migrating images from database to file system on LifeRay 6.0 EE SP2:
---------------------------------------------------------------------------------------------------------------------------------------------------

Exception in thread "liferay/convert_process-3" java.lang.OutOfMemoryError: Java heap space
at java.lang.StringCoding$StringDecoder.decode(StringCoding.java:133)
at java.lang.StringCoding.decode(StringCoding.java:173)
at java.lang.String.<init>(String.java:443)
at java.lang.String.<init>(String.java:515)
at com.mysql.jdbc.ResultSet.getStringInternal(ResultSet.java:5674)
at com.mysql.jdbc.ResultSet.getString(ResultSet.java:5544)
at com.mysql.jdbc.ResultSet.getString(ResultSet.java:5584)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.getString(NewProxyResultSet.java:3342)
at org.hibernate.type.descriptor.sql.VarcharTypeDescriptor$2.doExtract(VarcharTypeDescriptor.java:61)
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:249)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:229)
at com.liferay.portal.dao.orm.hibernate.StringType.nullSafeGet(StringType.java:89)
at org.hibernate.type.CompositeCustomType.nullSafeGet(CompositeCustomType.java:213)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:104)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2283)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1527)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1455)
at org.hibernate.loader.Loader.getRow(Loader.java:1355)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:611)
at org.hibernate.loader.Loader.doQuery(Loader.java:829)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2533)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:940)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:77)
at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:67)

Any help will be really appreciated.
Romain Dequidt
RE: Document library conversion from jackrabbit to file system fails.
June 5, 2014 9:27 AM
Answer

Romain Dequidt

Rank: New Member

Posts: 10

Join Date: March 9, 2013

Recent Posts

Did anyone succeed in solving that problem?