Eclipse giving java 8 support error won't start - java

These are my config.ini files, logs, and error I'm receiving. I was able to open and build a basic test yesterday, albeit giving binary error, but I'm receiving these errors again today trying to open eclipse. I have reinstalled java and eclipse multiple times all because of these errors. I'm running ubuntu 18.04, java 1.8.0_181, and eclipse 4.7. Can you help me get my eclipse running please?
configi.ini file...
#This configuration file was written by: org.eclipse.oomph.p2.internal.core.AgentImpl
#Wed Aug 22 19:16:40 PDT 2018
org.eclipse.update.reconcile=false
eclipse.p2.profile=_home_ryan_eclipse_cpp-oxygen_eclipse
osgi.instance.area.default=#user.home/workspace
osgi.framework=file\:/home/ryan/.p2/pool/plugins/org.eclipse.osgi_3.12.100.v20180210-1608.jar
equinox.use.ds=true
eclipse.buildId=4.7.3.M20180330-0640
ds.delayed.keepInstances=true
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.2.1.v20180131-1435.jar#1\:start
log...
!SESSION Thu Aug 23 15:58:45 PDT 2018 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2018-08-23 15:58:45.890
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.platform.ide
osgi.splashPath=file\:/home/ryan/.p2/pool/plugins/org.eclipse.platform_4.7.3.v20180330-0640
osgi.framework.extensions=reference\:file\:org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513.jar
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.p2.data.area=file\:/home/ryan/.p2/osgi.bundles.defaultStartLevel=4
error when opening eclipse...
An error has occurred. See the log file
/home/ryan/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1535066792371.log

Related

Visual Studio Code language support for java crashed 5 times

I'm using Visual Studio Code languagage support for Java made by Red Hat but I'm getting an error:
The server crashed 5 times in the last 3 minutes the server will not be restarted.
I have removed the app and reinstall two times.
I have installed lombok annotations nothing.
===MY LOG HEAD UNTILL THE ERROR ====
eclipse.buildId=unknown
java.version=11.0.8
java.vendor=Ubuntu
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -data /home/icomg/.config/Code/User/workspaceStorage/dd03d70bdc61fd3884317d660a873358/redhat.java/jdt_ws
This is a continuation of log file /home/icomg/.config/Code/User/workspaceStorage/dd03d70bdc61fd3884317d660a873358/redhat.java/jdt_ws/.metadata/.bak_0.log
Created Time: 2020-08-25 08:29:55.231
!ENTRY org.eclipse.jdt.ls.core 4 0 2020-08-25 08:29:55.231
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin.start() of bundle org.eclipse.jdt.ls.core.
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:864)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:792)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1015)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
at org.eclipse.osgi.container.Module.doStart(Module.java:605)
at org.eclipse.osgi.container.Module.start(Module.java:468)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/core/JavaCore
at org.eclipse.jdt.ls.core.internal.preferences.PreferenceManager.initialize(PreferenceManager.java:79)
at org.eclipse.jdt.ls.core.internal.preferences.PreferenceManager.<init>(PreferenceManager.java:70)
at org.eclipse.jdt.ls.core.internal.preferences.StandardPreferenceManager.<init>(StandardPreferenceManager.java:44)
at org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin.start(JavaLanguageServerPlugin.java:173)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:843)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:835)
... 14 more
Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.jdt.core (41).
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:126)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:571)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:346)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:398)
at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:473)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
My OS is `Ubuntu 20.04 LTS`
`Vscode -v 1.48.0`
Language support version `0.65.0`
It is used to be bug with the current folder .I have resolved the problem by creating a new folder and move my project there .

Getting Servlet: "AxisServlet" failed to preload on startup in Web application java.lang.StackOverflowError in Weblogic 12c

I am getting below error while deploying application on WLS 12c
<Jun 8, 2020 11:02:03,120 AM IST> <Error> <HTTP> <BEA-101216> <Servlet: "AxisServlet" failed to
preload on startup in Web application: "MyApplication1.0.war".
java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader$3.next(URLClassLoader.java:601)
at java.net.URLClassLoader$3.hasMoreElements(URLClassLoader.java:626)
at sun.misc.CompoundEnumeration.next(CompoundEnumeration.java:45)
at sun.misc.CompoundEnumeration.hasMoreElements(CompoundEnumeration.java:54)
Truncated. see log file for complete stacktrace
>
<Jun 8, 2020 11:02:08,698 AM IST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state
to true for the application "MyApplication1.0".
weblogic.application.ModuleException: java.lang.StackOverflowError
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader$3.next(URLClassLoader.java:601)
at java.net.URLClassLoader$3.hasMoreElements(URLClassLoader.java:626)
at sun.misc.CompoundEnumeration.next(CompoundEnumeration.java:45)
at sun.misc.CompoundEnumeration.hasMoreElements(CompoundEnumeration.java:54)
Truncated. see log file for complete stacktrace
Below is my project structure
Same project is working fine with Weblogic 11G
I was able to resolve issue.
For people having similar issue.
Add weblogic.xml with following content in tag.
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
This step will remove stackoverflow error.
Later you might get some dependency error which can be resolved as required.

keycloak: "Failed to read artifact descriptor" error

I'm using the Java-based Keycloak server and attempting to run the demo examples. I'm a bit of a Java hack, so please pardon my naiveté.
I'm getting the error shown below -- any help debugging and solving would be appreciated.
ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-7) Uncaught server error: java.lang.RuntimeException: org.eclipse.aether.collection.DependencyCollectionException: Failed to read artifact descriptor for org.keycloak:photoz-authz-policy:jar:3.4.3.Final
I had some trouble getting M2_HOME set so that keycloak could locate artifacts. I seem to be past that problem and now, but I'm not sure where to go with the above error. I've included some system info below. And if someone's really eager, the dockerfile is available.
I'm running v3.5.3 of maven:
$ mvn --version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T19:49:05Z)
Maven home: /usr/local/apache-maven
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.9.60-linuxkit-aufs", arch: "amd64", family: "unix"
I ran mvn -U clean install in the project directory, and the artifacts appear to be built correctly:
[jboss#09fea4c663e0 ~]$ ll .m2/repository/org/keycloak/photoz-authz-policy/3.4.3.Final/
total 44
-rw-r--r-- 1 jboss jboss 5169 Mar 28 17:16 photoz-authz-policy-3.4.3.Final.jar
-rw-r--r-- 1 jboss jboss 32 Mar 28 17:16 photoz-authz-policy-3.4.3.Final.jar.md5
-rw-r--r-- 1 jboss jboss 40 Mar 28 17:16 photoz-authz-policy-3.4.3.Final.jar.sha1
-rw-r--r-- 1 jboss jboss 773 Jan 4 09:24 photoz-authz-policy-3.4.3.Final.pom
-rw-r--r-- 1 jboss jboss 32 Mar 28 17:16 photoz-authz-policy-3.4.3.Final.pom.md5
-rw-r--r-- 1 jboss jboss 40 Mar 28 17:16 photoz-authz-policy-3.4.3.Final.pom.sha1
-rw-r--r-- 1 jboss jboss 3859 Mar 28 17:16 photoz-authz-policy-3.4.3.Final-sources.jar
-rw-r--r-- 1 jboss jboss 32 Mar 28 17:16 photoz-authz-policy-3.4.3.Final-sources.jar.md5
-rw-r--r-- 1 jboss jboss 40 Mar 28 17:16 photoz-authz-policy-3.4.3.Final-sources.jar.sha1
-rw-r--r-- 1 jboss jboss 262 Mar 28 17:16 _remote.repositories
And finally, here's the metadata associated with the artifact:
[jboss#09fea4c663e0 ~]$ cat .m2/repository/org/keycloak/photoz-authz-policy/maven-metadata-local.xml
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.keycloak</groupId>
<artifactId>photoz-authz-policy</artifactId>
<versioning>
<release>3.4.3.Final</release>
<versions>
<version>3.4.3.Final</version>
</versions>
<lastUpdated>20180328171633</lastUpdated>
</versioning>
</metadata>
Any insight?
I was able to get the examples to run by copying the project files to the server and compiling on the server. That seems strange to me -- a fat WAR seems like it would make more sense. That is, I wouldn't expect to have to have supporting libraries compiled on a the server, but that strategy allowed me to move on. Here are the commands I ran on my wildfly server (Dockerfile commands):
# Build and install keycloak example libraries
WORKDIR /opt/jboss
USER jboss
COPY --chown=jboss:jboss _srv/keycloak-demo-3.4.3.Final ./_srv/keycloak-demo-3.4.3.Final
WORKDIR _srv/keycloak-demo-3.4.3.Final/examples
RUN mvn -U clean install
WORKDIR /opt/jboss

Sonar runner (ubuntu) execution failed: com.mysql.jdbc.Driver

I've recently installed SONAR on a Vagrant box running UBUNTU.
Sonar service run fine, but when I try to run the sonar-runner I get an error related to jdbc connector.
I configured sonar to run with mysql database by changing the file "sonar-runner.properties":
sonar.jdbc.url=jdbc:mysql://127.0.0.1:3306/sonar?seUnicode=true&characterEncoding=utf8
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
When trying to start sonar-runner i get the following output:
$ sudo sonar-runner start -e
SonarQube Runner 2.3
Java 1.6.0_27 Sun Microsystems Inc. (64-bit)
Linux 3.2.0-23-generic amd64
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: /home/vagrant/bin/sonar-runner/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: SonarQube Server 4.1.1
13:01:58.363 INFO - Load batch settings
13:01:59.524 INFO - User cache: /root/.sonar/cache
13:01:59.560 INFO - Install plugins
13:02:03.309 INFO - Install JDBC driver
13:02:03.618 INFO - Create JDBC datasource for jdbc:mysql://127.0.0.1:3306/sonar?useUnicode=true&characterEncoding=utf8
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 43.846s
Final Memory: 2M/14M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: java.lang.IllegalStateException: Fail to connect to database
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at org.apache.commons.dbcp.BasicDataSource.getLogWriter(BasicDataSource.java:1098)
at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:350)
at org.sonar.core.persistence.DefaultDatabase.initDatasource(DefaultDatabase.java:142)
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:75)
... 32 more
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
... 37 more
ERROR:
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
From my undertanding the jdbc driver is not found. I thought that during initalisation sonar-runner will get the required jar (like it does for other libraries).
I tried to "sudo apt-get install libmysql-java" but still get the same error message.
If that's the right thing to do (which I doubt) I should maybe add the jar to my classpath, but I'm don't know where that jar is actually downloaded and how to add it to the classpath.
Any idea on how to get that solved?
Thanks!!
I was looking at the wrong place!
Issue was not comming from the runner but from SONAR itself. I had to change de sonar config file '/opt/sonar' and restart it. In the setting page I now can see that sonar is running on mysql.
I'm facing a other issue with the runner, but it is not related to the issue above.
So basicaly make sure both SONAR and SONAR-RUNNER are configured to work with mysql.
I had the same issue. Issue was that mysql JDBC connector was not in my bash_profile.
So i add on .bash_profile :
export jdbc mysql connector to classpath
export CLASSPATH=${HOME}/sonar/mysql-connector-java-5.1.23/mysql-connector-java-5.1.23-bin.jar:$CLASSPATH
Hope it could help

java.lang.ClassNotFoundException while starting eclipse

After purging and reinstalling eclipse with dpkg (Ubuntu) there is an error throws there:
cat /home/sergiy/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1337883707989.log
!SESSION Thu May 24 21:21:48 EEST 2012 -----------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2012-05-24 21:21:48.242
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Here is /usr/lib/eclipse/configuration/config.ini file:
#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Wed Apr 04 13:29:31 UTC 2012
org.eclipse.update.reconcile=false
eclipse.p2.profile=PlatformProfile
osgi.instance.area.default=#user.home/workspace
osgi.framework=file\:plugins/org.eclipse.osgi_3.7.2.dist.jar
equinox.use.ds=true
eclipse.buildId=I20110613-1736
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.dist.jar#1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.platform.ide
osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
osgi.framework.extensions=
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=#config.dir/../p2/
eclipse.application=org.eclipse.ui.ide.workbench
osgi.bundlefile.limit=100
How to fix this issue? Thanks in advance!
The first recommendation is to NOT install Eclipse from any Linux package manager or software repository. Instead, just get it from http://www.eclipse.org/downloads/. The builds that linux distro's install are often modified (mangled, some would say).
see https://askubuntu.com/a/695401/407641 for full instructions, ...
Highlights:
Don't sudo apt-get eclipse, that version is old!
Do download and install from http://www.eclipse.org/downloads
Do create a ~/Desktop/eclipse.desktop file. Note, the full path to the Desktop folder will be dependent upon your version of ubuntu.

Categories