Skip to content
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

Exception in thread "main" java.lang.reflect.InvocationTargetException caused by java/lang/Math #191

Closed
aaronbabaron opened this issue Jul 8, 2019 · 2 comments
Assignees
Labels

Comments

@aaronbabaron
Copy link

aaronbabaron commented Jul 8, 2019

Seems like longs are not supported. Will they be?

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.RuntimeException: Error linking class com.netflix.compass.util.DurationUtil
	at de.mirkosertic.bytecoder.core.BytecodeLinkerContext.resolveClass(BytecodeLinkerContext.java:111)
	at de.mirkosertic.bytecoder.backend.CompileTarget.compile(CompileTarget.java:81)
	at de.mirkosertic.bytecoder.cli.BytecoderCLI.main(BytecoderCLI.java:111)
	... 8 more
Caused by: java.lang.RuntimeException: Error linking class java.time.LocalDate
	at de.mirkosertic.bytecoder.core.BytecodeLinkerContext.resolveClass(BytecodeLinkerContext.java:111)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.link(BytecodeLinkedClass.java:263)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveMethodSignatureAndBody(BytecodeLinkedClass.java:385)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveStaticMethod(BytecodeLinkedClass.java:370)
	at de.mirkosertic.bytecoder.core.BytecodeLinkerContext.resolveClass(BytecodeLinkerContext.java:89)
	... 10 more
Caused by: java.lang.RuntimeException: Error linking class java.time.temporal.ChronoField
	at de.mirkosertic.bytecoder.core.BytecodeLinkerContext.resolveClass(BytecodeLinkerContext.java:111)
	at de.mirkosertic.bytecoder.core.BytecodeInstructionGETSTATIC.performLinking(BytecodeInstructionGETSTATIC.java:39)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveMethodSignatureAndBody(BytecodeLinkedClass.java:400)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveStaticMethod(BytecodeLinkedClass.java:370)
	at de.mirkosertic.bytecoder.core.BytecodeInstructionINVOKESTATIC.performLinking(BytecodeInstructionINVOKESTATIC.java:34)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveMethodSignatureAndBody(BytecodeLinkedClass.java:400)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveStaticMethod(BytecodeLinkedClass.java:370)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveClassInitializer(BytecodeLinkedClass.java:148)
	at de.mirkosertic.bytecoder.core.BytecodeLinkerContext.resolveClass(BytecodeLinkerContext.java:98)
	... 14 more
Caused by: java.lang.RuntimeException: Error linking class java.time.temporal.ChronoUnit
	at de.mirkosertic.bytecoder.core.BytecodeLinkerContext.resolveClass(BytecodeLinkerContext.java:111)
	at de.mirkosertic.bytecoder.core.BytecodeInstructionGETSTATIC.performLinking(BytecodeInstructionGETSTATIC.java:39)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveMethodSignatureAndBody(BytecodeLinkedClass.java:400)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveStaticMethod(BytecodeLinkedClass.java:370)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveClassInitializer(BytecodeLinkedClass.java:148)
	at de.mirkosertic.bytecoder.core.BytecodeLinkerContext.resolveClass(BytecodeLinkerContext.java:98)
	... 22 more
Caused by: java.lang.IllegalStateException: Cannot find static method addExact in java/lang/Math with signature LONG(LONGLONG)
	at de.mirkosertic.bytecoder.core.BytecodeInstructionINVOKESTATIC.performLinking(BytecodeInstructionINVOKESTATIC.java:35)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveMethodSignatureAndBody(BytecodeLinkedClass.java:400)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveStaticMethod(BytecodeLinkedClass.java:370)
	at de.mirkosertic.bytecoder.core.BytecodeInstructionINVOKESTATIC.performLinking(BytecodeInstructionINVOKESTATIC.java:34)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveMethodSignatureAndBody(BytecodeLinkedClass.java:400)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveStaticMethod(BytecodeLinkedClass.java:370)
	at de.mirkosertic.bytecoder.core.BytecodeLinkedClass.resolveClassInitializer(BytecodeLinkedClass.java:148)
	at de.mirkosertic.bytecoder.core.BytecodeLinkerContext.resolveClass(BytecodeLinkerContext.java:98)
	... 27 more
@aaronbabaron aaronbabaron changed the title Exception in thread "main" java.lang.reflect.InvocationTargetException Exception in thread "main" java.lang.reflect.InvocationTargetException caused by java/lang/Math Jul 8, 2019
@mirkosertic mirkosertic self-assigned this Jul 8, 2019
@mirkosertic mirkosertic added the bug label Jul 8, 2019
@mirkosertic
Copy link
Owner

Longs are supported, but the Method addExact in java.util.Math is missing in the JRE emulation layer. This is the root cause for this bug.

mirkosertic added a commit that referenced this issue Jul 9, 2019
@mirkosertic
Copy link
Owner

Fixed in master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants