-
Notifications
You must be signed in to change notification settings - Fork 34
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
java 11 Parsing signatures failed #196
Comments
Did you try with matching java-11 signatures? Java 11 vs. signatures-17 sounds like a mismatch in your setup.- getCompactNumberInstance was added in Java 12. |
Hi, |
i use 11 in pom, but i want upgrade to java 17 in future, |
No, that's not possible. You have to use the signatures of your compilation target. It just worked in forbiddenapis 3.2, because the signatures of 11 and 17 were identical. Now that 17 differs it fails. So it just worked by accident. |
I would do the following: set target/release to the same version for compile and forbiddenapis task. When you upgrade change both. This will work flawless, because new additions in forbiddenapis won't suddenly break your build, because code compiled against 11 can't use this new problematic signatures anyways (they don't exist yet). |
thank you. |
version 3.3 with java 11 Parsing signatures failed( version 3.2 is ok )
jdk-unsafe-17
jdk-deprecated-17
jdk-internal-17
jdk-non-portable
jdk-reflection
[ERROR] Failed to execute goal de.thetaphi:forbiddenapis:3.3:check (default) on project xyz-util: Parsing signatures failed: Method not found while parsing signature: java.text.NumberFormat#getCompactNumberInstance() -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.thetaphi:forbiddenapis:3.3:check (default) on project xyz-util: Parsing signatures failed: Method not found while parsing signature: java.text.NumberFormat#getCompactNumberInstance()
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Parsing signatures failed: Method not found while parsing signature: java.text.NumberFormat#getCompactNumberInstance()
at de.thetaphi.forbiddenapis.maven.AbstractCheckMojo.execute (AbstractCheckMojo.java:443)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: de.thetaphi.forbiddenapis.ParseException: Method not found while parsing signature: java.text.NumberFormat#getCompactNumberInstance()
at de.thetaphi.forbiddenapis.Signatures$UnresolvableReporting$1.parseFailed (Signatures.java:60)
at de.thetaphi.forbiddenapis.Signatures.addSignature (Signatures.java:212)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesFile (Signatures.java:312)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesStream (Signatures.java:278)
at de.thetaphi.forbiddenapis.Signatures.addBundledSignatures (Signatures.java:274)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesFile (Signatures.java:294)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesStream (Signatures.java:278)
at de.thetaphi.forbiddenapis.Signatures.addBundledSignatures (Signatures.java:274)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesFile (Signatures.java:294)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesStream (Signatures.java:278)
at de.thetaphi.forbiddenapis.Signatures.addBundledSignatures (Signatures.java:274)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesFile (Signatures.java:294)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesStream (Signatures.java:278)
at de.thetaphi.forbiddenapis.Signatures.addBundledSignatures (Signatures.java:274)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesFile (Signatures.java:294)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesStream (Signatures.java:278)
at de.thetaphi.forbiddenapis.Signatures.addBundledSignatures (Signatures.java:274)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesFile (Signatures.java:294)
at de.thetaphi.forbiddenapis.Signatures.parseSignaturesStream (Signatures.java:278)
at de.thetaphi.forbiddenapis.Signatures.addBundledSignatures (Signatures.java:274)
at de.thetaphi.forbiddenapis.Signatures.addBundledSignatures (Signatures.java:321)
at de.thetaphi.forbiddenapis.Checker.addBundledSignatures (Checker.java:322)
at de.thetaphi.forbiddenapis.maven.AbstractCheckMojo.execute (AbstractCheckMojo.java:404)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
The text was updated successfully, but these errors were encountered: