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

조회 수: 5 (최근 30일)
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
Jakub Kozlowski
Jakub Kozlowski 2015년 7월 22일
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.

댓글을 달려면 로그인하십시오.

답변 (2개)

Heber Kaiser
Heber Kaiser 2015년 7월 23일
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
Jakub Kozlowski
Jakub Kozlowski 2015년 7월 23일
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.

댓글을 달려면 로그인하십시오.


Finley Gibson
Finley Gibson 2015년 8월 14일
Exact same problem here. Added no new hardware, just happened overnight.
Tried updating java, Tried a complete reinstall of Matlab,
No luck.
  댓글 수: 2
Steven Lord
Steven Lord 2015년 8월 14일
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 2015년 8월 16일
I finally gave up after a week of searching for a solution and reinstalled Matlab. That helped alright.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by