Netbeans NullpointerException at startup - macos

When I start Netbeans 6.0.1 up, I get the following error message:
java.lang.NullPointerException
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:521)
at com.sun.servicetag.RegistrationDocument.initializeDocument(RegistrationDocument.java:121)
at com.sun.servicetag.RegistrationDocument.load(RegistrationDocument.java:81)
at com.sun.servicetag.RegistrationData.loadFromXML(RegistrationData.java:392)
at org.netbeans.modules.reglib.NbServiceTagSupport.getRegistrationData(NbServiceTagSupport.java:373)
at org.netbeans.modules.reglib.NbServiceTagSupport.getNbServiceTag(NbServiceTagSupport.java:453)
at org.netbeans.modules.reglib.NbServiceTagSupport.createNbServiceTag(NbServiceTagSupport.java:171)
at org.netbeans.modules.registration.NbInstaller.restored(NbInstaller.java:98)
at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:378)
at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:297)
at org.netbeans.ModuleManager.enable(ModuleManager.java:933)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:405)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:341)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:275)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:171)
at org.netbeans.core.startup.Main.start(Main.java:322)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
[catch] at java.lang.Thread.run(Thread.java:655)
It doesn't keep Netbeans from functioning, I think, but what does it mean and how should I fix it?

Firstly, I would try a newer version of netbeans. 6.0.1 is well over 5 years old.
Also, try clearing out the netbeans cache. On linux, it's stored at $HOME/.netbeans/
Not sure where it would be stored on OSX.
As for what it means - read over this question/answer: What is a Null Pointer Exception?

Related

Throwing error while debug and run PO command in Xcode 12

When I am running application on simulator or device and try to use PO command during debug. Xcode is throwing error instead of printing value. It is happening after I have updated Xcode 12.
error: virtual filesystem overlay file
/all-product-headers.yaml' not found
error: couldn't IRGen expression. Please check the above error messages for possible root causes.
What is the solution for this ?
Any help would be appreciated.
Go to /Users/<YOUR_USER>/Library/Developer/Xcode/ and delete "DerivedData" folder.
If in the path of the missing file is the name of a framework e.g. Usabilla.build/Release-iphonesimulator/Usabilla.build/all-product-headers.yaml
Try using an older version, using version 6.4.7 of Usabilla fixed the issue for me.
If the above fixes don't work, here are some info that might help:
https://steipete.com/posts/couldnt-irgen-expression/

Starting a payara 5 has encountered

I have build a very simple project of hello world in
Payara 5 (5.181)
JSF 2.3
JDK 1.8
CDI 2.0
Maven
and encountered a problem
Unable to start server due following issues: Launch process failed with exit code 1
in console it throws an error of :
Error: Could not find or load main class server\payara5\glassfish.lib.grizzly-npn-bootstrap.jar
[PIC] Payara 5 Error
It seems that the Payara Tools for Eclipse suffer by several bugs that may cause this. In my case, the following workarounds helped:
The Payara installation path should not contain spaces (e.g. Program Files\Payara)
It seems that only Java 8 is supported at the time
Open the domain.xml configuration file for the domain you are trying to start (typically payara_install_path/glassfish/domains/domain1/config/domain1.xml) and search for "Xbootclasspath". You should find a couple of lines like
<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
<jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
<jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>
<jvm-options>[1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
Depending of your installed Java version (try running java --version) and choose the appropriate line (most likely the last one). Remove the remaining lines and remove the [...] part at the beginning of the chosen line so you will get something like
<jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
After this, the tools seem to start normally.
The Problem is with Java version. The grizzly-npn-bootstrap-1.8.1.jar Jar is placed in bootclasspath, thats why it requires proper java version to start payara server. So remove unnecessary bootstrap jar from domain.xml.
In Windows:
1) Go To ---C:\Users\xxxx\payara5\glassfish\domains\domain1\config\domain.xml
2) According to my java verson(java version "1.8.0_191") I deleted the following lines from domain.xml. So delete according to your java version.
<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
<jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
<jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>
3) Remove this [1.8.0u191|1.8.0u500] part from jvm-options & Edit the line in your domain.xml(w.r.t java -version) as shown below
<jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
4) restart your server.
As Radkovo said, "The Payara installation path should not contain spaces (e.g. Program Files\Payara)", so I moved the Payara to the Documents folder.
Problem solved!

Eclipse Oxygen fails to run - org.eclipse.swt.SWTException: Invalid thread access

I have following problem: my eclipse Oxygen fails to run(error attached).
Everything is fine on fresh instalation, when I run it just after downloading (tested on 1a september and 2 december). However, when i restart my computer, eclipse won't start again unless i will reinstall it.
I have cleared both eclipse cache as same as my project (even fetched fresh version from repo), workspace and eclipse instalation place is also fresh.
I have read e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=475392, https://bugs.eclipse.org/bugs/show_bug.cgi?id=514895 and other related posts, didn't help though.
Any idea? I am working on windows 10 64 bit, and JDK 9.0.1+11. My only plugin is BndTools 3.5, latest, project requires java 8 (current runtime jdk is 152).
Problem started on friday, 15 dec after running my project and resolving dependencies at example bnd project (http://enroute.osgi.org/tutorial_base/600-testing.html) at the same time. Couldn't run eclipse after that.
However, i did it before and didn't meet any problems (i mean opening example and running it). Also, I have cleared p2, mvn and bnd cache.
Below mentioned stack from eclipse .log:
!SESSION 2017-12-18 16:47:57.660 -----------------------------------------------
eclipse.buildId=4.7.2.M20171123-0800
java.version=9.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pl_PL
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
!ENTRY org.eclipse.osgi 4 0 2017-12-18 16:47:59.711
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.SWT.error(SWT.java:4419)
at org.eclipse.swt.widgets.Display.error(Display.java:1263)
at org.eclipse.swt.widgets.Display.checkDevice(Display.java:767)
at org.eclipse.swt.widgets.Display.addListener(Display.java:628)
at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.<init>(IDEWorkbenchAdvisor.java:187)
at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.<init>(IDEWorkbenchAdvisor.java:195)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
Diff between fresh and dirty instalation
Update
After flushing whole system, problem gone for a while, however came back again, so it eliminates OS influence in my opinion.
As Struarf mentioned in his answer, deletion of configuration/org.eclipse.osgi templorary solves problem.
Nevertheless, when i have installed oxygen 2, I noticed that this problem is much more rarer than before (actually now 2nd time for 2 weeks, whether before was with each possible occasion), so maybe it comes in a good way...
I've just commented on bug 477247. I'm getting a similar exception (on OSX). What allows me to start Eclipse without reinstalling is to delete the configuration/org.eclipse.osgi folder. It looked like a bundle cache, and deleting such caches has worked elsewhere for me. Hopefully this might also provide a clue for the devs.
You seem to hit bug 477247. Until now, Eclipse developers were not able to reproduce the issue, maybe you can help them by adding steps to reproduce to the bug, or any other useful details.

Test Case failures with a java.lang.ArrayIndexOutOfBoundsException: 28526 with JDK 8 and terracotta 3.4.0

I currently moved maven java code from jdk7 to jdk8 which uses terracotta and was working properly but after changing it to jdk8 , my test cases are getting failed. I am getting following error and I didn't get any clues through searching.
java.lang.ArrayIndexOutOfBoundsException: 28526
at com.tc.asm.ClassReader.readClass(ClassReader.java:2015)
at com.tc.asm.ClassReader.getClassName(ClassReader.java:229)
at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getClassInfo(AsmClassInfo.java:305)
at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.createClassInfoFromStream(AsmClassInfo.java:717)
at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getClassInfo(AsmClassInfo.java:256)
at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getInterfaces(AsmClassInfo.java:558)
at com.tc.aspectwerkz.expression.regexp.TypePattern.matchInterfaces(TypePattern.java:147)
at com.tc.aspectwerkz.expression.regexp.TypePattern.matchInterfaces(TypePattern.java:147)
at com.tc.aspectwerkz.expression.regexp.TypePattern.matchSuperClasses(TypePattern.java:120)
at com.tc.aspectwerkz.expression.regexp.TypePattern.matchType(TypePattern.java:92)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:437)
at com.tc.aspectwerkz.expression.ast.ASTClassPattern.jjtAccept(ASTClassPattern.java:24)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visitAnnotatedNode(ExpressionVisitor.java:1016)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:237)
at com.tc.aspectwerkz.expression.ast.ASTWithin.jjtAccept(ASTWithin.java:22)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:100)
at com.tc.aspectwerkz.expression.ast.ASTExpression.jjtAccept(ASTExpression.java:22)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:88)
at com.tc.aspectwerkz.expression.ExpressionVisitor.match(ExpressionVisitor.java:74)
at com.tc.object.config.ClassExpressionMatcherImpl.match(ClassExpressionMatcherImpl.java:24)
at com.tc.object.config.CompoundExpressionMatcher.match(CompoundExpressionMatcher.java:18)
at com.tc.object.config.StandardDSOClientConfigHelperImpl.shouldBeAdapted(StandardDSOClientConfigHelperImpl.java:1242)
at com.tc.object.bytecode.hook.impl.DefaultWeavingStrategy.transformInternal(DefaultWeavingStrategy.java:184)
at com.tc.object.bytecode.hook.impl.DefaultWeavingStrategy.transform(DefaultWeavingStrategy.java:134)
at com.tc.object.bytecode.hook.impl.DSOContextImpl.preProcess(DSOContextImpl.java:288)
at com.tc.object.bytecode.hook.impl.DSOContextImpl.transform(DSOContextImpl.java:392)
at org.terracotta.express.ClusteredStateLoader.transform(ClusteredStateLoader.java:124)
at org.terracotta.express.ClusteredStateLoader.loadClass(ClusteredStateLoader.java:83)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory$1.call(TerracottaClusteredInstanceFactory.java:319)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory$1.call(TerracottaClusteredInstanceFactory.java:317)
at org.terracotta.api.Terracotta.lookupOrCreateRoot(Terracotta.java:47)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.getStoreRoot(TerracottaClusteredInstanceFactory.java:316)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.getStoreMapForCacheManager(TerracottaClusteredInstanceFactory.java:77)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.getOrCreateStore(TerracottaClusteredInstanceFactory.java:68)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.createStore(TerracottaClusteredInstanceFactory.java:64)
at net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory.createStore(StandaloneTerracottaClusteredInstanceFactory.java:40)
Thank you
As stated in one of the comments, Terracotta 3.4.0 is not Java 8 compatible and given the way the old Terracotta version worked, this is not a surprise.
You will have to update to a later version if you must have Java 8 support.
The exact version will depend on the usage you are making of Terracotta - if you need DSO support, you have to stick with the 3.7.x line.
For Ehcache support, it is recommended to upgraded to the latest version in the 4.3.x line.

cordova windows error: "cordova/windows8/commandProxy" not found

I have built a Cordova-based Windows application. As soon as I add any plugin, the app starts crashing with the exception cordova/windows8/commandProxy not found.
Cordova version: 4.3.0
It seems that cordova/windows8/commandProxy is deprecated in Cordova 4.3.0.
I have replaced this statement in plugin file
require("cordova/windows8/commandProxy")
to
require("cordova/exec/proxy")
and it seems to work.
For example I changed line number 18 in PushPluginProxy.js from
require("cordova/windows8/commandProxy").add("PushPlugin", module.exports);
to
require("cordova/exec/proxy").add("PushPlugin", module.exports);
The name in the string varies depending on the plugin.
Alternatively, you can patch the plugin like in this pull request from the AppVersion plugin i.e.:
Change
require("cordova/windows8/commandProxy").add("AppVersion", AppVersionProxy);
to
cordova.commandProxy.add("AppVersion", AppVersionProxy);

Resources