[
https://issues.apache.org/jira/browse/CXF-7899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16686038#comment-16686038
]
Tim Allison edited comment on CXF-7899 at 11/14/18 2:58 AM:
------------------------------------------------------------
bq. So unless I'm completely crazy, CXF does have an undeclared runtime
dependency on com.sun.activation:javax.activation:1.2.0 that is not limited to
the test scope.
+1 (to has an undeclared runtime...not to you're being crazy :D)
See:
https://issues.apache.org/jira/browse/TIKA-2778?focusedCommentId=16686026&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16686026
Minimal triggering code:
{noformat}
@Test
public void testBasicAttachmentMap() {
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)
{noformat}
was (Author: [email protected]):
bq. So unless I'm completely crazy, CXF does have an undeclared runtime
dependency on com.sun.activation:javax.activation:1.2.0 that is not limited to
the test scope.
+1
See:
https://issues.apache.org/jira/browse/TIKA-2778?focusedCommentId=16686026&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16686026
Minimal triggering code:
{noformat}
@Test
public void testBasicAttachmentMap() {
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)
{noformat}
> Java 11 and javax.activation dependencies
> -----------------------------------------
>
> Key: CXF-7899
> URL: https://issues.apache.org/jira/browse/CXF-7899
> Project: CXF
> Issue Type: Task
> Reporter: Tim Allison
> Assignee: Freeman Fang
> Priority: Major
>
> Again, many apologies if this is a duplicate. Over on TIKA-2778, we're
> trying to add only the minimal dependencies that will allow us to compile and
> run with Java 11.
> We tried adding
> {noformat}
> <!-- for java 10 -->
> <dependency>
> <groupId>org.glassfish.jaxb</groupId>
> <artifactId>jaxb-runtime</artifactId>
> <version>2.3.1</version>
> </dependency>
> {noformat}
> However, as [~HansBrende] pointed out, this includes some of the
> javax.activation classes, but not those in com.sun.activation.*
> Any chance you'd be willing to migrate away from classes in this namespace?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)