Opened 6 weeks ago

Closed 6 weeks ago

#31952 closed defect (duplicate)

javax.xml.bind is not longer part of the JRE

Reported by: irl Owned by: metrics-team
Priority: High Milestone:
Component: Metrics/Onionoo Version:
Severity: Normal Keywords:
Cc: irl, metrics-team Actual Points:
Parent ID: #31659 Points:
Reviewer: Sponsor:

Description

From Java 9, javax.xml.bind is no longer included with the JRE as it is part of the EE API. This means we need to explicitly depend on it and include it in our fat JARs.

https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j

This is required to run on Debian 10.

Child Tickets

Change History (5)

comment:1 Changed 6 weeks ago by irl

Component: Internal Services/Tor Sysadmin TeamMetrics/Onionoo
Owner: changed from tpa to metrics-team

comment:2 Changed 6 weeks ago by irl

Status: newassigned

comment:3 Changed 6 weeks ago by karsten

Which classes does this affect? Can you paste the error message here?

comment:4 Changed 6 weeks ago by irl

2019-10-03 13:32:21,789 INFO o.t.d.DescriptorSourceFactory:150 Serving implementation org.torproject.descriptor.impl.DescriptorReaderImpl for descriptor.reader.
2019-10-03 13:32:21,791 ERROR o.t.d.i.DescriptorReaderImpl:165 Bug: uncaught exception or error while reading descriptors: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.torproject.descriptor.impl.DescriptorParserImpl.parseOneDescriptor(DescriptorParserImpl.java:217)
	at org.torproject.descriptor.impl.DescriptorParserImpl.parseOneOrMoreDescriptors(DescriptorParserImpl.java:194)
	at org.torproject.descriptor.impl.DescriptorParserImpl.detectTypeAndParseDescriptors(DescriptorParserImpl.java:80)
	at org.torproject.descriptor.impl.DescriptorParserImpl.parseDescriptors(DescriptorParserImpl.java:33)
	at org.torproject.descriptor.impl.DescriptorReaderImpl$DescriptorReaderRunnable.readDescriptorFile(DescriptorReaderImpl.java:334)
	at org.torproject.descriptor.impl.DescriptorReaderImpl$DescriptorReaderRunnable.readDescriptorFiles(DescriptorReaderImpl.java:255)
	at org.torproject.descriptor.impl.DescriptorReaderImpl$DescriptorReaderRunnable.run(DescriptorReaderImpl.java:161)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException: null
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.torproject.descriptor.impl.DescriptorParserImpl.parseOneDescriptor(DescriptorParserImpl.java:210)
	... 7 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
	at org.torproject.descriptor.impl.ParseHelper.convertThirtyTwoByteBase64StringToHex(ParseHelper.java:326)
	at org.torproject.descriptor.impl.ParseHelper.verifyThirtyTwoByteBase64String(ParseHelper.java:315)
	at org.torproject.descriptor.impl.ServerDescriptorImpl.parseExtraInfoDigestLine(ServerDescriptorImpl.java:460)
	at org.torproject.descriptor.impl.ServerDescriptorImpl.parseDescriptorBytes(ServerDescriptorImpl.java:133)
	at org.torproject.descriptor.impl.ServerDescriptorImpl.<init>(ServerDescriptorImpl.java:42)
	at org.torproject.descriptor.impl.BridgeServerDescriptorImpl.<init>(BridgeServerDescriptorImpl.java:17)
	... 12 common frames omitted

comment:5 Changed 6 weeks ago by karsten

Resolution: duplicate
Status: assignedclosed

This issue is a duplicate of #25444 and is already fixed in master, but not yet released. I'll create a new ticket for putting out a release.

Note: See TracTickets for help on using tickets.