#2246 closed defect (not our bug)

Jetty NoSuchMethodError Java 8

Reported by: zzz Owned by:
Priority: minor Milestone: n/a
Component: apps/jetty Version: 0.9.34
Keywords: Cc:
Parent Tickets:

Description

not our bug, putting here for reference, see comment 1 for details

Subtickets

Change History (1)

comment:1 Changed 12 months ago by zzz

  • Resolution set to not our bug
  • Status changed from new to closed

Appears to be Jetty distro package compiled for Java 9/10 without bootclasspath and/or target version, and running on Java 8. JDK 10 changes to remove bootclasspath option may have made it harder.

<subatomic> I have installed i2p from repository and it seem to be compiled with JDK9 with incompatilibity with JDK8.
<subatomic> As soon as I try accressing web ui i get flood of this:
<subatomic> WARN  [ole Jetty-76] rg.eclipse.jetty.server.Server: : java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
<subatomic> this is probably adressed here: https://github.com/apache/felix/pull/114
<subatomic> zzz: please take a look
<zzz> subatomic, what repo?
<subatomic> deb https://deb.i2p2.de/ stretch main
<subatomic> and I am using oracle 8u171
<zzz> you didn't get Jetty from us then
<subatomic> a missing dependency then?
<subatomic> or is it because I have 'testing' repos enabled?
<zzz> sounds like a bug in the jetty in stretch maybe?
<zzz> do you have a full stack trace or just that one line?
<subatomic> I have libjetty9-java installed from testing
<zzz> do you have a full stack trace or just that one line?
<subatomic> zzz: that line appears in /var/log/i2p/log-router-1.txt and then there are ^^^ 1,031 similar messages omitted ^^^ every second
<zzz> ok but no stack trace
<subatomic> i do not have full stack trace
<subatomic> i do not know how to make it to be honest
<zzz> here's how:
<zzz> over on /configlogging in the console, down at the bottom, new override
<zzz> dropdown
<subatomic> web ui does not open for me
<zzz> oh gaah
<zzz> go to ~/.i2p
<zzz> you can do this while it's running
<zzz> edit logger.config
<zzz> add the line
<zzz> logger.record.net.org.eclipse.jetty.server.Server=WARN
<zzz> save, wait a few minutes for the router to recognize the config file changed
<zzz> whups sorry
<zzz> logger.record.org.eclipse.jetty.server.Server=WARN
<subatomic> when installed from repository it isntalls as a service is it's configs are some place else. I do not have ~/.i2p
<zzz> oh, running as service
<zzz> as root, edit it, it's in /var/lib/i2p/i2p-config/logger.config
<subatomic> there is just wrapper.config in /etc/i2p/
<subatomic> will not that. one moment.
<subatomic> will *do* that
<subatomic> okay. it flooded logs with same message. there are about 10 lines repeating
<subatomic> [ Jetty-23825] rg.eclipse.jetty.server.Server: Unexpected thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@1c30e9a in RouterConsole Jetty{STARTED,5<=28<=28,i=19,q=0}
<subatomic> [ Jetty-23826] rg.eclipse.jetty.server.Server:
<subatomic> java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
<subatomic> at org.eclipse.jetty.util.BufferUtil.allocate(BufferUtil.java:109)
<subatomic> at org.eclipse.jetty.io.ArrayByteBufferPool.acquire(ArrayByteBufferPool.java:69)
<subatomic> at org.eclipse.jetty.server.HttpConnection.getRequestBuffer(HttpConnection.java:192)
<subatomic> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:237)
<subatomic> at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
<subatomic> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
<subatomic> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
<subatomic> at java.lang.Thread.run(Thread.java:748)
<zzz> excellent!
<subatomic> and the same thing repeats again
<zzz> it does look like a problem with the way jetty was packaged.
<zzz> I think you're right that it's the same thing as the apache link
<subatomic> I understand that I have a mismatch. jetty9 from tesing but java8 from oracle
<zzz> yeah. the problem is that in testing, it's jetty 9 minimum, or maybe even 10. Still, they should set the target version when building it
<zzz> if you switch to java 9 the problem should go away
<zzz> as you can see, there's no i2p classes in the stack trace at all. 
<subatomic> unfortunantly there is no repository with oracle java 9 afaik
<zzz> doesn't stretch have jetty 9?
<subatomic> it does
<zzz> or you can always just use our standard installer and skip the packages completely
* subatomic sigh
<zzz> does the stretch jetty 9 work? why did you get the one from testing?
<zzz> I know. I hate packaging issues too.
<subatomic> the package is called like that, jetty9 and it was installed as a dep. i believe
<subatomic> there is no jetty8 in sight
<zzz> yes, our package depends on jetty 9. Jetty 8 died long ago
<subatomic> yeah, present in wheezy and jessie only
<zzz> thanks for bringing this up, I'll copy this discussion somewhere in case somebody else has the same issue. Unfortunately I don't think I can do anything to fix it for you
<subatomic> glad to be helpful. I'll try manual install.


Note: See TracTickets for help on using tickets.