Huge WSDL produce a jdk.internal.org.objectweb.asm.MethodTooLargeException

There is a wsdl that is huge. https://raw.githubusercontent.com/attester/virtualbox-soap/master/sdk-files/vboxweb.wsdl The wsdl has a portType (vboxPortType) having about 10.000 lines of code. The wsdl generate a java-interface (org.virtualbox.service.VboxPortType) having 35k lines / 1800 methods. This is the stacktrace:
Exception in thread "Thread-6" jdk.internal.org.objectweb.asm.MethodTooLargeException: Method too large: jdk/proxy3/$Proxy555.<clinit> ()V
at java.base/jdk.internal.org.objectweb.asm.MethodWriter.computeMethodInfoSize(MethodWriter.java:2120)
at java.base/jdk.internal.org.objectweb.asm.ClassWriter.toByteArray(ClassWriter.java:543)
at java.base/java.lang.reflect.ProxyGenerator.generateClassFile(ProxyGenerator.java:506)
at java.base/java.lang.reflect.ProxyGenerator.generateProxyClass(ProxyGenerator.java:178)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.defineProxyClass(Proxy.java:542)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.build(Proxy.java:655)
at java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$1(Proxy.java:438)
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:329)
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:205)
at java.base/java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:436)
(...)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:373)
at jakarta.xml.ws.Service.getPort(Service.java:139)
at org.virtualbox.service.VboxService.getVboxServicePort(VboxService.java:72)
at org.virtualbox.PortPool.getPort(VirtualBoxManager.java:134)
at org.virtualbox.PortPool.preinit(VirtualBoxManager.java:110)
at org.virtualbox.PortPool$1.run(VirtualBoxManager.java:93)
at java.base/java.lang.Thread.run(Thread.java:1570)
Exception in thread "Thread-6" jdk.internal.org.objectweb.asm.MethodTooLargeException: Method too large: jdk/proxy3/$Proxy555.<clinit> ()V
at java.base/jdk.internal.org.objectweb.asm.MethodWriter.computeMethodInfoSize(MethodWriter.java:2120)
at java.base/jdk.internal.org.objectweb.asm.ClassWriter.toByteArray(ClassWriter.java:543)
at java.base/java.lang.reflect.ProxyGenerator.generateClassFile(ProxyGenerator.java:506)
at java.base/java.lang.reflect.ProxyGenerator.generateProxyClass(ProxyGenerator.java:178)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.defineProxyClass(Proxy.java:542)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.build(Proxy.java:655)
at java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$1(Proxy.java:438)
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:329)
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:205)
at java.base/java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:436)
(...)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:373)
at jakarta.xml.ws.Service.getPort(Service.java:139)
at org.virtualbox.service.VboxService.getVboxServicePort(VboxService.java:72)
at org.virtualbox.PortPool.getPort(VirtualBoxManager.java:134)
at org.virtualbox.PortPool.preinit(VirtualBoxManager.java:110)
at org.virtualbox.PortPool$1.run(VirtualBoxManager.java:93)
at java.base/java.lang.Thread.run(Thread.java:1570)
8 Replies
JavaBot
JavaBot4mo ago
This post has been reserved for your question.
Hey @Peter Rader! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st4mo ago
GitHub
MethodTooLargeException when creating the proxy for the Port type ·...
When trying to use the virtual box sdk on Java 21, we get the following exception: Exception in thread "Thread-5" jdk.internal.org.objectweb.asm.MethodTooLargeException: Method too large:...
dan1st
dan1st4mo ago
Can you try using a different JAX-WS implementation?
Peter Rader
Peter RaderOP4mo ago
Yea, I feel that guy. He also started a ticket at virtualbox: https://www.virtualbox.org/ticket/22094
JavaBot
JavaBot4mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
dan1st
dan1st4mo ago
it isn't really a virtualbox issue tbh Did you try other implementations?
Peter Rader
Peter RaderOP4mo ago
You mean for soap/wsdl? No, Its obvious that the WSDL does not care about java bytecode limitations. I reduced the WSDL to my minimal needs and the ASM proxy worked fine.
JavaBot
JavaBot4mo ago
Post Closed
This post has been closed by <@574922348642172929>.
Want results from more Discord servers?
Add your server