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
Related
Tried to follow the answers to other similar questions here, unfortunately, to no avail. We are upgrading our application from JAVA 7 to JAVA 17. The code compiles just fine, the problem is when we try to run the .war file on apache-tomee-plume-8.0.8.
JAVA_HOME is set properly:
JAVA_HOME
As well as path:
PATH
Here is the log error message:
Caused by: java.lang.RuntimeException: Unable to read class definition for com.ui.AccountListLight$SubListDataModel
at org.apache.xbean.finder.AnnotationFinder.readClassDef(AnnotationFinder.java:1180)
at org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java:153)
at org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java:166)
at org.apache.openejb.config.FinderFactory$OpenEJBAnnotationFinder.<init>(FinderFactory.java:546)
at org.apache.openejb.config.FinderFactory.newFinder(FinderFactory.java:267)
at org.apache.openejb.config.FinderFactory.create(FinderFactory.java:80)
at org.apache.openejb.config.FinderFactory.createFinder(FinderFactory.java:69)
at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:878)
... 46 more
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
at org.apache.xbean.asm9.ClassReader.<init>(ClassReader.java:189)
at org.apache.xbean.asm9.ClassReader.<init>(ClassReader.java:170)
at org.apache.xbean.asm9.ClassReader.<init>(ClassReader.java:156)
at org.apache.xbean.asm9.ClassReader.<init>(ClassReader.java:277)
at org.apache.xbean.finder.AnnotationFinder.readClassDef(AnnotationFinder.java:1176)
Yes, I understand that the issue is that I compiled on JAVA 17 and somehow TomEE is trying to run it on an older version (probably JAVA 7 as that was what I had installed before), but considering I removed all JRE/JDK stuff for JAVA 7 on my machine and all there is in it is JAVA 17, how does it keep happening? Thank you for your time.
The problem has nothing to do with Java being unable to read your Java 17-compiled classes. Looking at the stack trace, the problem is that org.apache.xbean.asm9.ClassReader is unable to read your class file. This particular ClassReader is one that TomEE uses to load your application. It is not surprising that TomEE can't read Java 17 applications, since the last release was in August, before Java 17 came out. It was itself compiled using an older version of Java. Hopefully a future version of TomEE will fix this issue.
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 :
This question already has answers here:
import sun.misc.BASE64Encoder results in error compiled in Eclipse
(15 answers)
Closed 1 year ago.
when i run my app in mac, and show up this message
Errors occurred during the build.
Errors running builder 'Android Package Builder' on project 'IMPEXP'.
sun/misc/BASE64Encoder
but this project is work fine in windows 10 computer, and i don't use any about base64Encoder
eclipse Version: Photon Milestone 3 (4.8.0M3)
JRE java se 9.0
edit!
i found something like below
!ENTRY org.eclipse.core.resources 4 2 2017-11-09 11:50:09.047
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
at com.android.sdklib.internal.build.SignedJarBuilder.<init>(SignedJarBuilder.java:177)
at com.android.sdklib.build.ApkBuilder.init(ApkBuilder.java:446)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:422)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:362)
at com.android.ide.eclipse.adt.internal.build.BuildHelper.finalPackage(BuildHelper.java:391)
at com.android.ide.eclipse.adt.internal.build.BuildHelper.finalDebugPackage(BuildHelper.java:359)
at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:632)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:330)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:405)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:566)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:544)
at org.eclipse.core.internal.resources.Project.build(Project.java:120)
at com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementalDebugBuild(ProjectHelper.java:1143)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:155)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoder cannot be found by com.android.ide.eclipse.base_23.0.7.2120684
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 23 more
As others have pointed out already, this is a compatibility issue—you need exactly Java 8 to run Eclipse.
Install JDK 8 if you don’t have it already.
In Eclipse, go to Window > Preferences > Installed JREs. Make sure Java 8 appears in the list and is selected. After that, close Eclipse.
Additionally, eclipse.ini also has a reference to the Java VM it uses. Make sure the VM it points to is Java 8 (see link on how to find it and how to set VM preferences).
Restart Eclipse and try again.
The Android code you are using is trying to use the sun.misc.BASE64Encoder class.
This deprecated class has been removed from Java 9 so this is not going to work.
You will need to switch back to Java 8 or find an update to the Android code (if there is one).
I'm working with Windows 7. I had to change the preferences and the ini file. Both had C:\Program Files\Java\jdk-12.0.1\bin which I changed to C:\Program Files\Java\jre1.8.0_221\bin. It now works!
In my case it was something very crazy.
I have to download the eclipse IDE Version NEON
Since the project is old almost from 2014
Attached the url of the IDE for which you need it:
Eclipse IDE NEON
I also had to follow the same installation steps
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.
Hi I'm trying to install this tool 'Sean Corfield's scripting for ColdFusion project.' on my server - problem is I am getting "Class not found: com.caucho.quercus.script.QuercusScriptEngineFactory " errors, I have java 1.6 installed.... I'm not sure how where to get these extra classes ... any help?
[opensuse 11 system, CF8 java 1.6]
-thanks
-sean
Did you follow the installation instructions for the cfphp, as per the "example.cfm" page:
Installation:
1. Copy lib/quercus.jar and lib/resin-util.jar to WEB-INF/cfusion/lib/
(multiserver) or coldfusion8/lib (standalone)
2. Restart ColdFusion 8.
3. Optionally copy customtags/php.cfm into your custom tags path.
The important thing is that the quercus.jar is accessible to the JVM. Your error message indicates that the JVM can't find the jar.