After upgrading Java to 11 I get ExceptionInInitializerError [duplicate] - java

This question already has answers here:
Minimum Spring version compatible with Java 11
(3 answers)
exception in initializer error in java when using Netbeans
(9 answers)
Closed 4 years ago.
I upgraded my project from Java 8 to Java 11 and received
Error: java: java.lang.ExceptionInInitializerError
while building the project. Everything seems working properly but I do not know how I get such kind of error. Do you have any idea about that?
In order to run the project I use Run/Debug Configurations -> Spring Boot -> Application -> Run
Here is the error message :

Related

Cannot run any Java files due to class not found error [duplicate]

This question already has answers here:
What does "Could not find or load main class" mean?
(61 answers)
What is a classpath and how do I set it?
(10 answers)
Closed 1 year ago.
I'm running into an issue where I am able to compile Java files but I cannot run any of them. I have currently created a Hello World java file in my Desktop folder and compiled it and there is a HelloWorld.class that has been created as well. But when I run java HelloWorld, I get the following error:
Error: Could not find or load main class HelloWorld Caused by: java.lang.ClassNotFoundException: HelloWorld
I have googled around and it seems to have something to do with CLASSPATH? I have tried the command ECHO ${CLASSPATH} and it has returned me nothing but apparently it should return me . ? Could someone point me in the direction of how to fix this java issue and does it have anything to do with CLASSPATH? Thank you!

How to solve execution failed due to a certain reason? [duplicate]

This question already has answers here:
CorruptedCacheException: Corrupted IndexBlock 298298 found in cache '/Users/macuser/.gradle/caches/journal-1/file-access.bin'
(11 answers)
Closed 1 year ago.
I have been executing my app in Android Studio, but the task is failed with an error message 'Caused by: org.gradle.cache.internal.btree.CorruptedCacheException: Corrupted DataBlock 1277548 found in cache 'C:\Users\pc.gradle\caches\journal-1\file-access.bin'.'
Please someone help me out
you can delete the file-access.bin in path C:\Users.gradle\caches\journal-1. After deleting it, I restarted Android Studio and rebuilt the project.

Glassfish not starting due to endorsed.dirs error [duplicate]

This question already has answers here:
How to fix -Djava.endorsed.dirs not supported, that emerged after installing WTP in Eclipse?
(3 answers)
Closed 2 years ago.
When I try to start a domain in Glassfish 4.1 from IntelliJ I'm presented with this error:
JVM failed to start: com.sun.enterprise.admin.launcher.GFLauncherException: The server exited prematurely with exit code 1.
Before it died, it produced the following output:
-Djava.endorsed.dirs=/opt/glassfish4/glassfish/modules/endorsed:/opt/glassfish4/glassfish/lib/endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
I found that endorsed dirs have been deprecated in Java 9, so I checked my configurations, and all seems to be using Java 8.
I also tried to start from the command line, with the same output.
I had to remove all mentions of -Djava.endorsed.dirs and -Djava.ext.dirs from my config/domain.xml

Java 6 -> 8 migration: "j.s.c.CertificateException: No X509TrustManager implementation available" build error

I have a existing maven project which is working fine with the other team members and they were using java 6. I was asked to upgrade the java version from 6 to 8 and check the compatibility.
However when I used java 8 I got the error as :
"java.security.cert.CertPathValidatorException: Certificate Chaining Error ...."
So I googled and added .jks file to provide the security key/password for that.
it resolved the first error/exception but produced another one : "java.security.cert.CertificateException: No X509TrustManager implementation available "
But then again when i tried to go back to java version 6 I am getting different error/exception as :
"Remote host closed connection during handshake : SSL peer shut down incorrectly"
Please I need some light on this how to resolve it. I have been trying this from past 1 week without any luck.
I am using maven3 for the building.

Jasper Report 5.5 runtime error [duplicate]

This question already has answers here:
java.lang.AbstractMethodError: org.apache.xerces.dom.ElementImpl.getTextContent()Ljava/lang/String
(2 answers)
Closed 6 years ago.
I have written a program to generate pdf reports by using JasperReports 5.5 but when running the program following exception comes:
Java.lang.AbstractMethodError:
org.apache.xerces.dom.DeferredElementImpl.getTextContent()Ljava/lang/String;
at
net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFace(Simple‌​FontExtensionHelper.java:364) at
net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamily(Simp‌​leFontExtensionHelper.java:290) at
net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamilies(Si‌​mpleFontExtensionHelper.java:254)
public class AbstractMethodError extends IncompatibleClassChangeError
AbstractMethodError thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler;
but this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.
Solution - Please re-compile your code or Class(Which raise error) and then run your Code.

Categories