[ 
https://issues.apache.org/jira/browse/TIKA-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14293944#comment-14293944
 ] 

Luke sh commented on TIKA-1521:
-------------------------------

Hi @Nick Burch,

I just came across this problem, i had a quick a look at it, I also run a quick 
test with the artifacts attached in the ticket, i think i was able to replicate 
the problem (i.e. 
https://builds.apache.org/job/tika-trunk-jdk1.6/425/org.apache.tika$tika-parsers/testReport/junit/org.apache.tika.parser.pkg/Seven7ParserTest/testPasswordProtected/
 ), but i don't see this have anything to do with JDK version or platform 
version, the following is what i got.

I think this might have something to do with the 
org.commons.compress.archivers.sevenZ.SevenZFile, or probably the way 
"commons.compress" is invoked. My platform is windows 8.1, the test is failing 
with both jdk 1.6 and jdk 1.8 


java.lang.AssertionError: text.txt not found in:

        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at org.apache.tika.TikaTest.assertContains(TikaTest.java:85)
        at 
org.apache.tika.parser.pkg.Seven7ParserTest.testPasswordProtected(Seven7ParserTest.java:195)
        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:597)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



> Handle password protected 7zip files
> ------------------------------------
>
>                 Key: TIKA-1521
>                 URL: https://issues.apache.org/jira/browse/TIKA-1521
>             Project: Tika
>          Issue Type: Improvement
>          Components: parser
>    Affects Versions: 1.7
>            Reporter: Nick Burch
>             Fix For: 1.8
>
>
> While working on TIKA-1028, I notice that while Commons Compress doesn't 
> currently handle decrypting password protected zip files, it does handle 
> password protected 7zip files
> We should therefore add logic into the package parser to spot password 
> protected 7zip files, and fetch the password for them from a PasswordProvider 
> if given



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to