Java 17 upgrade - error: package com.sun.javadoc does not exist - upgrade

While upgrading to jdk17 getting this blocker any hacks? please comment.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project test: Compilation failure: Compilation failure:
[ERROR] C:\Users\test\git\java\com\util\test.java:[31,22] error: package com.sun.javadoc does not exist

The com.sun.javadoc package was deprecated in Java 11, and has been removed for Java 17. Your code must be updated. Please refer to the migration guide for package jdk.javadoc.doclet for replacement APIs.

Related

Package Build gradle failed

everytime i add google_maps_flutter package i always get this error but in another project it's fine.
Please help...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\flutter\.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-2.1.2\android\build.gradle'
* What went wrong:
Could not compile build file 'C:\flutter\.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-2.1.2\android\build.gradle'.
> startup failed:
General error during conversion: Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major version 61

Unable to run the gatling test (jvm issue)

I am trying to run the gatling test on MacOS.
Java version: openjdk version "1.8.0_275"
scala version: 2.12.12
sbt version :1.4.4
I am unable to run my tests because of this error. I have tried changing the java versions(recommended one) and tried reinstalling the sbt as well.
The error log is as follows:
Unrecognized VM option 'AggressiveOpts'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
[error] Could not accept connection from test agent: class java.net.SocketException: Socket closed
[error] java.net.SocketException: Socket closed
[error] at java.base/sun.nio.ch.NioSocketImpl.endAccept(NioSocketImpl.java:689)
[error] at java.base/sun.nio.ch.NioSocketImpl.accept(NioSocketImpl.java:762)
[error] at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:684)
[error] at java.base/java.net.ServerSocket.platformImplAccept(ServerSocket.java:650)
[error] at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:626)
[error] at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:583)
[error] at java.base/java.net.ServerSocket.accept(ServerSocket.java:540)
[error] at sbt.ForkTests$Acceptor$1$.run(ForkTests.scala:71)
[error] at java.base/java.lang.Thread.run(Thread.java:832)
I would appreciate your feedback on this. Thank you.
There's no way you're using Java 8 as indicated, as your stacktrace clearly shows Jigsaw modules (java.base/). You're using Java 9 or older.
What happens is that the test forked JVM crashes on boot because it's being passed the AggressiveOpts option that was dropped after Java 8.
This option was removed in recent versions of Gatling's sbt plugin, meaning that you're using an older version.
In short: update your sbt plugin version.

I am using Maven in Eclipse and it shows an error message saying that I may be using a JRE. However, I am using a JDK. How can I resolve this issue?

I am trying to run a "maven test" and I get this error in the console:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gpdb-dispomap: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
However, when I run a "clean install" it works and I don't get this message.
How can I resolve this?
This is my JDK settings:

gwt 2.8 throws exception when compiling with guava 20

I am trying to upgrade to the newly released guava-gwt 20. I am getting this exception when I do a gwt compile. I did not get any errors prior to upgrading to guava 20. I am using the gwt 2.8.0. Is there a module I need to reference? Much appreciated!
[INFO] Tracing compile failure path for type 'java.util.concurrent.Future'
[INFO] [ERROR] Errors in 'jar:file:/Users/Eric/.m2/repository/com/google/guava/guava-gwt/20.0/guava-gwt-20.0.jar!/java/util/super/java/util/concurrent/Future.java'
[INFO] [ERROR] Line 32: No source code is available for type java.lang.InterruptedException; did you forget to inherit a required module?
[INFO] Tracing compile failure path for type 'java.util.concurrent.CountDownLatch'
[INFO] [ERROR] Errors in 'jar:file:/Users/Eric/.m2/repository/com/google/guava/guava-gwt/20.0/guava-gwt-20.0.jar!/java/util/super/java/util/concurrent/CountDownLatch.java'
[INFO] [ERROR] Line 30: No source code is available for type java.lang.InterruptedException; did you forget to inherit a required module?
[INFO] [ERROR] Aborting compile due to errors in some input files
This appears to be a Guava bug. Until we fix it, you can work around it by adding <inherits name="java.lang.Lang"/> to your .gwt.xml.

Installing Play framework on Mavericks, java 1.8.0_05

I am new to Scala/Java/Play Framework.
I followed the instructions at http://www.playframework.com/documentation/2.0/Installing to install Java 8 (along with Netbeans) and play framework for OSX.
I created a new Scala Application using "play new myappname" and all the template files have been created.
When I try to run the application using the command "play" from inside the project directory I see the following error:
error: error while loading AnnotatedElement, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class)' is broken
(bad constant pool tag 18 at byte 76)
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i
[warn] Ignoring load failure: no project loaded.
[error] Not a valid command: play (similar: last, alias, loadp)
[error] play
[error] ^
How can I resolve this?
I fixed this by uninstalling JDK 8 and installing JDK 6 from the Apple Developer site at http://support.apple.com/kb/DL1572?viewlocale=en_US
(Side note: First I tried JDK 7 which failed with a similar yet different error).
Did you have a chance to look at this:
https://code.google.com/p/guava-libraries/issues/detail?id=1095