Eclipse throws org.osgi.framework.BundleException on launch - java

When I try launching Eclipse Indigo on Windows XP I am getting an error and the prompter tells me to go to the log file.
Apparently, it's throwing an org.osgi.framework.BundleException:
!ENTRY org.eclipse.ui.ide 4 0 2012-02-01 11:17:19.301 !MESSAGE
FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException:
Exception in org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.stop() of
bundle org.eclipse.ui.ide. at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:791)
at
org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:510)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:565)
at
org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1161)
at
...
Does anyone know how to fix this? I believe it stopped working because I played around with the Java path trying to get a project ported onto a Blackberry emulator.
However I tried setting the path to the correct value but I'm getting no luck.
I've even installed a fresh version of Eclipse into another directory but the problem does not go away.

From http://www.javalobby.org/java/forums/t92895.html (as indicated by Banana Man in the comments):
Put the unzipped "eclipse" folder under c drive. Create a shortcut of
"eclipse.exe". In the target, put this:
C:\eclipse\eclipse.exe -vm "C:\Program
Files\Java\jre1.5.0_11\bin\javaw.exe"
Note - "C:\Program Files\Java\jre1.5.0_11\bin\javaw.exe" is where your
jre is installed at. You can change this path to match your your jre
path.
In the start in, I have this: C:\eclipse

Related

Netbeans on Mac crashes at Startup when adding plugins

Every time I add something to my Netbeans it crashes when starting it without sudo. For example, when I try to add a Plugin or also when configuring JavaFX, it crashes when closing Netbeans and clicking the icon in the dock again.
Here is some of the messages.log file:
...
!ENTRY org.eclipse.osgi 4 0 2021-01-02 13:35:28.797
!MESSAGE Error reading configuration: Permission denied
!STACK 0
java.io.IOException: Permission denied
at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.base/java.io.File.createTempFile(File.java:2107)
at org.eclipse.osgi.storagemanager.StorageManager.initializeInstanceFile(StorageManager.java:188)
at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:708)
...
When running Netbeans by using sudo /Applications/NetBeans/Apache\ NetBeans\ 12.2.app/Contents/MacOS/netbeans in the terminal everything works just fine, but in my opinion, this isn't the way it should work.
So does anybody know how to add Plugins,.. and also run the program by clicking the icon?
As the Permission denied error suggests, this is most likely due to the permissions - confirm that the user that is trying to launch the application has Read/Write permissions for the /Applications/NetBeans/Apache\ NetBeans\ 12.2.app/Contents/MacOS/netbeans folder.

Eclipse Installation Error on Windows 10

I want to install Eclipse, but Eclipse is throwing an exception.
Here is the log:
[2018-01-29 19:40:29] An error was detected while performing the engine operation and the changes are being rolled back. See the log for details.
[2018-01-29 19:40:29] ERROR: org.eclipse.equinox.p2.engine code=4 An error occurred while collecting items to be installed
at org.eclipse.oomph.util.OomphPlugin.coreException(OomphPlugin.java:280)
at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl$3.commit(ProfileTransactionImpl.java:547)
at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl.commit(ProfileTransactionImpl.java:340)
at org.eclipse.oomph.setup.p2.impl.P2TaskImpl.perform(P2TaskImpl.java:729)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:3324)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:3252)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:3233)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:3133)
at org.eclipse.oomph.setup.internal.installer.SimpleVariablePage.installPerform(SimpleVariablePage.java:1298)
at org.eclipse.oomph.setup.internal.installer.SimpleVariablePage.access$32(SimpleVariablePage.java:1166)
at org.eclipse.oomph.setup.internal.installer.SimpleVariablePage$20.run(SimpleVariablePage.java:1111)
ERROR: org.eclipse.equinox.p2.engine code=0 session context was:(profile=C__Program Files_Java_Eclipse_eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
ERROR: org.eclipse.equinox.p2.artifact.repository code=1003 Multiple problems occurred while downloading.
ERROR: org.eclipse.equinox.p2.artifact.repository code=1003 Unable to write to repository: file:/C:/Windows/system32/%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00.
java.io.IOException: Failed to create directory C:\Windows\system32\
The latest Eclipse versions
J2EE
Eclipse jee oxygen 2 win32 x86_64
And Java
Eclipse java oxygen 2 win32 x86_64
Are just zip files, you should really need to "install" anything, you can just make a folder say on your C drive, call it "Apps" unzip Eclipse in there, run eclipse.exe and make sure you select a workspace are that wouldnt require admin rights

java.lang.NoClassDefFoundError error running RNetLogo on 64-bit Ubuntu 16.04 - but is the issue rJava or NetLogo?

The issue
I am attempting to start an instance of NetLogo in R using the RNetLogo package, which has rJava as a dependency.
During installation of rJava 0.9-9 (the latest development snapshot from rforge), I get the following errors:
warning: [options] bootstrap class path not set in conjunction with -source 1.6
This appears to refer to Java version 6, even though I have version 8 only on my machine. However, the developer of rJava appears to say here that as long as the package installs and loads correctly, which it does, then users should ignore the warnings. Furthermore, .jinit() appears to run correctly:
> .jinit()
[1] 0
and the correct version of Java is detected:
> .jcall("java/lang/System", "S", "getProperty", "java.runtime.version")
[1] "1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12"
So, having loaded RNetLogo, I attempt to start a NetLogo instance. Here is the minimal code I'm running:
library(RNetLogo)
nl.path <- "~/NetLogo 6.0.2/app"
NLStart(nl.path, gui = FALSE, nl.jarname='netlogo-6.0.2.jar')
Which returns the following errors:
java.lang.NoClassDefFoundError: org/nlogo/workspace/Controllable
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
Caused by: java.lang.ClassNotFoundException
at RJavaClassLoader.findClass(RJavaClassLoader.java:383)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
I get the same issue using RStudio or running R from the terminal (including running as root).
My full sessionInfo():
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=en_GB.UTF-8
[9] LC_ADDRESS=en_GB.UTF-8 LC_TELEPHONE=en_GB.UTF-8 LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RNetLogo_1.0-4 igraph_1.1.2 rJava_0.9-9
loaded via a namespace (and not attached):
[1] compiler_3.4.3 magrittr_1.5 tools_3.4.3 pkgconfig_2.0.1
Attempted fixes
Based on other users' issues that appear to be related, I also tried to following:
° Setting environment variables in /etc/profile.d/:
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
export PATH="$PATH:$HOME/bin:$JAVA_HOME/bin"
export LD_LIBRARY_PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server"
export CLASSPATH="$ClASSPATH:$HOME/R/x86_64-pc-linux-gnu-library/3.4/rJava/java"
° Running
sudo R CMD javareconf -e
° Adding a couple of lines proposed as mac OS fixes to the start of my script:
Sys.setenv(NOAWT=1)
dyn.load('/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so')
Thanks in advance.
I spent a lot of time staring at this question, assuming I had the same issue because I was getting the same error. So, for future readers: On Ubuntu 17.10, with rJava 0.9-9, NetLogo 6.0.3 and RNetLogo 1.0-4, the same error results when using the Oracle 9 Java SDK. Going back to 8 solves it.
For the OP: The ~/ in nl.path might be the problem. On my system it doesn't work, but specifying the full path (that is, home/user_name/...) does.
I had the same problem with rNetLogo 1.0-4 for NetLogo 5.3.1 in combination with openjdk-8 on Ubuntu 16.04. I tried openjdk-8 and Oracle Java 8 (using ppa:webupd8team/java) with no luck.
In the end it works with rJava as Ubuntu package (r-cran-rjava) and going back to rNetLogo 1.0-0 (with I suppose did the trick), still using Oracle Java 8.
url = 'https://cran.r-project.org/src/contrib/Archive/RNetLogo/RNetLogo_1.0-0.tar.gz'
install.packages(url, repos=NULL, type="source")

Can't build cordova projects

I have a problem with setting up the work environment for Cordova on Windows 7 for Android. I use NetBeans 8 and followed this guide: Link Here
New project -> Cordova -> Hello World Template.
Whenever I try to build a Cordova project (in NetBeans) I get this message:
BUILD FAILED
C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml:90: Cannot find C:\Users\Administrator\SkyDrive\Skolegang\Dataingeniør\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml imported from C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml
Total time: 0 seconds
C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\cordova\node_modules\q\q.js:126
throw e;
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\cordova\run.bat: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Command finished with error code 8: C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\cordova\run.bat --emulator
C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\nbproject\build.xml:272: exec returned: 1
BUILD FAILED (total time: 47 seconds)
I have googled it for hours but can't seem to find a solution. Some people get some of the same errors(not exact, but similar), but the solutions did not work for me. One issue was regarding Java 8 and ant versions beneath 1.9.0 (I use Node 0.10.26, java 1.7.0_25, cordova 3.5.0-0.2.4 and ant 1.9.4). I also tried to create a new project with the console (CMD), but it gives the exact same error when I build. It's no problem to create the project, nor adding Android as a platform, the problem is building the project. I think the environment variables are set correctly since the java, node, ant and cordova commands work fine in cmd/powershell, and the check_reqs.bat said that the environment was fine.
It's this line that creates the error: <import file="${sdk.dir}/tools/ant/build.xml" />. This is the rest of the message: Cannot find C:\Users\Administrator\SkyDrive\Skolegang\Dataingeniør\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml imported from C:\Users\Administrator\Documents\NetBeansProjects\HTML5Application2\platforms\android\build.xml.
Here is the error I get in the command window (not using NetBeans):
PS C:\Users\Administrator\Desktop\test\fakeApp> cordova build android
Running command: C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\cordova\build.bat
Buildfile: C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\build.xml
BUILD FAILED
C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\build.xml:90: Cannot find C:\Users\Administrator\SkyDrive\
Skolegang\Dataingeni├©r\Android\adt-bundle-windows-x86_64-20130729\sdk\tools\ant\build.xml imported from C:\Users\Admini
strator\Desktop\test\fakeApp\platforms\android\build.xml
Total time: 0 seconds
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Users\Administrator\Desktop\test\fakeApp\platforms\androi
d\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: C:\Users\Administrator\Desktop\test\fakeApp\platforms\android\cordova\build.bat: Command failed with exit code 2
at ChildProcess.whenDone (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\s
rc\cordova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I thought maybe it was a path issue since I have a special letter in the path were the NetBeansProjects are stored (and it's pretty long too), but creating a test directory at C:\ and creating the project with the command window gave the same error. I'm new at Cordova so I'm sure there's an easy solution, thanks in advance.
I solved it, though I tried to create a cordova project outside the OneDrive folder I did not think of the SDK path (which also were stored in OneDrive). By moving the SDK files to C: (the path could probably not contain the special letter 'ø') and changing the path of the environment variables (and the SDK path in NetBeans) it now runs perfectly.

Windows 7 Grails installation

I am working with Groovy & Grails for the first time and having trouble getting the local Windows 7 environment to accept the correct locations of the paths to the bin. Well at least I think after following the www.grails.org\Installation.
Here is what the prompt feedback is showing:
C:\Groovy Grails\grails-1.3.7>gradlew
ERROR: JAVA_HOME might be set to an invalid directory: C:\Program Files\Java\jdk
1.7.0_03\bin;
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation if there are problems.
The system cannot find the path specified.
Any suggestions to get going in grails?
take off the /bin, just use: C:\Program Files\Java\jdk 1.7.0_03
never tried to build grails. here what happened:
R:\dev\grails-2.0.1>gradlew --stacktrace
FAILURE: Build failed with an exception.
* Where:
Script 'R:\dev\grails-2.0.1\gradle\assemble.gradle' line: 56
* What went wrong:
A problem occurred evaluating script.
Cause: Could not find property 'org' on root project 'grails-2.0.1'.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating script.
at org.gradle.groovy.scripts.DefaultScriptRunnerFactory$ScriptRunnerImpl
.run(DefaultScriptRunnerFactory.java:51)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.
apply(DefaultScriptPluginFactory.java:127)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.appl
yScript(DefaultObjectConfigurationAction.java:82)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.acce
ss$000(DefaultObjectConfigurationAction.java:32)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$1.ru
n(DefaultObjectConfigurationAction.java:54)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.exec
ute(DefaultObjectConfigurationAction.java:114)
at org.gradle.api.internal.project.AbstractProject.apply(AbstractProject
.java:847)
at org.gradle.api.Project$apply$0.call(Unknown Source)
at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.gro
ovy:31)
at org.gradle.api.Script$apply$0.callCurrent(Unknown Source)
at build_7hj6n9uur9rg08bs08d0m02icl.run(R:\dev\grails-2.0.1\build.gradle
:245)
at org.gradle.groovy.scripts.DefaultScriptRunnerFactory$ScriptRunnerImpl
.run(DefaultScriptRunnerFactory.java:49)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.
apply(DefaultScriptPluginFactory.java:127)
at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptPro
cessor.java:38)
at org.gradle.configuration.DefaultProjectEvaluator.evaluate(DefaultProj
ectEvaluator.java:38)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj
ect.java:487)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj
ect.java:71)
at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectE
valuationConfigurer.java:23)
at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectE
valuationConfigurer.java:21)
at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuil
dConfigurer.java:38)
at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuil
dConfigurer.java:35)
at org.gradle.api.internal.project.AbstractProject.configure(AbstractPro
ject.java:463)
at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractP
roject.java:458)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuil
dConfigurer.java:35)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:141)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:112)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:80)
at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReporti
ngAction.java:32)
at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReporti
ngAction.java:21)
at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execut
e(CommandLineActionFactory.java:219)
at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execut
e(CommandLineActionFactory.java:203)
at org.gradle.launcher.Main.execute(Main.java:55)
at org.gradle.launcher.Main.main(Main.java:40)
at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:
46)
at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja
va:33)
at org.gradle.wrapper.Wrapper.execute(Wrapper.java:87)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:37)
Caused by: groovy.lang.MissingPropertyException: Could not find property 'org' o
n root project 'grails-2.0.1'.
at org.gradle.api.internal.AbstractDynamicObject.propertyMissingExceptio
n(AbstractDynamicObject.java:43)
at org.gradle.api.internal.AbstractDynamicObject.getProperty(AbstractDyn
amicObject.java:35)
at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeD
ynamicObject.java:54)
at org.gradle.api.internal.project.DefaultProject_Decorated.getProperty(
Unknown Source)
at org.gradle.groovy.scripts.BasicScript.propertyMissing(BasicScript.gro
ovy:59)
at assemble_2be0amk65dsfi1le6c3b1ao87h.run(R:\dev\grails-2.0.1\gradle\as
semble.gradle:56)
at org.gradle.groovy.scripts.DefaultScriptRunnerFactory$ScriptRunnerImpl
.run(DefaultScriptRunnerFactory.java:49)
... 40 more
BUILD FAILED
Total time: 3.287 secs
R:\dev\grails-2.0.1>
I'm running Grails on a Windows 7 machine and had no problems. My environment variables look like this:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_25
GRAILS_HOME=C:\grails-1.3.8
No problems getting it to run. But it runs horribly slowly, which it did not do on my xp machine.
Try setting your JAVA_HOME to something like "C:\Program Files\Java\jre7" i.e.to the jre folder instead of JDK folder inside Java directory.(Refer this SO post) This worked for me.
You might be adding quotes to the RC file.
This is the contents of my %USERPROFILE%\\.groovy\preinit.bat:
set GROOVY_HOME=C:\Path\To\Groovy<br/>
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_92

Categories

Resources