[MGNLBACKUP-24] changing value in repoConfig.gz results in NullPointerException Created: 10/Aug/09  Updated: 29/Mar/22  Resolved: 04/Apr/13

Status: Closed
Project: Backup
Component/s: None
Affects Version/s: 1.0.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Joachim Meyer Assignee: Jan Haderka
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Mac OS X 10.5,
Java: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304), Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)


Attachments: File repoConfig.gz    
Issue Links:
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Team: Nucleus

 Description   

After changing values in repoConfig.tgz and compressing the folder again with: zip -r repoConfig.gz repoConfig (in OS X Terminal)
the restore process terminates with the following exception:
==============================================
./bin/restore -backup /Volumes/Magnolia/backup-09-08-03_1611 -webapp /usr/local/tomcat/webapps/author/
web.xml found at /usr/local/tomcat/webapps/author/WEB-INF/web.xml
INFO info.magnolia.cms.beans.config.PropertiesInitializer PropertiesInitializer.java(loadPropertiesFile:224) 04.08.2009 15:15:47 Loading configuration at /usr/local/tomcat/webapps/author/WEB-INF/config/default/magnolia.properties
Initializing Log4J
Initializing Log4J from [WEB-INF/config/default/log4j.xml]
INFO info.magnolia.module.backup.BackupManager BackupManager.java(restore:98) 04.08.2009 15:15:50 Restoring info.magnolia.module.backup.NamespaceBackup@6af6c3
INFO info.magnolia.module.backup.LaunchBackup LaunchBackup.java(shutdown:237) 04.08.2009 15:15:50 attempting to shutdown repo.
Exception in thread "main" java.lang.NullPointerException
at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:60)
at info.magnolia.module.backup.ZipHandler.read(ZipHandler.java:164)
at info.magnolia.module.backup.NamespaceBackup.restore(NamespaceBackup.java:119)
at info.magnolia.module.backup.BackupManager.restore(BackupManager.java:99)
at info.magnolia.module.backup.LaunchBackup.restore(LaunchBackup.java:230)
at info.magnolia.module.backup.LaunchBackup.main(LaunchBackup.java:149)
at info.magnolia.module.backup.Restore.doExec(Restore.java:57)
at info.magnolia.tools.AbstractBasicExecutable.exec(AbstractBasicExecutable.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at info.magnolia.tools.AbstractLauncher.launch(AbstractLauncher.java:126)
at info.magnolia.tools.AbstractLauncher.doMain(AbstractLauncher.java:84)
at info.magnolia.module.backup.RestoreLauncher.main(RestoreLauncher.java:51)
===============================

leaving the repoConfig.gz untouched won't raise this Exception.

Restore was performed according to Tip2 of:
http://documentation.magnolia-cms.com/modules/backup.html



 Comments   
Comment by Jan Haderka [ 11/Aug/09 ]

Can you attach your updated repoConfig.gz to find out more?

Comment by Joachim Meyer [ 11/Aug/09 ]

Here the attached repoConfig.
Reason behind editing this zip file was to change the PersistenceManager class to org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager and change the name of database, user and password.

Comment by Jan Haderka [ 04/Apr/13 ]

Sorry for late response.
Looking at the attached file, it contains file called class info.magnolia.module.backup.NamespaceBackup while the code of NamespaceBackup is looking for

            String name = this.getClass().toString();
            byte[] ns = h.read(name);

so it obviously fails to find our right class file. Why is the file renamed when you re-zip repoConfig I can't tell.

Generated at Sun Feb 11 23:24:50 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.