Java-related error on start-up and when attempting to generate plots in Matlab
Show older comments
I have recently installed R2020-b, but upon launching Matlab, I get the following error message:
Exception in thread "Startup Class Loader": java.lang.NoClassDefFoundError: com/jogamp/common/os/Platform
at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:146)
at com.mathworks.hg.peer.JOGLInitializer.initializeJOGL(JOGLInitializer.java:47)
at com.mathworks.hg.peer.JOGLInitializer.<clinit>(JOGLInitializer.java:25)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mathworks.mde.desk.StartupClassLoader.loadClass(StartupClassLoader.java:258)
at com.mathworks.mde.desk.StartupClassLoader.access$1000(StartupClassLoader.java:25)
at com.mathworks.mde.desk.StartupClassLoader$2.run(StartupClassLoader.java:245)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.jogamp.common.os.Platform
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
Also, when I try to run the "plot" command, I get the following error which seems to be related to some Java files:
Exception in thread "AWT-EventQueue-0": java.lang.NoClassDefFoundError: com/jogamp/common/type/WriteCloneable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.mathworks.hg.peer.GraphicsPeerWithComponent.createJOGLCanvas(GraphicsPeerWithComponent.java:19)
at com.mathworks.hg.peer.GraphicsPeer.doCreateCanvas(GraphicsPeer.java:119)
at com.mathworks.hg.peer.GraphicsPeer.access$100(GraphicsPeer.java:16)
at com.mathworks.hg.peer.GraphicsPeer$1.run(GraphicsPeer.java:174)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: com.jogamp.common.type.WriteCloneable
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 42 more
I tried clean-copy re-instrallation several times, but that doesen't fix the issue either.
Does anyone know how I can get around this problem?
Thanks.
1 Comment
Daniel Panfili
on 2 Dec 2020
Having this issue as well, no fix yet. Following for future comments.
Accepted Answer
More Answers (5)
Craig Janssen
on 11 Dec 2020
0 votes
I am the AMP administrator for our company. We have put this exclusion - C:\Program Files\MATLAB\ as a test. I am waiting on the Matlab users to test to see if it fixes the issue.
I will update when I get feedback from users on if it works or not.
-Craig
2 Comments
Larry Stern
on 11 Dec 2020
Craig. They will need to restore glugen-rt.jar before it will work. As best I can tell amp deletes it when it accessed. I find no files in quarantine. Adding an exclusion is the first step. But not the only step to get back to a working MATLAB.
Craig Janssen
on 16 Dec 2020
Edited: Craig Janssen
on 16 Dec 2020
Larry,
It is a work in progress agreed. But some of our users are seeing the problem and others are not. So it is hard to know exactly what is going from an AMP side. I am looking over your updates for more suggestions.
Thanks,
Craig
Larry Stern
on 11 Dec 2020
Edited: Larry Stern
on 11 Dec 2020
0 votes
With Cisco amp end users can not add an exclusion. The amp administrator has to do it. Our group excluded the file glugen-rt.jar. I can send the exact string latter today. As best I can tell amp will delete the file when accessed. Looking in the quarantine list nothing is there. After amp policy sync confirms the exclusion is in place you can then move a copy of glugen-rt.jar back to its correct location. Or do a full uninstall reinstall. After that MATLAB works correctly. I’ve had some versions of MATLAB not want to fully uninstall so you need to look and either do some pretty hard windows tricks to get the file to delete or just rename the folder before you do the new install. Or that will fail on you after you waited an hour for it to complete.
Note that glugen-rt.jar goes in:
C:\Program Files\MATLAB\R20XXx\java\jarext
Where R20XXx dentoes your specific version of Matlab such as R2020a etc.
The location would differ if you installed Matlab to a location differtent from the default.
Larry Stern
on 11 Dec 2020
0 votes
Also as an FYI. I opened a case with MATLAB technical support on this topic. I have communicated my findings to them. They told me that they escalated it to the engineering team and they, in turn, will contact the correct group at Cisco in order to resolve this for the global community.
Larry Stern
on 11 Dec 2020
0 votes
I looked to see what exclusion our AMP Admin group used. It was:
glugen\-rt.*\.jar
I have tried restoring glugen-rt.jar to at least 4 different versions of Matlab and restoring this one file seems to work so far.
It migth be better to only excldue this one file vs all of the MATLAB directory structure.
4 Comments
Craig Janssen
on 16 Dec 2020
I am trying this exclusion to see if it will help. We are having some push back from users on doing a full re-installation of MatLab.
Craig
Larry Stern
on 16 Dec 2020
Edited: Larry Stern
on 16 Dec 2020
As I mentioned before, you need several thiings in place for the solution to work:
1) assuming your local organization has blocled users from adding their own exceptions to AMP, then the AMP Administrator needs to add the exclusion. Our organization is effectively excluding one file, with:
glugen\-rt.*\.jar
2) the user with the issue needs to verify that the exlusion has propogated to their local client. If not, try "sync policy" and look again.
3) You will need to locate one copy of glugen-rt.jar, as AMP seems to delete the file, or do one singe reisntall in order to get the file. As best I can tell, the same file has been in use by Matlab at least as far back as 2017x. Copy this file to Matlab's .\java\jarext folder.
4) quit Matlab if running and relaunch. Java errors gone at launch? A good test is the "bench" command, as it does some simple graphing.
Craig Janssen
on 22 Dec 2020
Larry,
We pretty much followed the steps listed above and got the issue resolved. Getting a copy of the jar file was possible from AMP console -> File repository. AMP administrator can request a copy get moved to there and then download it.
For a stop gap measure, it is working nicely.
Thanks for the starting point on how to get the issue resolved.
Craig
Larry Stern
on 22 Dec 2020
Sounds good Craig. Im not an amp administrator so I didn’t get that choice. So for anyone without access to the amp repository, they can do either a reinstall or get the file from a machine that didn’t have amp installed. Also FYI there is still no word on whether Cisco has been informed at all about any of this. Mathworks seems reluctant to do so. I opened a ticket at my university on this but got no response. I can’t open a ticket with Cisco since I’m not an amp license holder. Maybe you can try on your end.
Larry Stern
on 11 Dec 2020
Edited: Larry Stern
on 11 Dec 2020
0 votes
Note that I have no way of knowing for certain if the glugen-rt.jar file is, in fact, an infected file. Mathworks seems to be using the same file for years. So far, no user has reported any virus behaviour on any machine that has it. My suspicion is that it is a false postive by AMP. Potentially, they can fix it by using a longer signature that eliminates glugen-rt.jar from being flagged while still catching files that have whatever content they are actually looking for.
2 Comments
Craig Janssen
on 16 Dec 2020
Based on what the AMP console and Talos is showing it appears to be a false positive. AMP can be very particular on certain types of files. I figured out that I can get a copy of the jar file in question from AMP's file repo. We are trying that to see if we can avoid a full re-install.
From Talos -
SHA256
FILE SIZE 328947 bytes
SAMPLE TYPE Zip archive data, at least v1.0 to extract
AMP DETECTION NAME *Detection not found.*Limited to SHA256 lookup
ASSOCIATED DOMAINS FOR THIS HASH
Domains not available
DETECTION ALIASES
No aliases detected.
Larry Stern
on 16 Dec 2020
I'm operating under the assumption that it is a false positive, and AMP modifying their signature file so that the string is a little longer should fix it.
I opened a ticket with Mathworks on this issue.
Their engineering team is suppsoed to be contacting the folks at Cisco and hopefully come up with a solution that fixes this issue for the global community.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!