Nullpointer exception at com.sun.faces.config.InitFacesContext.cleanupInitMaps - jsf

I am not able to deploy my war file into tomcat server. I am ending up with the below exception.
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/BatchApp-1.0.0.M1]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.sun.faces.config.InitFacesContext.cleanupInitMaps(InitFacesContext.java:281)
at com.sun.faces.config.InitFacesContext.<init>(InitFacesContext.java:107)
at com.sun.faces.config.FacesInitializer.onStartup(FacesInitializer.java:115)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5280)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
May 11, 2013 5:28:05 PM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive C:\AppDev\Tomcat7.0\webapps\BatchApp-1.0.0.M1.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/BatchApp-1.0.0.M1]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I further debugged it and looks like at the below code #getInitContextServletContextMap() method in com.sun.faces.config.InitFacesContext I am ending up with null pointer being returned.
static Map getInitContextServletContextMap() {
ConcurrentHashMap initContextServletContext = null;
try {
Field initContextMap = FacesContext.class.getDeclaredField("initContextServletContext");
initContextMap.setAccessible(true);
initContextServletContext = (ConcurrentHashMap)initContextMap.get(null);
} catch (Exception e) {
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.log(Level.FINEST, "Unable to get (init context, servlet context) map", e);
}
}
return initContextServletContext;
}
It is cleared that the server is looking for "initContextServletContext", but where to set this?
Please let me know how can I resolve this issue.

Had the exact same error. It was a dependency issue: I was using Oracle's implementation of JSF (2.2.1), but one of my Maven dependencies was pulling in Apache MyFaces.
What happened is that the code snippet that you show, which is from the Oracle impelementation, tries to access a static private field of FacesContext. But the classloader has loaded the MyFaces implementation of FacesContext, which doesn't have that field. Therefore barf.
Check your dependencies. I bet you will find that you've got two different versions or two different implementations of JSF.

Related

Nullpointerexception during scene update in Javafx application

I'm developing a big java fx application with http communication, sockets etc.. The content of the messages update the GUI-elements. I am aware of the fact that I need to call Platform.runlater() whenever I want to update a javafx element from a normal thread. I am 99% sure, I have this everywhere. But the application is quite big and not everything is done by myself.
To give some more information, there is a TimerTask every 100ms which creates an Image from a byte-array. The call for imageView.setImage(image) is done in Platform.runlater().
However, I get the following error (using java 1.8.0.0_102):
2017-01-20T05:03:47,030 FATAL [JavaFX Application Thread] uncaughtException - Thread[JavaFX Application Thread,5,main]
java.lang.NullPointerException
at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Unknown Source) ~[jfxrt.jar:?]
at javafx.scene.Scene$ScenePulseListener.pulse(Unknown Source) ~[jfxrt.jar:?]
at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Unknown Source) ~[jfxrt.jar:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_77]
at com.sun.javafx.tk.Toolkit.runPulse(Unknown Source) ~[jfxrt.jar:?]
at com.sun.javafx.tk.Toolkit.firePulse(Unknown Source) ~[jfxrt.jar:?]
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source) ~[jfxrt.jar:?]
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source) ~[jfxrt.jar:?]
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(Unknown Source) ~[jfxrt.jar:?]
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) ~[jfxrt.jar:?]
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) ~[jfxrt.jar:?]
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source) ~[jfxrt.jar:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_77]
Any suggestions how to find the source of this error? As I mentioned above I checked all threads that nothing fx related is called on an fx thread. What I am not sure, are you allowed to load an Image (a Java FX Image) on a non fx thread? I tested it in a small sample application and it gave no error..
Edit
I found this question: same error, but I tried to force the scene update with no luck.
Thanks for any ideas!

Null Point Exception when loading fxml file from controller of another fxml file

I'm facing the same problem!
I was adding an ImageView to a Button and add image path to that ImageView in FXML file using SceneBuilder. This was working fine when I run it through Eclipse IDE but not when run as jar file.
After removing the ImageView from the Button, it started to work fine even when run as jar.
But, now I'm stuck with the same problem in different scenario!
I'm using 3 FXML files to build up the entire window.
MainWindow (Border Pane) -- this contains a Menu bar and Tool bar added to the top position of the border pane.
CenterWindow (Anchor Pane)
ButtomWindow (Anchor Pane)
In the controller of the MainWindow I'm trying to add the CenterWindow and ButtomWindow which are in different fxml files.
But, NullPointerException occurs in the MainWindow Controller at the line where I'm trying to load the fxml file. It says Location is required in the exception.
I have extraced the jar file and checked, the fxml files are there inside the jar.
Can someone please help.
Package Structure:
com.example.app -- contains Main.java which has main() method
com.example.app.controller -- MainWindowController.java, CenterWindowController.java, ButtomWindowController.java
com.example.app.view -- MainWindow.fxml, CenterWindow.fxml, ButtomWindow
In Main.java I'm loading MainWindow.fxml which loads fine. Then in MainWindowController.java I'm trying to load CenterWindow.fxml & ButtomWindow which gives exception.
Exception log:
javafx.fxml.LoadException:
file:/C:/Users/a27490989/Documents/NetBeansProjects/AirbusDS/dist/AirbusDS.jar!/
ds/airbus/simulator/view/MainWindow.fxml
at javafx.fxml.FXMLLoader.constructLoadException(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at ds.airbus.simulator.Main.start(Main.java:22)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(Unknown Source)
at com.sun.javafx.application.LauncherImpl$$Lambda$51/747183799.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$44/584634336.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$164(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/94326726.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$45/501263526.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$37/96639997.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at ds.airbus.simulator.controller.MainWindowController.initOutputView(MainWindowController.java:214)
at ds.airbus.simulator.controller.MainWindowController.initialize(MainWindowController.java:204)
... 23 more
I was trying to load the fxml files using getClass().getResource(../view/Output.fxml") which was giving exception when run from jar.
Instead using ClassLoader.getSystemResource("com/example/app/view/Output.fxml")
or getClass().getResource("/com/example/app/view/Output.fxml")
will solve the problem.

Xpages error on one database in XPINC

My Xpages app on the server runs fine for everyone except one user. I have an Xpage that let's the user select from some drop downs and then does a partial refresh on a view container that subsets the view. Works great.
When he makes selections sometimes the partial refresh does not fire. Also, when he goes to the page two date values are already filled in (with June 4, 2014) when they should not be filled in.
I VNCed into his machine and looked at the Xpages error log. He has strange errors that I have never seen before.
I googled this to no avail.
Any Java experts that have some idea what this means.
Is there something stuck in his local cache that is causing this, that I can just delete?
Bryan
6/4/14 12:25 PM: Exception Thrown
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at com.ibm.ws.io.Stream.write(Unknown Source)
at com.ibm.ws.io.WriteStream.flushMyBuf(Unknown Source)
at com.ibm.ws.io.WriteStream.write(Unknown Source)
at com.ibm.ws.http.ResponseStream.writeChunk(Unknown Source)
at com.ibm.ws.http.ResponseStream.flushBuffer(Unknown Source)
at com.ibm.ws.http.ResponseStream.write(Unknown Source)
at com.ibm.ws.io.WriteStream.write(Unknown Source)
at com.ibm.ws.webcontainer.srt.SRTOutputStream.write(Unknown Source)
at com.ibm.wsspi.webcontainer.util.BufferedServletOutputStream.writeOut(Unknown Source)
at com.ibm.wsspi.webcontainer.util.BufferedServletOutputStream.write(Unknown Source)
at com.ibm.commons.util.io.ByteStreamCache.copyTo(Unknown Source)
at com.ibm.xsp.webapp.XspHttpServletResponse.commitResponse(Unknown Source)
at com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
at com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
at com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)
console_WS0994_2014_06_04#12_24_25.log
[0710:0002-1924] 06/04/2014 12:24:25.52 PM DeskClientOpenInt> Calling CreateProgramRCP pszRCPCmdLine[/authenticate "=C:\Program Files\IBM\Notes\notes.ini"] bDeskProvisioningRestart [0]
[0710:0002-1924] 06/04/2014 12:24:25.52 PM DeskClientOpenInt> DESK_CHECKNOTES2ALIVE_TIMER started
[0710:0002-1924] 06/04/2014 12:24:25.52 PM DeskClientOpenInt> Executed CreateProgramRCP
[1438:0002-0550] 06/04/2014 12:24:29.67 PM InitGlobalProcessInfo> PID [5176]!= [0]
[0710:0002-1924] 06/04/2014 12:24:37 PM Connected to server KC1/Scoular
[1D24:0002-0588] 06/04/2014 12:24:57 PM Dynamic Client Configuration started
[1D24:0002-0588] 06/04/2014 12:24:57 PM Initializing Dynamic Client Configuration
[1D24:0002-0588] 06/04/2014 12:24:57 PM Dynamic Client Configuration updating policy information
[1D24:0002-0588] 06/04/2014 12:24:57 PM Dynamic Client Configuration: Applying policy bookmarks
[1D24:0002-0588] 06/04/2014 12:24:58 PM Dynamic Client Configuration updating location information
[1D24:0002-0588] 06/04/2014 12:24:58 PM Dynamic Client Configuration updating location information using policy
[1D24:0002-0588] 06/04/2014 12:24:58.01 PM DynConfig> Found $DPLocked field: $DPLocked on policy note. Copying to location doc
[1D24:0002-0588] 06/04/2014 12:24:58.01 PM DynConfig> Found $DPLocked field: $DPLockedUnstripped on policy note. Copying to location doc
[1D24:0002-0588] 06/04/2014 12:24:58 PM Dynamic Client Configuration shutdown
6/4/14 12:25 PM: Exception Thrown
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at com.ibm.ws.io.Stream.write(Unknown Source)
at com.ibm.ws.io.WriteStream.flushMyBuf(Unknown Source)
at com.ibm.ws.io.WriteStream.write(Unknown Source)
at com.ibm.ws.http.ResponseStream.writeChunk(Unknown Source)
at com.ibm.ws.http.ResponseStream.flushBuffer(Unknown Source)
at com.ibm.ws.http.ResponseStream.write(Unknown Source)
at com.ibm.ws.io.WriteStream.write(Unknown Source)
at com.ibm.ws.webcontainer.srt.SRTOutputStream.write(Unknown Source)
at com.ibm.wsspi.webcontainer.util.BufferedServletOutputStream.writeOut(Unknown Source)
at com.ibm.wsspi.webcontainer.util.BufferedServletOutputStream.write(Unknown Source)
at com.ibm.commons.util.io.ByteStreamCache.copyTo(Unknown Source)
at com.ibm.xsp.webapp.XspHttpServletResponse.commitResponse(Unknown Source)
at com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
at com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
at com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(Unknown Source)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)
Is the XPiNC app set to run locally or on the server? It may have an impact. From that I'd check the settings with a user for whom it works, particularly ECL settings (unless those are enforced via a policy).
It looks like it's hitting an error when writing, using the socket. XPiNC adds a port number onto localhost. Is there a conflict with another application on the PC using the port? That could explain occasional issues and explain why it was only happening for one user. You should be able to use the XSPUrl class to find the port, if it's not anywhere else.
The other thing that springs to mind is checking access to temp folders where it serializes / deserializes page data, though I would expect that to result in consistent failing. XPages Portable Command Guide would probably tell you the default locations.
The date problem sounds very strange and isn't explained by any of the things I've mentioned so far, but it may be a separate issue.

MATLAB (2013b) "doc" cannot load libxul.so from Java on Linux system

After successful installation of MATLAB R2013b on openSUSE 13.1 64bit I have got the following error message when I try to open MATLAB Help via "doc" command (see attached message).
MATLAB Help window always shows corrupted formatting and/or rendering of the text content.
>> doc
Exception in thread "XPCOMMessageLoop" java.lang.UnsatisfiedLinkError: /opt/MATLAB/R2013b/sys/jxbrowser/glnxa64/xulrunner/xulrunner-linux-64/libxul.so: dlopen: cannot load any more object with static TLS
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.c(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.a(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.MozillaToolkit.initialize(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.AppShellXPCOMThread$b.run(Unknown Source)
Exception in thread "XPCOMMessageLoop" java.lang.UnsatisfiedLinkError: /opt/MATLAB/R2013b/sys/jxbrowser/glnxa64/xulrunner/xulrunner-linux-64/libxul.so: dlopen: cannot load any more object with static TLS
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.c(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.a(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.MozillaToolkit.initialize(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.AppShellXPCOMThread$b.run(Unknown Source)
Exception in thread "XPCOMMessageLoop" java.lang.UnsatisfiedLinkError: /opt/MATLAB/R2013b/sys/jxbrowser/glnxa64/xulrunner/xulrunner-linux-64/libxul.so: dlopen: cannot load any more object with static TLS
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.c(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.a(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.MozillaToolkit.initialize(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.AppShellXPCOMThread$b.run(Unknown Source)
Exception in thread "XPCOMMessageLoop" java.lang.UnsatisfiedLinkError: /opt/MATLAB/R2013b/sys/jxbrowser/glnxa64/xulrunner/xulrunner-linux-64/libxul.so: dlopen: cannot load any more object with static TLS
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.c(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.a(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.MozillaToolkit.initialize(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.AppShellXPCOMThread$b.run(Unknown Source)
Exception in thread "XPCOMMessageLoop" java.lang.UnsatisfiedLinkError: /opt/MATLAB/R2013b/sys/jxbrowser/glnxa64/xulrunner/xulrunner-linux-64/libxul.so: dlopen: cannot load any more object with static TLS
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.c(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.impl.linux.LinuxMozillaToolkit.a(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.MozillaToolkit.initialize(Unknown Source)
at com.teamdev.jxbrowser.gecko.xpcom.AppShellXPCOMThread$b.run(Unknown Source)
MEvent. CASE!
MEvent. CASE!
MEvent. CASE!
MEvent. CASE!
MEvent. CASE!
MEvent. CASE!
>>
this is Linux specific bug of Matlab R2012b and higher (official Mathworks bug report)
You could try to execute doc one you startup Matlab and can hope that at this point the necessary libraries can be loaded.
EDIT: quoting from the Mathworks bug report:
On Linux machines, when performing linear algebra operations such as matrix multiplications, MATLAB could return the following error:
>> b = ones(10)*ones(10);
Error using *
BLAS loading error:
dlopen: cannot load any more object with static TLS
Any subsequent linear algebra operations will return the same error. You must restart MATLAB in order to perform further linear algebra operations.
Workaround
This issue has to do with the loading order of MATLAB's linear algebra library. To work around this issue, load the linear algebra library early in a MATLAB session, by performing a linear algebra operation immediately after MATLAB starts. For example, perform a matrix multiplication:
>> ones(10)*ones(10);
You can also add the above command to your startup.m file to make MATLAB run it at startup.
I've had the same problem in MATLAB 2014a, but the mathworks support could help me. Their solution was to run
webutils.htmlrenderer('basic');
in the command window. See Bug 1003952.
Even in MATLAB 2015a the bug is still present.

Encoding in Scene Builder

I generate an FXML file with Scene Builder. I need it to contain some cirillic text.
When i edit this file with Scene Builder i can see normal cirillic letters (screen 1)
After compileing and running my program with this FXML file, i can see not cirillic letters, but some artefacts (screen 2)
But, as you can see on the screen 3, its xml file encoding is UTF-8. Also, you can see there that it is saved in ANSI.
I've tried to open it with other editors (default eclipse and sublime text 2) and they shoen wrong encoding either. (screen 4 and screen 5)
At first i've tried to convert it from ansi to utf-8 (with notepad++).
After that eclipse and sublime text 2 started display cirillic letters as they must be.
But. Scene builder gave an error, when i've tried to open this file with it:
Error loading file
C:\eclipse\workspace\pr\src\main\java\ru\i\ava\pr\test.fxml.
C:\eclipse\workspace\pr\src\main\java\ru\i\ava\pr\test.fxml:1: ParseError
at [row,col]:[1,1]
Message: Content is not allowed in prolog.
And java compiler gave me an error:
июн 08, 2012 8:11:03 PM javafx.fxml.FXMLLoader logException
SEVERE: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
/C:/eclipse/workspace/pr/target/classes/ru/i/ava/pr/test.fxml:1
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at ru.i.ava.pr.PrFX.start(PrFX.java:22)
at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at com.sun.javafx.application.LauncherImpl.access$000(Unknown Source)
at com.sun.javafx.application.LauncherImpl$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javafx.fxml.LoadException: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,1]
Message: Content is not allowed in prolog.
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at ru.i.ava.pr.PrFX.start(PrFX.java:22)
at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
... 1 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)
at javax.xml.stream.util.StreamReaderDelegate.next(Unknown Source)
... 14 more
So, i've converted it back to ANSI.
And, having this file in ANSI, changed its "artefacted" text to cirillic letters manually.
Now i can see normal text when i run my program, but when i open this fixed file via Scene Builder,
Scene Builder shows me some "artefacted" text (screen 7).
So, how can i fix this situation?
I've just found that new version of Scene Builder does not have such problem.

Resources