Netbeans on Mac crashes at Startup when adding plugins - java

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.

Related

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

VisualVM Profile at JDK 1.7_21 crashes with "Access denied"

May be you can help me with this problem.
Profiler crashes with "Access denied" message, then i start it for any local application. In a logfile I found:
java.io.IOException: Отказано в доступе
at sun.tools.attach.WindowsVirtualMachine.openProcess(Native Method)
at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:56)
at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
at org.netbeans.modules.profiler.NetBeansProfiler.loadAgentIntoTargetJVM(NetBeansProfiler.java:762)
at org.netbeans.modules.profiler.NetBeansProfiler.attachToApp(NetBeansProfiler.java:734)
at com.sun.tools.visualvm.profiler.ApplicationProfilerView$MasterViewSupport.startProfiling(ApplicationProfilerView.java:309)
at com.sun.tools.visualvm.profiler.ApplicationProfilerView$MasterViewSupport.access$900(ApplicationProfilerView.java:140)
at com.sun.tools.visualvm.profiler.ApplicationProfilerView$MasterViewSupport$3.run(ApplicationProfilerView.java:262)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1372)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1952)
Application runs on the same JVM HotSpot 1.07.0_21 x32 (VisualVM from JDK 1.6 works fine), using just next options:
-client -Xmx1524M
Any suggestions?
UPD: OS is WindowsXP sp3 x32
Have you checked their troubleshooting section?
in particular:
Insufficient permissions for %TMP%\hsperfdata_username folder - make
sure you're able to create a file in the directory and eventually
update the permissions for full folder access. Alternatively you can
just re-create the folder which should automatically set the correct
access rights. See see this forums.sun.com thread for more details.
For me I got below error while creating the heap-dump:
[com.sun.tools.visualvm.attach.AttachModelImpl]: takeHeapDump java.io.IOException: Access is denied
I could manuallya access this folder %TMP%\hsperfdata_username.
Hence I thought of launching the visualVM in Administrator mode,It resolved the issue.
Thanks #Lorenzo for inputs.

Android Emulator plugin not working in Jenkins

When I run test on Jenkins with option create emulator I have this problem:
[android] Could not create Android emulator: Failed to run AVD
creation command
When I target existing emulator I have this problem:
FATAL:
C:\Windows\system32\config\systemprofile.android\avd\AVD_2.2.ini (The
system cannot find the path specified) java.io.FileNotFoundException:
C:\Windows\system32\config\systemprofile.android\avd\AVD_2.2.ini (The
system cannot find the path specified) at
java.io.FileInputStream.open(Native Method) at
java.io.FileInputStream.(Unknown Source) at
java.io.FileReader.(Unknown Source) at
hudson.plugins.android_emulator.util.Utils.parseConfigFile(Utils.java:436)
at
hudson.plugins.android_emulator.SdkInstaller$2.call(SdkInstaller.java:331)
at
hudson.plugins.android_emulator.SdkInstaller$2.call(SdkInstaller.java:328)
at hudson.remoting.LocalChannel.call(LocalChannel.java:45) at
hudson.plugins.android_emulator.SdkInstaller.getPlatformFromExistingEmulator(SdkInstaller.java:328)
at
hudson.plugins.android_emulator.SdkInstaller.getPlatformForEmulator(SdkInstaller.java:312)
at
hudson.plugins.android_emulator.SdkInstaller.installDependencies(SdkInstaller.java:174)
at
hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:247)
at hudson.model.Build$BuildExecution.doRun(Build.java:154) at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1488) at
hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at
hudson.model.ResourceController.execute(ResourceController.java:88) at
hudson.model.Executor.run(Executor.java:236)
I have this file.
When I run manual emulator and tests on jenkins It works.
The path shown in the second case suggests that you may be running Jenkins as a system service.
In which case, you could try the workaround listed under "Known Issues" on the Android Emulator Plugin wiki page:
Running in a Windows service as "Local System"
New AVDs cannot be generated and run if Jenkins is running as a Windows service, using the "Local System" account (see issue #7355).
Workaround: configure the Jenkins service to "run as" a real user
If that doesn't solve the problem, can you tell us in which directory AVDs are placed when you create them manually? You can find out by running emulator with the -verbose flag. Within the first few lines you should see something like:
emulator: Android virtual device file at: c:\users\foo\.android\avd\emu_4.0.3.ini

Eclipse throws org.osgi.framework.BundleException on launch

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

new to mac.Permission issue with applications

now i'm desparate. I feel like i'm turning round. when i believe solve something then i break something else.
started using this mac this week.In the process of setting up my environment i face some challenge.I got a maven project which uses cargo plugin to publish to tomcat working fine.for that i had to google to create the /etc/launchd.conf file.For some reasons web applications created in netbeans cannot publish to tomcat server i thought it was due to tomcat permission but when i set chmod 777 /Library/tomcat020
sh-3.2# ls -l /Library/tomcat6020
total 136
-rw-r--r--# 1 highjo admin 6148 Nov 4 16:03 .DS_Store i have this for file
drwxr-xr-x# 26 highjo admin 884 Nov 4 16:03 bin and this for folder
i was expecting to be rwxrwxrwx.that's the first problem.
second the first project in maven that was working is not any more.
showing
org.apache.maven.surefire.booter.SurefireExecutionException: Unable to create file for report: /myproject/target/surefire-reports/com.myproject.dao.hibernate.someDAOImplTest.txt (Permission denied); nested exception is java.io.FileNotFoundException: /myproject/target/surefire-reports/com.myproject.dao.hibernate.someDAOImplTest.txt (Permission denied); nested exception is org.apache.maven.surefire.report.ReporterException: Unable to create file for report: /myproject/target/surefire-reports/com.myproject.dao.hibernate.someDAOImplTest.txt (Permission denied); nested exception is java.io.FileNotFoundException: /myproject/target/surefire-reports/com.myproject.dao.hibernate.someDAOImplTest.txt (Permission denied)
same Exception and permission denied anytime i need to run a web app which is supposed to be published on tomcat.
Is Netbeans lacking privileges to access those files?I 'm running late to set up the developement environment.I need help! thanks for reading this
As for the chmod, you seem to be expecting recursive behavior (since you're looking at the permissions what's IN the directory that you chmod, rather than the directory itself). In that case, you should be using chmod -R.
You say chmod 777 /Library/tomcat020, but then ls /Library/tomcat6020 ( note extra 6 )

Categories

Resources