error after sofware upgrade with eclipse - java

I recently updated some of the addons for eclipse (3.7). To do so, I started eclipse with sudo (as not doing so caused some errors while installing new Software earlier). Now I get an error immediatly before the splash screen would appear when I start eclipse without using sudo:
!ENTRY org.eclipse.equinox.launcher 4 0 2012-09-20 12:27:48.447
!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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
I do not get this error when I start eclipse with "sudo eclipse". Any suggestions on how to solve this issue? I am using Ubuntu 11.04.
Cheers
Nebwi

A wild guess. This could be permission issue.
Did you give permissions to the folders as a sudo. Please right click and see the properties of the files in org.eclipse.core.runtime.adaptor.EclipseStarter
And give the read and execute permissions and try. Hope this may help.

While you were "sudo"ing, you may have changed ownership of the files so that you can no longer read them as you. In a command window cd to you install and type:
ls -al
If the owner is root, then you will need to change it back to you. To do this you really need to know your group. It could be your username, the word "staff", "user" etc. To find out for sure, just do that same ls command in your home directory. If you need to change the owners, then type:
sudo chown -R yourUserName.yourUserGroup *
On some unix systems it is "yourUserName:yourUserGroup". Then try eclipse.

Related

Thingsboard Windows Installation Error

When i run the install.bat file on a windows 7 machine. i receive the following error:
Detecting Java version installed. Detecting if it is 64 bit machine
CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8
Java 1.8 found! Installing thingsboard ... Error: Could not find or
load main class Files\thingsboard\lib\thingsboard.jar ThingsBoard
installation failed!
I assumed it was reading the BASE file directory incorrectly. So I it to the absolute directory location as shown below:
SET BASE="C:\Program Files\thingsboard"
SET LOADER_PATH=%BASE%\conf,%BASE%\extensions
SET SQL_DATA_FOLDER=%BASE%\data\sql
SET jarfile=%BASE%\lib\thingsboard.jar
SET installDir=%BASE%\data
I get the following error:
Detecting Java version installed. Detecting if it is 64 bit machine
CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8
Java 1.8 found! Installing thingsboard ... Logging system failed to
initialize using configuration from 'C:\Program
Files\thingsboard\install\logback.xml'
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
Failed to create parent directories for [C:\ Program
Files\thingsboard\conf\"C:\Program
Files\thingsboard"\logs\install.log] ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
openFile("C:\Program Files\thingsboard"\logs /install.log,true) call
failed. java.io.FileNotFoundException: "C:\Program
Files\thingsboard"\logs\install.log (The file name, directory name, or
volume label syntax is incorrect)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:161
)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.jav
a:57)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:47)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:114)
at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:
304)
at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:272)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingAppl
icationListener.java:235)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.jav
a:208)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMult
icaster.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult
icaster.java:138)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult
icaster.java:121)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListe
ner.java:68)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java
:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:337)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:521)
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
Failed to create parent directories for [C:\ Program
Files\thingsboard\conf\"C:\Program
Files\thingsboard"\logs\install.log] ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
openFile("C:\Program Files\thingsboard"\logs /install.log,true) call
failed. java.io.FileNotFoundException: "C:\Program
Files\thingsboard"\logs\install.log (The file name, directory name, or
volume label syntax is incorrect) ThingsBoard installation failed!
What am I doing wrong?
The quotes seem to be a problem.
C:\ Program Files\thingsboard\conf\"C:\Program
Files\thingsboard"\logs\install.log java.io.FileNotFoundException:
"C:\Program Files\thingsboard"\logs\install.log
Have you tried to use SET BASE=%ProgramFiles%\thingsboard or escape the space in the path with a ^ SET BASE=C:\Program^ Files\thingsboard?
edit:
The problem is because of the space in the install dir.
I have tried to install it in "c:\test folder" and got the same problem.
There was no problem when installing in a folder without space like "c:\test"
I changed the following part in the install.bat file and was able to install it in the folder with a space.
SET "BASE=%~dp0"
SET "LOADER_PATH=%BASE%conf,%BASE%extensions"
SET "SQL_DATA_FOLDER=%BASE%data\sql"
SET "jarfile=%BASE%lib\thingsboard.jar"
SET "installDir=%BASE%data"
PUSHD %BASE%conf
java -cp "%jarfile%" -Dloader.main=org.thingsboard.server.ThingsboardInstallApplication "-Dinstall.data_dir=%installDir%" -Dinstall.load_demo=%loadDemo% -Dspring.jpa.hibernate.ddl-auto=none -Dinstall.upgrade=false "-Dlogging.config=%BASE%install\logback.xml" org.springframework.boot.loader.PropertiesLauncher
if errorlevel 1 (
#echo ThingsBoard installation failed!
POPD
exit /b %errorlevel%
)
POPD
"%BASE%thingsboard.exe" install
When I received this error, I ran the command with Run as Administrator and my problem was solved.
if you receive the same result:
Install JRE
Delete the space in the installation directory
Run command with Run as Administrator

Unable to Acquire the State Change Lock

Our products are using the latest production-ready release of SWT, 3.7.2. Now since no one back then knew what the next Java version would be called (and how would they know that 8 came after 7, that's like higher mathematics), we were forced to swap the org.eclipse.osgi from 3.7.2 to 3.10.0, so that we can now support Java 8. While that's maybe not the best of ideas, in theory it should work.
Of course, being the major screw-up that Eclipse Luna is, there is this one "error" when we start our applications (about 50 percent of the time, I'd guess):
org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.0.v20140606-1445"; singleton:="true" [id=0] STARTED [STARTED] invalid
at org.eclipse.osgi.container.Module.lockStateChange(Module.java:329)
at org.eclipse.osgi.container.SystemModule.init(SystemModule.java:44)
at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:170)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:412)
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.startBundles(ConfigApplier.java:307)
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:108)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:129)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:143)
at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:936)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:319)
at org.eclipse.osgi.container.Module.doStart(Module.java:571)
at org.eclipse.osgi.container.Module.start(Module.java:439)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:242)
at org.eclipse.osgi.container.Module.doStart(Module.java:571)
at org.eclipse.osgi.container.Module.start(Module.java:439)
at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:172)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:412)
at org.eclipse.osgi.launch.Equinox.start(Equinox.java:115)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:320)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
There's not much information on the web what the problem is, most suggest to just delete the workspace, but for most it only happens when starting up Eclipse, not the final applications - nonetheless, I deleted workspaces and the runtime-folders. Nothing helps. The "error" gets thrown in the exported product as well, but as far as I can tell, everything still works as expected.
Is there a way to fix it? And if not, is there a way to just hide that stupid exception (disable logging for a moment, clearing the log, whatever, I'm not picky)?
I solved problem by following these simple steps,
Go to your eclipse directory and open configuration directory.
open org.eclipse.osgi directory.
open .manager folder.
Delete .fileTableLock file.
Restart your eclipse.
This looks like the framework start up starts simpleconfigurator which tries to start the framework again. The framework detects this recursion and throws an exception to escape it. The problem appears to be in simpleconfigurator attempting the start the framework which is starting it.
I faced same issue.Deleting the given .log file from configuration folder and restarting eclipse should resolve your problem.
I use Red Hat Developer Studio 10.4 (Eclipse 4.6) and i tried use Eclipse Checkstyle plugin.
After install i restarted my IDE and received the crash notification.
I tried all suggestions but only when i delete a file called framework.info.34 my problem was solved.
This file is in %eclipse_home%/configuration/org.eclipse.osgi folder.
Issue pop-up after upgrading eclipse neon through update-site along with installation of some new plugins.
Step 01:
I removed .fileTable.* lock files from ${eclipse_home}/configuration/org.eclipse.osgi/.manager directory.
Step 02:
Removed osgi cache and other plugins cache by starting in eclipse clean mode
eclipse -clean
i have the same issue,
i removed the files from respective places
1) "eclipse\configuration\org.eclipse.osgi.manager"
.fileTableLock
.fileTable3
.fileTable4
2) eclipse\configuration
*.log
after that i opened the eclipse, it worked with out any restart of PC.
for people that have this problem until runing eclipse in runtime from eclipse :
clean folder :
[yourEclipseSourceWorkspace]/.metadata/.plugins/org.eclipse.pde.core/[yourRunConfiguration]/org.eclipse.osgi/.manager
[yourEclipseSourceWorkspace]/.metadata/.plugins/org.eclipse.pde.core/[yourRunConfiguration]/org.eclipse.osgi remove all files (not folder)
then add to your configuration -clean as programm arg
The solution is simple. Just start your eclipse in clean mode.
Find location of "eclipse.exe" file. (Let's assume : C:\eclipse\eclipse.exe )
Go to run command (Windows+R)
Enter [location] +[space][-]clean
Ex: C:\eclipse\eclipse.exe -clean
Faced the same issue . Remove the .fileTableLock from "eclipse\configuration\org.eclipse.osgi.manager" and restart eclipse . It works .

WSO2 EMM java.lang.reflect.InvocationTargetException

I'm new with WSO2 products. I try WSO2 EMM and when I try to start emm 1.1.0 I get the following errors. I tried on Ubuntu, Debian and Windows and always the same issue.
It doesn't happen with the 1.0.0
java.lang.reflect.InvocationTargetException
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.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
Caused by: java.lang.RuntimeException: org.eclipse.core.runtime.adaptor.EclipseStarter
at org.wso2.carbon.server.CarbonLauncher.launch(CarbonLauncher.java:117)
at org.wso2.carbon.server.Main.launchCarbon(Main.java:163)
at org.wso2.carbon.server.Main.main(Main.java:95)
... 6 more
I already saw these errors but there was no answers.
Any ideas ?
Antoine
Ok, I answer to my own question, may be it could help...
It's still not working on linux, but it's now working on windows.
The only thing I did is ti strickly respect the folder name and structure
Let my explain:
When it was not working the structure of the folder was:
c:\wsoemm\bin...
now it's
c:\wso2\wsoeme-1.1.0\bin
This is the only thing I did to make it working
I would prefer running WSO2 EMM on linux so any help would be great.
Antoine
After 3 days it's now working on linux
you have to change the file null.ini wich is located at
/wherever you put the folder/wso2/wso2emm-1.1.0/repository/components/default
the default file is:
-install
/home/nira/git/EMM/product-emm/modules/p2-profile-gen/target/wso2carbon-core-4.2.0/repository/components/default
change it to:
-install
/wherever you put the folder/wso2/wso2emm-1.1.0/repository/components/default
That's it

Error running spoon on Ubuntu 14.04 64 bit

I am using Spoon tool of Pentaho data integration for long and it was working fine on my system. But since i moved it to /opt I am unable to run again . I have Oracle Java 8 installed on my system and each time try to run it i am end up with following exception
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2688)
at java.lang.Class.getMethod0(Class.java:2937)
at java.lang.Class.getMethod(Class.java:1771)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:149)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Composite
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 5 more
please help me to resolve this error i haven't found any solution yet
I found a solution to this problem I have removed all hidden directories generated by Kettle as well as its copy from /opt . Then I have extracted new version copy . after that I have added /opt/data-integration to my path variable and I have tried to run it from my home . Although it was not a successful run but it has generated all those dependent hidden folders required to run it . then I have to go to that directory by issuing
cd /opt/data-integration
and then I was successful to run it by issuing
sh spoon.sh
I have to go to that directory because Pentaho developers has set it so by placing relative path to launcher folder in their main command at spoon.sh.

Running Java app from inside emacs using JDEE throws NoClassDefFoundError

I have configured JDEE in emacs. But when I try to run any App, it throws NoClassDefFoundError .
Upon compilation, although a class file is created, it only shows the buffer for sometime and then closes it.
The same files if compiled and run from the terminal work perfectly fine.
Also, on this machine I have java-6-openjdk installed. I had configured JDEE on my home computer which has sun java jdk and there are no such problems there.
Other than this, features such as code completion, generation etc work fine.
How do I solve this? Is this due to open jdk ?
I am using a Ubuntu 10.04 desktop.
This is the stack trace
cd /home/vineet/java/KodeJava/src/org/kodeplay/kodejava/
/usr/lib/jvm/java-6-openjdk/bin/java org.kodeplay.kodejava.EmacsTest
Exception in thread "main" java.lang.NoClassDefFoundError: org/kodeplay/kodejava/EmacsTest
Caused by: java.lang.ClassNotFoundException: org.kodeplay.kodejava.EmacsTest
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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.kodeplay.kodejava.EmacsTest. Program will exit.
Process org.kodeplay.kodejava.EmacsTest exited abnormally with code 1
Thanks
something in your config is wrong. you are trying to run from the "/home/vineet/java/KodeJava/src/org/kodeplay/kodejava/" directory, but in order to find your class on the classpath, you should be running from "/home/vineet/java/KodeJava/src/". Probably need to configure the "jde-run-working-directory" variable.
From the question, it sounds as if the JDEE configuration is not complete when it comes to setting up the command to be launched when running the Java App.
If the same Java App can be run from the terminal with no issues, OpenJDK is not causing the trouble, I'd wager.
Perhaps you copied over from the other computer the JDEE configurations and did not adopt them for the new computer that has OpenJDK.

Categories

Resources