KOST-CECO / KOST-Val

The KOST-Val application is used for validate files and Submission Information Package (SIP).
http://coptr.digipres.org/KOST-Val
Other
24 stars 6 forks source link

Error running on Linux due to file path separator #16

Closed luis100 closed 9 years ago

luis100 commented 9 years ago

When running on Linux an error occurs due to the file path separator:

$ java -jar kostval_en.jar --format ~/old/retrievoTest.siard 
KOST-Val

Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.io.FileNotFoundException: resources\kost-val.xsl (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:146)
    at ch.kostceco.tools.kostval.util.Util.copyFile(Util.java:254)
    at ch.kostceco.tools.kostval.KOSTVal.main(KOSTVal.java:175)
    ... 5 more
Chlara commented 9 years ago

Hi Luis

I wrote KOST-Val for Windows :-( But maybe the SIARD validation works with the v1.5.0_Linux_alpha release (new kostval_en.jar)?! Can you please check that! Thanks

Claire

luis100 commented 9 years ago

@Chlara, I tested the v1.5.0_Linux_alpha release but when executing it gives no output at all, even when I call it without any arguments, where it should be printing the syntax.

Chlara commented 9 years ago

@luis100 can please give me a screenshot / textcopy of the console and from the kostval.conf.xml in configuration?

Chlara commented 9 years ago

@luis100 it gives no output if your command is kostval_en.jar. But if your command begins with java -jar kostval_en.jar it shoud return this (testet on windows):

incomplete KOST-Val command  Building KOST-Val command:
Java -jar kostval.jar-path Val-type file-path [-v]
a-------- b--------------- c------- d-------- e---
a = Java command
b = path and file kostval.jar
c = Type of validation:
    --format (pure format validation) or
    --sip (SIP validation)
d = path and full name of the file or folder being validated
e = verbose option, if the original reports are to be kept

No validation performed.

i notice that i shoud change kostval.jar into kostval_en.jar

luis100 commented 9 years ago

@Chlara, the problem was I was running the jar you provided outside the KOST-Val, which gives no error when running. I moved the new linux jar into the folder of the previous release and ran it again, now the error is as follows:

$ java -jar kostval_en2.jar --format ~/old/retrievoTest.siard 
KOST-Val

The configuration file from the JhoveApp does not exist on the enclosed place. Please check the configuration. 

I guess I am missing Jhove config, but where should it be? Should I install Jhove inside the KOST-Val directory?

luis100 commented 9 years ago

Another follow-up, the problem with the JHove config was due to the configuration in kostval.conf.xml, where the path separator was wrong for Linux, I think the forward slash (/) can be used here to make the paths platform independent.

I fixed that on my configuration/kostval.conf.xml and ran it again, now the validation seems to be running.

I ran the tool against a 22GB zip compressed SIARD file, and the result is:

$ java -jar kostval_en2.jar --format ~/old/retrievoTest_compressed.siard 
KOST-Val

Validation: SIARD
/home/lfaria/old/retrievoTest_compressed.siard
Invalid

Looking at the log file I found the following message:

<Error><Modul>A) readability</Modul><Message>The SIARD file is compressed. -> Validation aborted!</Message></Error>

Which I found odd, is the compression a problem on the validity of the SIARD file?

I had to unzipped the SIARD file into a folder of 85GB and tried again:

$ java -jar kostval_en2.jar --format ~/old/retrievoTest_expanded.siard
KOST-Val

<Info><Message>No validation format could be performed (other formats as TIFF, PDF and SIARD or excluded in the configuration).</Message></Info>

So the program is also not expecting an expanded SIARD file, what is then the format it is expecting?

Chlara commented 9 years ago

Hi Luis

The SIARD specification say on point 4.1 that it must be an uncompressed ZIP-File with the extension .siard ech-0165_4 1

The link to the specification in German and French: http://www.ech.ch/vechweb/page?p=dossier&documentNumber=eCH-0165

The English specification should been published in January 2015.

Note: At the Moment we are writing an Addendum that will allow deflated ZIP compression and splitting.

luis100 commented 9 years ago

OK, I understand. We've tested the SIARD output of our db-preservation-toolkit and besides the compression there are also a couple of issues that we need to solve. Nevertheless, your tool seems to work fine in Linux for checking SIARD files, besides the configuration change described above. Will try to fix the problems as soon as possible and provide you feedback on the db-preservation-toolkit issues, so I'll close this one now. Thanks!

Chlara commented 9 years ago

Thanks Luis

I changed the Note from the v1.5.0_Linux_alpha pre-release.