Java.lang.ExceptionInInitializerError in EclipseLink Project - exception

Error messagei have a problem with setting up my Eclipse Link Project. I already imported the EclipseLink library and as well i imported the jdbc-driver, but if i try to run this project as a java application suddenly this error appears.
Does anyone have an idea how to resolve this problem?
Thanks in advance!
imported libraries
converted to jpa-project

Related

Using mysqlconnector with an IntelliJ Plugin

I am hoping you might be able to help me with an issue that I can not manage to find a solution for. I want to build an IntelliJ Plugin that is able to connect to a mysql database. However, adding the mysql connector jar as a library like you would for a simple project does not seem to work and I am out of ways to try it to work. Do you have any suggestions I might try? I thought about the plugin.xml dependencies but I can not seem to find a way to specify the dependency properly. Any hint would be much appreciated.
Here is what I have tried:
In a plugin project, I added the mysql connector as dependency:
dependency setup
I have a DB connection class:
connection class
And another class where I've added my main method and I want to execute an SQL query:
execution result
As seen, I am getting a ClassNotFound exception for the Driver.
If I do the exact same setup, but on a simple Java project, the connection runs with no issues. See below:
dependency setup
result
There is a warning about the deprecated explicit loading of the Diver but this is not the issue. Even iv I remove this, the plugin project still can not find the class.
Actually it seems like the recommended way of declaring dependencies for the Plugins is via Gradle dependencies.
Comment by Jakub here https://www.youtube.com/watch?v=-6D5-xEaYig&lc=UgzA2TPtX_1H2PaL7Q54AaABAg.9Mv96dstxEG9N20UT7YuRQ
I looked up how to declare mysql as gradle dependency and found this: https://www.reddit.com/r/gradle/comments/apme5g/how_to_add_mysqlconnector_to_gradle_build/
So I used
dependencies {
implementation ("mysql:mysql-connector-java:8.0.24")
}
in build.gradle and all works fine now :)
Hope this will help others as well.

An internal error occurred during: "Enable SonarLint on all projects". Unable to add builder

When starting Eclipse in a workspace, SonarLint plugin reports the following error:
An internal error occurred during: "Enable SonarLint on all projects".
Unable to add builder
After confirming the errmsg, both Eclipse and SonarLint plugin work properly.
Nevertheless, the message is misleading. What causes it? In my workspace, some projects are open and some not.
For me issue was coming due to lombok jar so Need to upgrade LOMBOK version to 1.18.12 in sts and in pom.xml both and it got resolved.
In my case it was caused by one of my project being read-only.
For some reason, SonarLint defines a global Eclipse job, to add itself to every project that is open. If the process fails, you get that annoying message.
As a workaround I've removed a read-only flag from the .project files.
Yes, you just need to update the latest Lombok jar in either STS or eclipse, this will resolve the issue for me. And you need a sonar lint plugin for the eclipse for sure.
The attached screenshot is coming in my case, but after updating the Lombok jar it is gone.
I upgraded to Latest lomlok version and it got solved.
I replace the old lomlok file with latest version from https://projectlombok.org/download.
I am using lombok 1.18.4 and eclipse = eclipse-java-12-R-win32-x86-64.
Project is compiled and able to run the project but in eclipse whenever i am opening any java file facing issue :
An internal error occurred during: "SonarLint processing file lombok/launch/PatchFixesHider$ValPortal /server/com/EmployeeList.java".
lombok/launch/PatchFixesHider$ValPortal
Sonar lint issue
This propblem was resolved with next version of LOMBOK.
Upgread to 1.12 or higher version and rebuild pom.xlm
I was upgread to 1.20 and problem dispaired ;)

How to properly add Firebase jar file to libgdx HTML5?

Firebase jar file works for both iOS and Android. But when I try to deploy the web version, it gives me an error:
[ERROR] Line 18: No source code is available for type com.firebase.client.Firebase; did you forget to inherit a required module?
I tried to add the dependencies in the module settings to the HTML project.
But it still gives me this error.
Does anyone know how to solve this? Any advice would be appreciated.

Tomcat ServeletException NoClassDefFoundError

I have a webapp I'll call "App1" I am using to create some webplots. I have the .jar files in webapps/App1/lib/ and when I visit the server, I find that I am able to launch some webapps, but others I get funny exceptions. One, being
java.lang.NoClassDefFoundError: Could not initialize class com.jrefinery.chart.JFreeChartConstants
Then, when I add the jfreechart jar to the classpath, I get a different error:
java.lang.NoClassDefFoundError: com/jrefinery/util/ObjectUtils
tomcat version: 7.0.19
OS: ubuntu 12.04
I've tried it on a windows installation and it seems to work just fine. So I'm guessing it's a classpath error? I've tried adding the jfreechart-*.jar to the catalina classpath but it doesn't seem to fix anything. I've also tried to copy the webapp/App1/lib/ jar files to the top level/lib folder and this doesn't fix anything either.
Any ideas here?
Thanks.
You are missing the correct jar file in your project.
The jfreechart project has been repackaged. If you include the old jfreechart-0.9.3.jar, it will fix your compiler errors.
jfreechart-0.9.3.jar
download : http://mirrors.ibiblio.org/pub/mirrors/maven2/jfreechart/jfreechart/0.9.3/jfreechart-0.9.3.jar

Integration of Yet Another Forum with the existing and running blog engine

i installed yet another forum code successfully.But when i tried to integrate it with blog engine 2.0 it is giving me error as follows:- Could not load file or assembly 'Autofac.Configuration' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.Can anyone suggest me the solution?
I think that you have choose Clean then you Rebuild your solution's cause Autofac dll sometime Don't get generated. To solve your problem either copy the Autfac.dll from your downloaded files and put them in the bin folder again. I have experienced this problem several times and this solved it.