Menu

#534 FileTool.generateNewWorkingFile method should be synchronized

areca-7.x
closed
aventin
None
8
2015-08-28
2014-05-12
jmi.tnet
No

Hello,

please make com.myJava.file.FileTool.generateNewWorkingFile method synchronized.
For me it often happens that multiple parallelly started backups take the same file and then i get errors like "cannot delete file, because is in use". (i have like 10 targets to backup configured)
And i believe this is a reason.

I also have "14-05-12 01:12 - ERROR - java.io.EOFException: Unexpected end of ZLIB input stream" errors, and maybe this has the same root.

With my setup when i retry backup 10 times, i have like 2 errors, so i have quite a good chance to test it a little after fix.

best regards
jmi

Discussion

  • aventin

    aventin - 2014-05-15

    Hi

    Thanks for reporting the issue
    It has been fixed (the fix will be available in v 7.4.6)

    Did it solve your issues ?

     
    • jmi.tnet

      jmi.tnet - 2014-05-16

      Hi,
      thx for including fix.
      As fixed version is not available yet, i tried to build it myself. Problem is that when I build a jar using ant and then try to use it, i cannot open workspace anymore - it fails on decryption. When i put original jar back, it was fine. Any idea? (i use 7.4.4 binaries and used 7.4.4 sources to build)
      best regards
      jmi

       
  • aventin

    aventin - 2014-05-18

    Hi

    I just released a new version :)

    Best regards

     
  • jmi.tnet

    jmi.tnet - 2014-05-18

    I cannot start downloaded 7.4.6 as it's available for download in zip files. I tried both x32 and x64 version. I have C:>java -version
    java version "1.7.0_45"
    Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
    Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
    App doens't start at all, i dont see any log file around.

    It helped me to replace new swt.jar with old one (from 7.4.4).
    With this setup it all seems to be fine. I run all my backup targets like 10+ times without any issue reported by areca backup. Thank you.

    btw. i'm still interested why my own build cannot open old workspace. Any idea?

     

    Last edit: jmi.tnet 2014-05-18
  • aventin

    aventin - 2014-05-19

    Hi !

    That's weird : I have almost the same setup and all works fine for me :
    java version "1.7.0"
    Java(TM) SE Runtime Environment (build 1.7.0-b147)
    Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

    Did you try launching it from the shell to check for potential error messages ?

    Regarding your build issue ('it fails on decryption') : could you post the exact log message ?

    thanks !

     
    • jmi.tnet

      jmi.tnet - 2014-05-19

      swt issue: i didnt have time to try anything else. Probably during the weekend i can take a look.

       
  • jmi.tnet

    jmi.tnet - 2014-05-19

    issue with jar i built:

    14-05-19 22:47 - INFO - Reading content of C:/Users/jmi/.areca/workspace
    14-05-19 22:47 - INFO - Reading target configuration file : C:/Users/jmi/.areca/workspace/12522608.bcfg
    14-05-19 22:47 - ERROR
    javax.crypto.BadPaddingException: Given final block not properly padded
    at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
    at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
    at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)
    at javax.crypto.Cipher.doFinal(Cipher.java:2087)
    at com.myJava.util.xml.XMLTool.decrypt(Unknown Source)
    at com.myJava.util.xml.XMLTool.extractPassword(Unknown Source)
    at com.application.areca.adapters.read.TargetXMLReader.readEncryptionPolicy(Unknown Source)
    at com.application.areca.adapters.read.TargetXMLReader.readMedium(Unknown Source)
    at com.application.areca.adapters.read.TargetXMLReader.readTarget(Unknown Source)
    at com.application.areca.adapters.ConfigurationHandler.readTarget(Unknown Source)
    at com.application.areca.adapters.ConfigurationHandler.readObject(Unknown Source)
    at com.application.areca.adapters.ConfigurationHandler.readObject(Unknown Source)
    at com.application.areca.adapters.ConfigurationHandler.readTargetGroup(Unknown Source)
    at com.application.areca.Workspace.loadDirectory(Unknown Source)
    at com.application.areca.Workspace.open(Unknown Source)
    at com.application.areca.launcher.gui.Application.openWorkspaceImpl(Unknown Source)
    at com.application.areca.launcher.gui.Application.openWorkspace(Unknown Source)
    at com.application.areca.launcher.gui.MainWindow$1.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Decorations.setVisible(Unknown Source)
    at org.eclipse.swt.widgets.Shell.setVisible(Unknown Source)
    at org.eclipse.swt.widgets.Shell.open(Unknown Source)
    at org.eclipse.jface.window.Window.open(Window.java:792)
    at com.application.areca.launcher.gui.MainWindow.show(Unknown Source)
    at com.application.areca.launcher.gui.Application.show(Unknown Source)
    at com.application.areca.launcher.gui.Launcher.launchImpl(Unknown Source)
    at com.myJava.system.AbstractLauncher.launch(Unknown Source)
    at com.application.areca.launcher.gui.Launcher.main(Unknown Source)

    14-05-19 22:47 - ERROR - Error detected in C:/Users/jmi/.areca/workspace/12522608.bcfg
    com.myJava.util.xml.AdapterException: java.lang.IllegalArgumentException: Error while decrypting [13423333c4d7a91ccdc308f1af388ff557c2a67acd8d2f2ba4fe5f496fddb1e8]
    at com.application.areca.adapters.ConfigurationHandler.readTarget(Unknown Source)
    at com.application.areca.adapters.ConfigurationHandler.readObject(Unknown Source)
    at com.application.areca.adapters.ConfigurationHandler.readObject(Unknown Source)
    at com.application.areca.adapters.ConfigurationHandler.readTargetGroup(Unknown Source)
    at com.application.areca.Workspace.loadDirectory(Unknown Source)
    at com.application.areca.Workspace.open(Unknown Source)
    at com.application.areca.launcher.gui.Application.openWorkspaceImpl(Unknown Source)
    at com.application.areca.launcher.gui.Application.openWorkspace(Unknown Source)
    at com.application.areca.launcher.gui.MainWindow$1.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Decorations.setVisible(Unknown Source)
    at org.eclipse.swt.widgets.Shell.setVisible(Unknown Source)
    at org.eclipse.swt.widgets.Shell.open(Unknown Source)
    at org.eclipse.jface.window.Window.open(Window.java:792)
    at com.application.areca.launcher.gui.MainWindow.show(Unknown Source)
    at com.application.areca.launcher.gui.Application.show(Unknown Source)
    at com.application.areca.launcher.gui.Launcher.launchImpl(Unknown Source)
    at com.myJava.system.AbstractLauncher.launch(Unknown Source)
    at com.application.areca.launcher.gui.Launcher.main(Unknown Source)
    Caused by: java.lang.IllegalArgumentException: Error while decrypting [13423333c4d7a91ccdc308f1af388ff557c2a67acd8d2f2ba4fe5f496fddb1e8]
    at com.myJava.util.xml.XMLTool.decrypt(Unknown Source)
    at com.myJava.util.xml.XMLTool.extractPassword(Unknown Source)
    at com.application.areca.adapters.read.TargetXMLReader.readEncryptionPolicy(Unknown Source)
    at com.application.areca.adapters.read.TargetXMLReader.readMedium(Unknown Source)
    at com.application.areca.adapters.read.TargetXMLReader.readTarget(Unknown Source)
    ... 22 more
    Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
    at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
    at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
    at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)
    at javax.crypto.Cipher.doFinal(Cipher.java:2087)
    ... 27 more

    • several more log messages like this follows.
      I can start GUI app, but it doesnt restored my workspace. Log file is copied from Log tab of app.

    last message:

    14-05-19 22:47 - INFO - Path : [C:\Users\jmi.areca\workspace] - 0 items loaded.

    when i have more time, i'll try to compare bytecode of both original and my jar.

     

    Last edit: jmi.tnet 2014-05-19
  • aventin

    aventin - 2015-08-28
    • status: open --> closed
     

Log in to post a comment.