Hi, I work in Linux and I did not test the code in Windows. I think the issue is not closing the bundle.
Is this error coming in Linux too? On 23 February 2016 at 21:08, Ian Dunlop <[email protected]> wrote: > Hello, > > I add zip.close() to the validate code and it built ok. Code fragment > below. Shall I commit it to master and then we can start the release > process again? Or am I missing something? > > Cheers, > > Ian > > ZipFile zip; > try (Bundle bundle = Bundles.openBundle(path)) { > > Manifest manifest = bundle.getManifest(); > this.aggr = manifest.getAggregates(); > this.anno = manifest.getAnnotations(); > > zip = new ZipFile(new File(path.toString())); > Enumeration<? extends ZipEntry> ent = > zip.entries(); > while(ent.hasMoreElements()){ > ZipEntry entry = ent.nextElement(); > if(!entry.isDirectory()){ > items.add("/"+entry.getName()); > } > } > zip.close(); > > On 23/02/2016 15:16, Ian Dunlop wrote: > > Hello, > > > > Where do the following imports come from in > > org.apache.taverna.robundle.manifest.combine.CombineManifest.java (and > > others): > > > > import org.apache.taverna.robundle.xml.combine.Content; > > import org.apache.taverna.robundle.xml.combine.ObjectFactory; > > import org.apache.taverna.robundle.xml.combine.OmexManifest; > > > > Eclipse can't find them. Do I need some maven magic? > > > > Cheers, > > > > Ian > > > > On 23/02/2016 14:53, Stian Soiland-Reyes wrote: > >> Menaka, do you have any idea what this bug in the Validator / > >> ValidatorTest could be..? > >> > >> I tried to change the validate() method > >> > https://github.com/apache/incubator-taverna-language/blob/master/taverna-robundle/src/main/java/org/apache/taverna/robundle/validator/RoValidator.java#L85 > >> to a try (..) block for closing the file, which seems to work on my > >> Windows 10 machine, but not on Alan and Ian's machines (You have > >> Windows 8 and 7?) > >> > >> I suspect the Microsoft Defender, because I got it tripping up locking > >> random zip-files in %TEMP% if I did a concurrency build with -T2.0C. > >> > >> On 23 February 2016 at 14:49, Stian Soiland-Reyes <[email protected]> > wrote: > >>> Hm, but that looks like > https://issues.apache.org/jira/browse/TAVERNA-919 > >>> > >>> Somehow bugs don't really go away in Windows.. :-( > >>> > >>> > >>> Did this happen also if you turned off Real-Time Protection? (See > >>> Microsoft Defender or similar) > >>> > >>> > >>> On 23 February 2016 at 10:56, alaninmcr <[email protected]> > wrote: > >>>> Hello > >>>> > >>>> I cannot get the RO bundle API in language to compile. I'm getting > >>>> > >>>> > ------------------------------------------------------------------------------- > >>>> > >>>> Test set: org.apache.taverna.robundle.validator.ValidatorTest > >>>> > >>>> > ------------------------------------------------------------------------------- > >>>> > >>>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.336 > sec > >>>> <<< FAILURE! - in org.apache.taverna.robundle.validator.ValidatorTest > >>>> test(org.apache.taverna.robundle.validator.ValidatorTest) Time > elapsed: > >>>> 0.335 sec <<< ERROR! > >>>> > >>>> java.nio.file.FileSystemException: > >>>> > C:\Users\alanrw\AppData\Local\Temp\test5027612704020713570.bundle.zip: The > >>>> process cannot access the file because it is being used by another > process. > >>>> > >>>> > >>>> at > >>>> > sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86) > >>>> at > >>>> > sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) > >>>> at > >>>> > sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) > >>>> at > >>>> > sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269) > >>>> at > >>>> > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > >>>> at java.nio.file.Files.delete(Files.java:1126) > >>>> at > >>>> > org.apache.taverna.robundle.validator.ValidatorTest.test(ValidatorTest.java:47) > >>>> > >>>> > >>>> Is this the issue you thought was with the real time protection? I > got it > >>>> even with the protection switched off. > >>>> > >>>> Alan > >>>> > >>>> > >>> > >>> > >>> > >>> -- > >>> Stian Soiland-Reyes > >>> Apache Taverna (incubating), Apache Commons RDF (incubating) > >>> http://orcid.org/0000-0001-9842-9718 > >> > >> > >> > > > > -- > Ian Dunlop, eScience Lab > School of Computer Science > The University of Manchester > http://orcid.org/0000-0001-7066-3350 > -- Menaka Madushanka Jayawardena Faculty of Engineering, <http://www.pdn.ac.lk/eng> University of Peradeniyaya. LinkedIn <http://lk.linkedin.com/in/menakajayawardena>
