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

Tim Allison commented on TIKA-2778:
-----------------------------------

Minimal triggering code:
{noformat}
    @Test
    public void testBasicAttachmentMap() throws Exception {
        try {
            AttachmentUtil.getCommandMap();
        } catch (Throwable t) {
            t.printStackTrace();
        }
    }
{noformat}

Stacktrace:
{noformat}
INFO  Setting the server's publish address to be http://localhost:9998/
INFO  Logging initialized @5042ms to org.eclipse.jetty.util.log.Slf4jLog
INFO  jetty-9.4.12.v20180830; built: 2018-08-30T13:59:14.071Z; git: 
27208684755d94a92186989f695db2d7b21ebc51; jvm 11+28
INFO  Started ServerConnector@2e029d61{HTTP/1.1,[http/1.1]}{localhost:9998}
INFO  Started @5540ms
WARN  Empty contextPath
INFO  Started o.e.j.s.h.ContextHandler@42b64ab8{/,null,AVAILABLE}
java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
        at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:179)
        at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:85)
        at 
org.apache.cxf.attachment.AttachmentUtil.<clinit>(AttachmentUtil.java:70)
        at 
org.apache.tika.server.TikaResourceTest.testBasicAttachmentMap(TikaResourceTest.java:200)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        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.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        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.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
        at 
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
        at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
        at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.ClassNotFoundException: 
com.sun.activation.registries.LogSupport
        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
        at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 28 more
INFO  Stopped o.e.j.s.h.ContextHandler@42b64ab8{/,null,UNAVAILABLE}
{noformat}

> Upgrade jaxb-runtime and javax.activation
> -----------------------------------------
>
>                 Key: TIKA-2778
>                 URL: https://issues.apache.org/jira/browse/TIKA-2778
>             Project: Tika
>          Issue Type: Task
>          Components: parser
>    Affects Versions: 1.19.1
>            Reporter: Hans Brende
>            Priority: Major
>
> The latest version of org.glassfish.jaxb:jaxb-runtime is 2.3.1, which fixes a 
> few issues on Java 11. A few important notes to take into consideration:
> 1. jaxb-core is no longer a separate artifact, but has been merged into 
> jaxb-runtime.
>  2. jaxb-runtime now pulls in the latest version of the activation API, which 
> is: javax.activation:javax.activation-api:1.2.0. *However*, this artifact 
> does not include a couple of the source files found in 
> javax.activation:activation:1.1.1 (namely, those found in the 
> com.sun.activation.* packages). The activation artifact which includes those 
> extra sources has moved to: com.sun.activation:javax.activation:1.2.0. 
> *However*, if I'm seeing this correctly, the com.sun.activation artifact 
> *duplicates* all the code found in the activation-api artifact, rather than 
> depending on it. If that's the case, and *if* you still need those extra 
> classes in the activation artifact, one might need to manually exclude the 
> activation-api artifact pulled in by jaxb-runtime. But, I'm not 100% certain 
> here.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to