6 Replies Latest reply: Jun 20, 2012 8:51 AM by Tomohisa igarashi RSS

embedded: extracting RAR twice causes failure on Windows

Tomohisa igarashi Expert

Hi,

 

I'm trying to get IronJacamar embedded(1.0.9.Final) worked on Windows, and experiencing RAR deployment failure, though it doesn't happen on fedora.

 

On Windows, extracting RAR into ironjacamar.home\tmp fails at RAActivator.deploy(). I've noticed that the RADeployer already have done same thing at RADeployer.deploy() before RAActivator do, so RADeployer may be keeping file lock.

 

I need to use this version same as AS7. Could anyone let me know any workaround, please?

 

Thanks,

Tomo

  • 1. Re: embedded: extracting RAR twice causes failure on Windows
    Jesper Pedersen Master

    RADeployer and RAActivator isn't part of AS7 - only IronJacamar/Standalone and IronJacamar/Embedded - so use 1.0.11.Final or 1.1.0.Beta1.

     

    Also I would need the output from "openfiles" or a dump of the open file handles. Make sure that you are on the latest version of JDK too.

  • 2. Re: embedded: extracting RAR twice causes failure on Windows
    Tomohisa igarashi Expert

    JDK version is Oracle 1.6.0_31.

     

    There was no file lock right before calling File.delete() on RAActivator->FileUtil which fails, so RADeployer was not guilty..

     

    However I got some more info from ProcessMonitor. I guess the File.delete() failure corresponds to the 2nd line from the bottom. I'm not sure what does "SHARING_VIOLATION" mean in this case though...

    Time of Day Process Name PID Operation Path Result Detail
    9:44:39.6119033 java.exe 3164 ReadFile C:\Documents and Settings\tomo\.m2\repository\org\hornetq\hornetq-ra\2.2.11.Final\hornetq-ra-2.2.11.Final.jar SUCCESS Offset: 94,805, Length: 4,442
    9:44:39.6149400 java.exe 3164 QueryOpen C:\cygwin\tmp\hornetq-ra.rar SUCCESS CreationTime: 2012/06/18 0:38:55, LastAccessTime: 2012/06/18 9:43:15, LastWriteTime: 2012/06/18 9:43:14, ChangeTime: 2012/06/18 9:43:14, AllocationSize: 1,425,408, EndOfFile: 1,425,341, FileAttributes: A
    9:44:39.6152856 java.exe 3164 QueryOpen C:\cygwin\tmp\hornetq-ra.rar SUCCESS CreationTime: 2012/06/18 0:38:55, LastAccessTime: 2012/06/18 9:43:15, LastWriteTime: 2012/06/18 9:43:14, ChangeTime: 2012/06/18 9:43:14, AllocationSize: 1,425,408, EndOfFile: 1,425,341, FileAttributes: A
    9:44:39.6156834 java.exe 3164 QueryOpen C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar SUCCESS CreationTime: 2012/06/18 9:43:14, LastAccessTime: 2012/06/18 9:43:16, LastWriteTime: 2012/06/18 9:43:14, ChangeTime: 2012/06/18 9:43:14, AllocationSize: 0, EndOfFile: 0, FileAttributes: D
    9:44:39.6161533 java.exe 3164 QueryOpen C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar SUCCESS CreationTime: 2012/06/18 9:43:14, LastAccessTime: 2012/06/18 9:43:16, LastWriteTime: 2012/06/18 9:43:14, ChangeTime: 2012/06/18 9:43:14, AllocationSize: 0, EndOfFile: 0, FileAttributes: D
    9:44:39.6165502 java.exe 3164 QueryOpen C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar SUCCESS CreationTime: 2012/06/18 9:43:14, LastAccessTime: 2012/06/18 9:43:16, LastWriteTime: 2012/06/18 9:43:14, ChangeTime: 2012/06/18 9:43:14, AllocationSize: 0, EndOfFile: 0, FileAttributes: D
    9:44:39.6168615 java.exe 3164 CreateFile C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar SUCCESS Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Open For Backup, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
    9:44:39.6170347 java.exe 3164 QueryDirectory C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar\* SUCCESS Filter: *, 1: .
    9:44:39.6171330 java.exe 3164 QueryDirectory C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar SUCCESS 0: .., 1: hornetq-core-client-2.2.11.Final.jar, 2: hornetq-jms-client-2.2.11.Final.jar, 3: hornetq-ra-2.2.11.Final.jar, 4: META-INF, 5: netty-3.2.1.Final.jar
    9:44:39.6172048 java.exe 3164 QueryDirectory C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar NO MORE FILES
    9:44:39.6173160 java.exe 3164 CloseFile C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar SUCCESS
    9:44:39.6177778 java.exe 3164 QueryOpen C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar\hornetq-core-client-2.2.11.Final.jar SUCCESS CreationTime: 2012/06/18 9:43:14, LastAccessTime: 2012/06/18 9:43:14, LastWriteTime: 2012/06/18 9:43:14, ChangeTime: 2012/06/18 9:43:14, AllocationSize: 598,016, EndOfFile: 596,919, FileAttributes: A
    9:44:39.6181356 java.exe 3164 CreateFile C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar\hornetq-core-client-2.2.11.Final.jar SUCCESS Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open For Backup, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    9:44:39.6186106 java.exe 3164 SetBasicInformationFile C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar\hornetq-core-client-2.2.11.Final.jar SUCCESS CreationTime: 0, LastAccessTime: 0, LastWriteTime: 0, ChangeTime: 0, FileAttributes: N
    9:44:39.6187276 java.exe 3164 ReadFile C: SUCCESS Offset: 38,133,760, Length: 136, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O
    9:44:39.6191891 java.exe 3164 CloseFile C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar\hornetq-core-client-2.2.11.Final.jar SUCCESS
    9:44:39.6196710 java.exe 3164 QueryOpen C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar\hornetq-core-client-2.2.11.Final.jar SUCCESS CreationTime: 2012/06/18 9:43:14, LastAccessTime: 2012/06/18 9:43:14, LastWriteTime: 2012/06/18 9:43:14, ChangeTime: 2012/06/18 9:43:16, AllocationSize: 598,016, EndOfFile: 596,919, FileAttributes: N
    9:44:39.6199783 java.exe 3164 CreateFile C:\cygwin\tmp\iron.jacamar\tmp\hornetq-ra.rar\hornetq-core-client-2.2.11.Final.jar SHARING VIOLATION Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open For Backup, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    9:44:39.6305294 java.exe 3164 QueryOpen E:\workspace\JBoss\soa\switchyard\components\jca\target\surefire-reports SUCCESS CreationTime: 2012/06/18 9:37:42, LastAccessTime: 2012/06/18 9:43:10, LastWriteTime: 2012/06/18 9:43:10, ChangeTime: 2012/06/18 9:43:10, AllocationSize: 0, EndOfFile: 0, FileAttributes: D

     

    Could you get anything from this?

     

    Thanks,

    Tomo

  • 3. Re: embedded: extracting RAR twice causes failure on Windows
    Jesper Pedersen Master

    It means something else is accessing the file. IJ/Embedded deletes an existing directory, and then extracts the files into it - single thread / blocking call.

     

    Try to set "java.io.tmpdir" to something else. Also JDK7 has a new implementation of the .io. classes, so try and see if the problem is there too...

  • 4. Re: embedded: extracting RAR twice causes failure on Windows
    Tomohisa igarashi Expert

    I have noticed this seems to be a workaround for it. I needed to undeploy -ra.xml manually to create Embedded instance again without JVM shutdown though.

     

    RAActivator activator = _embedded.lookup("RAActivator", RAActivator.class);
    activator.setEnabled(false);
    _embedded.deploy(raa);
    _embedded.deploy(raxmlUrl);
    activator.setEnabled(true);
    
  • 5. Re: embedded: extracting RAR twice causes failure on Windows
    Jesper Pedersen Master

    If the RAActivator is enabled it'll pick up .rar deployments, and apply a default activation policy to them. So if you want to deploy a -ra.xml file with the activation you will have to do the above.

     

    In IronJacamar 1.1.0.Beta1+ you can do

     

    @org.jboss.jca.embedded.arquillian.Configuration(autoActivate = false)
    

     

    in your Arquillian based test cases.

  • 6. Re: embedded: extracting RAR twice causes failure on Windows
    Tomohisa igarashi Expert

    Yep, and RAActivator doesn't cause "SHARING_VIOLATION" when it is disabled, so disabling RAActivator and use own -ra.xml avoids the issue