What is the cause of "Could not initialize class com.mathwo​rks.hg.uti​l.HGPeerQu​eue" java error?

5 Ansichten (letzte 30 Tage)
Hello, I am experiencing a major breakdown of Matlab's functionality due to a series of errors, which relate to a group of java.lang.NoClassDefFoundError errors.
They occur in following situations (found so far):
1. on opening .fig files
> Error using textwrap (line 82)
> Java exception occurred: java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.hg.util.HGPeerQueue
> at com.mathworks.hg.util.HGUtils.invokeLater(HGUtils.java:59)
> at com.mathworks.hg.peer.FigurePeer.causeExpose(FigurePeer.java:2948)
> Error in msgbox (line 273)
[WrapString,NewMsgTxtPos]=textwrap(MsgHandle,BodyTextString,75);
> Error in errordlg (line 47)
handle = msgbox(ErrorStringCell,DlgName,'error',Replace);
> Error in uiopen (line 187) errordlg(ex.getReport('basic', 'hyperlinks', 'off'));
2. on opening .xls files from directory
(same error mssg as in point 1)
3. on creating a figure
>> figure
> Java exception occurred: > java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.hg.util.HGPeerQueue
> at com.mathworks.hg.util.HGUtils.invokeLater(HGUtils.java:59)
> at com.mathworks.hg.peer.FigurePeer.causeExpose(FigurePeer.java:2948)
4. on opening GUIDE
>> guide
> Error using javacomponentundoc_helper (line 112)
> Java exception occurred:
> java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.hg.util.HGPeerQueue
> at com.mathworks.hg.util.HGUtils.invokeLater(HGUtils.java:59)
> at com.mathworks.hg.peer.FigureChild.add(FigureChild.java:56)
> at com.mathworks.hg.peer.UIComponentManager.addchild(UIComponentManager.java:155)
> at com.mathworks.hg.peer.UIComponentManager.addchild(UIComponentManager.java:149)
> at com.mathworks.hg.peer.FigurePanel.addchild(FigurePanel.java:301)
> at com.mathworks.hg.peer.FigureMediator.addchild(FigureMediator.java:414)
> at com.mathworks.hg.peer.FigurePeer.addchild(FigurePeer.java:1115)
> Error in javacomponent (line 113)
> [hcomponent, hcontainer] = javacomponentundoc_helper(varargin{:});
> Error in guidetemplate (line 25)
> [jc, hc] = javacomponent(quickstartpanel, [], hDialog);
> Error in guide (line 69)
> guidetemplate;
5. on plotting
>> plot(x,y)
> Error using clo (line 79)
> Java exception occurred:
> java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.hg.util.HGPeerQueue
> at com.mathworks.hg.util.HGUtils.invokeLater(HGUtils.java:59)
> at com.mathworks.hg.peer.FigurePeer.causeExpose(FigurePeer.java:2948)
> Error in cla (line 35)
> clo(ax, extra{:});
> Error in newplot>ObserveAxesNextPlot (line 124)
> cla(ax, 'reset',hsave);
> Error in newplot (line 73)
> ax = ObserveAxesNextPlot(ax, hsave);
I am really desperate for a solution to this problem as it preventing any substantial work with Matlab.
Help greatly appreciated.
  1 Kommentar
Jakub Kozlowski
Jakub Kozlowski am 22 Jul. 2015
I should add that I work with an external LCD display and, at the same time, laptop's screen disabled and all has been working just fine for almost a year, until last week when I plugged a different display to my laptop. Even then all was OK, but when I returned to using initial display all those errors occurred.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Heber Kaiser
Heber Kaiser am 23 Jul. 2015
Jakub,
I am having the same trouble, although I did not any changes to my computer. It's something about update, either Matlab or Java. I tried to use Matlab in another computer with Win7, and the problems still.
--- Win Vista, Matlab 2014a
  1 Kommentar
Jakub Kozlowski
Jakub Kozlowski am 23 Jul. 2015
Heber,
I updated java to the latest version but it solved nothing. I only think that the situation with swaping displays is the root of my problem because it seems these errors are somewhat related to how the software displays things (i.e. 'error using textwrap', 'error using newplot' and so on...). I'm also working on Win Vista and Matlab 2014a.
I just hope that the fix isn't going to be Matlab reinstallation because I don't see how I can do it every time I need to plug a different display, be it a monitor or projector.

Melden Sie sich an, um zu kommentieren.


Finley Gibson
Finley Gibson am 14 Aug. 2015
Exact same problem here. Added no new hardware, just happened overnight.
Tried updating java, Tried a complete reinstall of Matlab,
No luck.
  2 Kommentare
Steven Lord
Steven Lord am 14 Aug. 2015
Please contact Technical Support (using the Contact Us link in the upper-right corner of mathworks.com) and work with them to determine the cause of this behavior.
Jakub Kozlowski
Jakub Kozlowski am 16 Aug. 2015
I finally gave up after a week of searching for a solution and reinstalled Matlab. That helped alright.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by