-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switched from java 11 to 17 and now get `initialize': wrong number of arguments (given 1, expected 0) #1285
Comments
I get this error in ubuntu 22.04, openjdk 17, but not in windows with graalvm 17, if that helps... |
Can you clarify this comment? btw, AsciidoctorJ 3.0.0 uses asciidoctor v2.0.23, at least we know that version is in the classpath |
What I mean is that I get that error under openjdk17 on ubuntu 22.04 with only 2.5.7 on the classpath, or only 3.0.0 on the classpath, but not both at the same time. I can guarantee the classpath because all of our jars are pulled and collected into a lib directory that serves as the classpath for tanukisoft scripts that are hosting the jvm, and all versions are fully sepcified in maven poms, and I have checked both the jars available to my local IDE (intelij), and the jars packed into the tanukisoft distribution, and they are both clean, either 2.5.7 or 3.0.0. Here's the relevant bit from the lib directory... apiguardian-api-1.1.2.jar ..and the only asciidoctor jars are both 3.0.0. I would obviously prefer to resolve this issue with 3.0.0. What I'm really asking is what the mechanism is that would cause that error. My ability to debug easily ends with... org.jruby.RubyClass.new(org/jruby/RubyClass.java:922 ...and the code there is a dynamic reference into some ruby code, I think... I have no clue how to go further. Is there a file in the asciidoctor jars I can double check? A line of code that should have some signature? Or some piece of java being loaded as a service? |
I also checked the maven repository on the tanukisoft-based install where I get the error, and it's empty except for a few of our jars containing classpath available text templates. Nothing else in it, so the only asciidocj code on the machine is the 3.0.0 jars listed above. Just as proof maven isn't downloading other versions somehow and confusing the classpath. |
It would be great if you could provide a reproducer. |
I'd like to hand you a reproducer, but I develop on windows, where I can't get a reproduction. Everything works fine. In ubuntu 24.04 I can reproduce in 2.5.7 0r 3.0.0. If I change the asciidoctorj version in my maven pom to 2.5.2 then the problem goes away in linux as well. With 3.0.0 it pulls jruby 9.4.8.0, which is not surprising as that's the listed dependency. With 2.5.2 it's jruby 9.2.17.0. I'll try to put together a reproducer in linux and see. The document we feed to asciidoctorj is dynamically constructed, so i's a bit difficult, but I'll see what I can do, maybe capture it and create something small and runnable. |
Been a while, sorry. I tried to put together a reproducer and was unsuccessful. The project works in ubuntu, with version 3.0.0, but not in our production setup. Production is run under the Tanukisoft wrapper, so I have to guess it may be the culprit. I'll attempt a reproducer. Even if I can reproduce I know that makes it not so much your problem, but if I can get a reproducer, maybe you could help me understand why it fails. |
I can not get a reproducer that fails. If I reduce the Tanukisoft wrapper, Grizzly http daemon, Jersey endpoint, plus the several aspectj byte code injected joinpoints which make up our production applicaton, the actual AsciiDoctorJ conversion works perfectly. But with all the production paraphernalia in place, I get...
And if I drop a breakpoint in JRubyAsciiDoctor,java:256 and poke around in the exception, I find this backtrace for that error...
Any notions? Some way I can capture any more specifics? This errors does not occur with asciidoctorj version 2.5.2 and does with 3.0.0, |
The import is...
...but I see the same 2.5.7.
The code is...
...and I now get...
The text was updated successfully, but these errors were encountered: