You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Hendry_Betts <he...@greenskycredit.com> on 2012/09/17 18:06:36 UTC

Backup Strategy

We have the following problem:
1 - we have an existing Jackrabbit 1.4 deploy -- out of the box using derby
2 - there are over 380,000 documents stored in the repository across 20
folders
3-  we need to migrate to the latest jackrabbit using mssql (SQLServer) as
the database backend.

We have attempted the following --
connect via RMI and use the
ExportSystemsView(nodePath,contentHandler,false,true|false) (depending on if
we are looking at an nt:folder or an nt:document). 

The issue we are having -- on the large nodes (>10K) we are hitting an the
following exception:
FATAL 2012-09-14 16:21:05,686 [main]
com.greensky.utils.jackrabbit.JackrabbitUtils - [79]: Error occurred in
server thread; nested exception is: 
	java.lang.OutOfMemoryError: Java heap space
org.apache.jackrabbit.rmi.client.RemoteRepositoryException: Error occurred
in server thread; nested exception is: 
	java.lang.OutOfMemoryError: Java heap space: Error occurred in server
thread; nested exception is: 
	java.lang.OutOfMemoryError: Java heap space
	at
org.apache.jackrabbit.rmi.client.ClientSession.exportSystemView(ClientSession.java:393)
	at
com.greensky.utils.jackrabbit.JackrabbitUtils.backupRepo(JackrabbitUtils.java:224)
	at
com.greensky.utils.jackrabbit.JackrabbitUtils.main(JackrabbitUtils.java:70)
Caused by: java.rmi.ServerError: Error occurred in server thread; nested
exception is: 
	java.lang.OutOfMemoryError: Java heap space
	at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
	at sun.rmi.transport.Transport$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown
Source)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
	at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
	at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
	at
org.apache.jackrabbit.rmi.server.ServerXASession_Stub.exportSystemView(Unknown
Source)
	at
org.apache.jackrabbit.rmi.client.ClientSession.exportSystemView(ClientSession.java:384)
	... 2 more
Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Unknown Source)
	at java.io.ByteArrayOutputStream.write(Unknown Source)
	at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
	at sun.nio.cs.StreamEncoder.implWrite(Unknown Source)
	at sun.nio.cs.StreamEncoder.write(Unknown Source)
	at sun.nio.cs.StreamEncoder.write(Unknown Source)
	at java.io.OutputStreamWriter.write(Unknown Source)
	at
org.apache.jackrabbit.commons.xml.ToXmlContentHandler.write(ToXmlContentHandler.java:147)
	at
org.apache.jackrabbit.commons.xml.ToXmlContentHandler.characters(ToXmlContentHandler.java:239)
	at org.apache.jackrabbit.commons.xml.Exporter.characters(Exporter.java:388)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter$1.write(SystemViewExporter.java:133)
	at org.apache.jackrabbit.util.Base64.encode(Base64.java:210)
	at org.apache.jackrabbit.util.Base64.encode(Base64.java:157)
	at org.apache.jackrabbit.value.ValueHelper.serialize(ValueHelper.java:681)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportValue(SystemViewExporter.java:129)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportProperty(SystemViewExporter.java:92)
	at
org.apache.jackrabbit.commons.xml.Exporter.exportProperty(Exporter.java:363)
	at
org.apache.jackrabbit.commons.xml.Exporter.exportProperties(Exporter.java:268)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportNode(SystemViewExporter.java:77)
	at org.apache.jackrabbit.commons.xml.Exporter.exportNode(Exporter.java:297)
	at
org.apache.jackrabbit.commons.xml.Exporter.exportNodes(Exporter.java:213)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportNode(SystemViewExporter.java:78)
	at org.apache.jackrabbit.commons.xml.Exporter.exportNode(Exporter.java:294)
	at
org.apache.jackrabbit.commons.xml.Exporter.exportNodes(Exporter.java:213)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportNode(SystemViewExporter.java:78)
	at org.apache.jackrabbit.commons.xml.Exporter.exportNode(Exporter.java:294)
	at org.apache.jackrabbit.commons.xml.Exporter.export(Exporter.java:143)
	at
org.apache.jackrabbit.commons.AbstractSession.export(AbstractSession.java:548)
	at
org.apache.jackrabbit.commons.AbstractSession.exportSystemView(AbstractSession.java:257)
	at
org.apache.jackrabbit.commons.AbstractSession.exportSystemView(AbstractSession.java:311)
	at
org.apache.jackrabbit.rmi.server.ServerSession.exportSystemView(ServerSession.java:333)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.rmi.ServerError: Error occurred in server thread; nested exception is: 
	java.lang.OutOfMemoryError: Java heap space
	at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
	at sun.rmi.transport.Transport$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown
Source)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
	at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
	at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
	at
org.apache.jackrabbit.rmi.server.ServerXASession_Stub.exportSystemView(Unknown
Source)
	at
org.apache.jackrabbit.rmi.client.ClientSession.exportSystemView(ClientSession.java:384)
	at
com.greensky.utils.jackrabbit.JackrabbitUtils.backupRepo(JackrabbitUtils.java:224)
	at
com.greensky.utils.jackrabbit.JackrabbitUtils.main(JackrabbitUtils.java:70)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Unknown Source)
	at java.io.ByteArrayOutputStream.write(Unknown Source)
	at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
	at sun.nio.cs.StreamEncoder.implWrite(Unknown Source)
	at sun.nio.cs.StreamEncoder.write(Unknown Source)
	at sun.nio.cs.StreamEncoder.write(Unknown Source)
	at java.io.OutputStreamWriter.write(Unknown Source)
	at
org.apache.jackrabbit.commons.xml.ToXmlContentHandler.write(ToXmlContentHandler.java:147)
	at
org.apache.jackrabbit.commons.xml.ToXmlContentHandler.characters(ToXmlContentHandler.java:239)
	at org.apache.jackrabbit.commons.xml.Exporter.characters(Exporter.java:388)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter$1.write(SystemViewExporter.java:133)
	at org.apache.jackrabbit.util.Base64.encode(Base64.java:210)
	at org.apache.jackrabbit.util.Base64.encode(Base64.java:157)
	at org.apache.jackrabbit.value.ValueHelper.serialize(ValueHelper.java:681)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportValue(SystemViewExporter.java:129)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportProperty(SystemViewExporter.java:92)
	at
org.apache.jackrabbit.commons.xml.Exporter.exportProperty(Exporter.java:363)
	at
org.apache.jackrabbit.commons.xml.Exporter.exportProperties(Exporter.java:268)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportNode(SystemViewExporter.java:77)
	at org.apache.jackrabbit.commons.xml.Exporter.exportNode(Exporter.java:297)
	at
org.apache.jackrabbit.commons.xml.Exporter.exportNodes(Exporter.java:213)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportNode(SystemViewExporter.java:78)
	at org.apache.jackrabbit.commons.xml.Exporter.exportNode(Exporter.java:294)
	at
org.apache.jackrabbit.commons.xml.Exporter.exportNodes(Exporter.java:213)
	at
org.apache.jackrabbit.commons.xml.SystemViewExporter.exportNode(SystemViewExporter.java:78)
	at org.apache.jackrabbit.commons.xml.Exporter.exportNode(Exporter.java:294)
	at org.apache.jackrabbit.commons.xml.Exporter.export(Exporter.java:143)
	at
org.apache.jackrabbit.commons.AbstractSession.export(AbstractSession.java:548)
	at
org.apache.jackrabbit.commons.AbstractSession.exportSystemView(AbstractSession.java:257)
	at
org.apache.jackrabbit.commons.AbstractSession.exportSystemView(AbstractSession.java:311)
	at
org.apache.jackrabbit.rmi.server.ServerSession.exportSystemView(ServerSession.java:333)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Can anyone help us with this problem????



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Backup-Strategy-tp4656544.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Backup Strategy

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Mon, Sep 17, 2012 at 6:06 PM, Hendry_Betts
<he...@greenskycredit.com> wrote:
> We have the following problem:
> 1 - we have an existing Jackrabbit 1.4 deploy -- out of the box using derby
> 2 - there are over 380,000 documents stored in the repository across 20
> folders
> 3-  we need to migrate to the latest jackrabbit using mssql (SQLServer) as
> the database backend.
> [...]
> Can anyone help us with this problem????

Instead of RMI and exportSystemView, I'd recommend you to use the
backup and migration tools built into Jackrabbit 1.6 and higher [1].

[1] http://jackrabbit.apache.org/standalone-server.html#StandaloneServer-Backupandmigration

BR,

Jukka Zitting