IllegalStateException: What does it mean? - java

Can someone explain why i could get the following error?
Exception in thread "AWT-EventQueue-0"
java.lang.IllegalStateException: Peer does not exist while invoking
the increaseComponentCount() method at
java.awt.Container.increaseComponentCount(Container.java:3978) at
java.awt.Component.addNotify(Component.java:6917) at
java.awt.Container.addNotify(Container.java:2758) at
javax.swing.JComponent.addNotify(JComponent.java:4743) at
java.awt.Container.addImpl(Container.java:1114) at
javax.swing.CellRendererPane.addImpl(CellRendererPane.java:106) at
java.awt.Container.add(Container.java:410) at
javax.swing.CellRendererPane.paintComponent(CellRendererPane.java:134)
at
javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2115)
at
javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:2016)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1812)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at
javax.swing.JComponent.paintComponent(JComponent.java:778) at
javax.swing.JComponent.paint(JComponent.java:1054) at
javax.swing.JComponent.paintToOffscreen(JComponent.java:5221) at
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
at javax.swing.RepaintManager.paint(RepaintManager.java:1206) at
javax.swing.JComponent._paintImmediately(JComponent.java:5169) at
javax.swing.JComponent.paintImmediately(JComponent.java:4980) at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:770)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
at
javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
at javax.swing.RepaintManager.access$700(RepaintManager.java:59) at
javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705) at
java.awt.EventQueue.access$000(EventQueue.java:101) at
java.awt.EventQueue$3.run(EventQueue.java:666) at
java.awt.EventQueue$3.run(EventQueue.java:664) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:675) at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:121)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
at java.security.AccessController.doPrivileged(Native Method)

My guess is that you have some threading issue. Are you overriding incorrectly addNotify() by any chance?
http://mindprod.com/jgloss/addnotify.html

Related

Unable to start a blank activity on android studio

I get an AssertionError and it says this
"Exception in Android Support Plugin"
null
java.lang.AssertionError
at com.android.tools.idea.wizard.AddAndroidActivityPath.getDirectories(AddAndroidActivityPath.java:440)
at com.android.tools.idea.wizard.AddAndroidActivityPath.getTemplateParameterMap(AddAndroidActivityPath.java:402)
at com.android.tools.idea.wizard.AddAndroidActivityPath.performFinishingActions(AddAndroidActivityPath.java:388)
at com.android.tools.idea.wizard.DynamicWizard$2.run(DynamicWizard.java:521)
at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
at com.intellij.openapi.command.WriteCommandAction$2$1.run(WriteCommandAction.java:118)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:115)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:99)
at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:112)
at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:33)
at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:80)
at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:85)
at com.android.tools.idea.wizard.DynamicWizard.doFinishAction(DynamicWizard.java:516)
at com.android.tools.idea.wizard.DynamicWizard$FinishAction.doAction(DynamicWizard.java:594)
at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1719)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6414)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6179)
at java.awt.Container.processEvent(Container.java:2084)
at java.awt.Component.dispatchEventImpl(Component.java:4776)
at java.awt.Container.dispatchEventImpl(Container.java:2142)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209)
at java.awt.Container.dispatchEventImpl(Container.java:2128)
at java.awt.Window.dispatchEventImpl(Window.java:2492)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
at java.awt.Dialog$1.run(Dialog.java:1049)
at java.awt.Dialog$3.run(Dialog.java:1101)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1099)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:787)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:463)
at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1557)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1524)
at com.android.tools.idea.actions.NewAndroidComponentAction.actionPerformed(NewAndroidComponentAction.java:108)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:266)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:926)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:236)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:105)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
at java.awt.Component.processMouseEvent(Component.java:6414)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6179)
at java.awt.Container.processEvent(Container.java:2084)
at java.awt.Component.dispatchEventImpl(Component.java:4776)
at java.awt.Container.dispatchEventImpl(Container.java:2142)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209)
at java.awt.Container.dispatchEventImpl(Container.java:2128)
at java.awt.Window.dispatchEventImpl(Window.java:2492)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
try to remove .idea files from project. And import project again.

Android Studio - Emulator failure

I am new to android.I am using Android studio.I am trying to run my project but on starting Emulator in log says device waiting and then canceled.
I am getting this exception in log
null
java.lang.NullPointerException
at org.jetbrains.android.run.CreateAvdDialog.doOKAction(CreateAvdDialog.java:370)
at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1751)
at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1717)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6414)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6179)
at java.awt.Container.processEvent(Container.java:2084)
at java.awt.Component.dispatchEventImpl(Component.java:4776)
at java.awt.Container.dispatchEventImpl(Container.java:2142)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209)
at java.awt.Container.dispatchEventImpl(Container.java:2128)
at java.awt.Window.dispatchEventImpl(Window.java:2492)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
at java.awt.Dialog$1.run(Dialog.java:1049)
at java.awt.Dialog$3.run(Dialog.java:1101)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1099)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:787)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:463)
at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1555)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1522)
at org.jetbrains.android.run.AndroidRunningState$6.run(AndroidRunningState.java:609)
at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:165)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Please guide me and sorry if i am not cleared in my question.
Thanks

Integrating Java Look And Feel into Application in netbeans

I'm devloping a java program using netbeans
I added a look and feel to GUI application which is Synthetica AluOxide Look and Feel from this website : http://www.javasoft.de/synthetica/themes/ .
I added the Synthetica.jar and syntheticaAluOxide.jar using Add Jar/Folder dialog o my project Libraries.
and then I added this code to my class load :
import de.javasoft.plaf.synthetica.SyntheticaAluOxideLookAndFeel;
.
.
.
try
{
UIManager.setLookAndFeel(new SyntheticaAluOxideLookAndFeel());
}
catch (Exception e)
{
e.printStackTrace();
}
but when I run my application I don't get any changes, and I get this error when I click on some component in my application :
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
sun.font.FontDesignMetrics$MetricsKey.init(FontDesignMetrics.java:217)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:286)
at
sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1003)
at javax.swing.JComponent.getFontMetrics(JComponent.java:1615) at
sun.swing.MenuItemLayoutHelper.reset(MenuItemLayoutHelper.java:125)
at
javax.swing.plaf.synth.SynthMenuItemLayoutHelper.(SynthMenuItemLayoutHelper.java:119)
at
javax.swing.plaf.synth.SynthGraphicsUtils.paint(SynthGraphicsUtils.java:498)
at javax.swing.plaf.synth.SynthMenuUI.paint(SynthMenuUI.java:283) at
javax.swing.plaf.synth.SynthMenuUI.update(SynthMenuUI.java:248) at
javax.swing.JComponent.paintComponent(JComponent.java:769) at
javax.swing.JComponent.paint(JComponent.java:1045) at
javax.swing.JComponent.paintChildren(JComponent.java:878) at
javax.swing.JComponent.paint(JComponent.java:1054) at
javax.swing.JComponent.paintChildren(JComponent.java:878) at
javax.swing.JComponent.paint(JComponent.java:1054) at
javax.swing.JLayeredPane.paint(JLayeredPane.java:585) at
javax.swing.JComponent.paintChildren(JComponent.java:878) at
javax.swing.JComponent.paint(JComponent.java:1054) at
javax.swing.JComponent.paintToOffscreen(JComponent.java:5212) at
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
at javax.swing.RepaintManager.paint(RepaintManager.java:1236) at
javax.swing.JComponent._paintImmediately(JComponent.java:5160) at
javax.swing.JComponent.paintImmediately(JComponent.java:4971) at
javax.swing.RepaintManager$3.run(RepaintManager.java:796) at
javax.swing.RepaintManager$3.run(RepaintManager.java:784) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:784)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:757)
at
javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:706)
at javax.swing.RepaintManager.access$1000(RepaintManager.java:62) at
javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1651)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727) at
java.awt.EventQueue.access$200(EventQueue.java:103) at
java.awt.EventQueue$3.run(EventQueue.java:688) at
java.awt.EventQueue$3.run(EventQueue.java:686) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697) at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
sun.font.FontDesignMetrics$MetricsKey.init(FontDesignMetrics.java:217)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:286)
at
sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1003)
at javax.swing.JComponent.getFontMetrics(JComponent.java:1615) at
sun.swing.MenuItemLayoutHelper.reset(MenuItemLayoutHelper.java:126)
at
javax.swing.plaf.synth.SynthMenuItemLayoutHelper.(SynthMenuItemLayoutHelper.java:119)
at
javax.swing.plaf.synth.SynthGraphicsUtils.paint(SynthGraphicsUtils.java:498)
at
javax.swing.plaf.synth.SynthMenuItemUI.paint(SynthMenuItemUI.java:283)
at
javax.swing.plaf.synth.SynthMenuItemUI.update(SynthMenuItemUI.java:247)
at javax.swing.JComponent.paintComponent(JComponent.java:769) at
javax.swing.JComponent.paint(JComponent.java:1045) at
javax.swing.JComponent.paintChildren(JComponent.java:878) at
javax.swing.JComponent.paint(JComponent.java:1054) at
javax.swing.JComponent.paintToOffscreen(JComponent.java:5212) at
javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1512)
at
javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1443)
at
javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:311)
at javax.swing.RepaintManager.paint(RepaintManager.java:1236) at
javax.swing.JComponent._paintImmediately(JComponent.java:5160) at
javax.swing.JComponent.paintImmediately(JComponent.java:4971) at
javax.swing.RepaintManager$3.run(RepaintManager.java:796) at
javax.swing.RepaintManager$3.run(RepaintManager.java:784) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:784)
at
javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:757)
at
javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:706)
at javax.swing.RepaintManager.access$1000(RepaintManager.java:62) at
javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1651)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727) at
java.awt.EventQueue.access$200(EventQueue.java:103) at
java.awt.EventQueue$3.run(EventQueue.java:688) at
java.awt.EventQueue$3.run(EventQueue.java:686) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697) at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Did you include Synthetica's core library 'synthetica.jar'
Ensure that your classpath contains all Synthetica libraries (including
Synthetica's core library 'synthetica.jar').
Enable the Synthetica Look and Feel at startup time in your application:
import de.javasoft.plaf.synthetica.SyntheticaClassyLookAndFeel;
try {
UIManager.setLookAndFeel(new SyntheticaClassyLookAndFeel());
} catch (Exception e) {
e.printStackTrace();
}

libt2k.so error executing a jar on armv7, how to fix it?

I've compiled a simple java application with swing for GUI. If I run it on a x86 system it works properly. If I run it on armv7 (with a JVM headfull isntalled) it returns the following error:
aldo#aldo-desktop:~/test_java$ java -jar ../test_gui_jigloo_fat.jar
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: /opt/ejre1.7.0_06/lib/arm/libt2k.so: /opt/ejre1.7.0_06/lib/arm/libt2k.so: invalid ELF header (Possible cause: endianness mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1846)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at sun.font.T2KFontScaler$1.run(T2KFontScaler.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.T2KFontScaler.<clinit>(T2KFontScaler.java:41)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at sun.font.FontScaler.<clinit>(FontScaler.java:100)
at sun.font.TrueTypeFont.getScaler(TrueTypeFont.java:1248)
at sun.font.FileFontStrike.<init>(FileFontStrike.java:177)
at sun.font.FileFont.createStrike(FileFont.java:95)
at sun.font.Font2D.getStrike(Font2D.java:344)
at sun.font.Font2D.getStrike(Font2D.java:293)
at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:77)
at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359)
at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302)
at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:800)
at generic.TextPanel.paintComponent(TextPanel.java:26)
at javax.swing.JComponent.paint(JComponent.java:1054)
at javax.swing.JComponent.paintChildren(JComponent.java:887)
at javax.swing.JComponent.paint(JComponent.java:1063)
at javax.swing.JComponent.paintChildren(JComponent.java:887)
at javax.swing.JComponent.paint(JComponent.java:1063)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
at javax.swing.JComponent.paintChildren(JComponent.java:887)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
at javax.swing.JComponent.paint(JComponent.java:1040)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
at java.awt.Container.paint(Container.java:1967)
at java.awt.Window.paint(Window.java:3877)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:711)
at java.awt.EventQueue.access$000(EventQueue.java:104)
at java.awt.EventQueue$3.run(EventQueue.java:672)
at java.awt.EventQueue$3.run(EventQueue.java:670)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:681)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class sun.font.FontScaler
at sun.font.TrueTypeFont.getScaler(TrueTypeFont.java:1248)
at sun.font.FileFontStrike.<init>(FileFontStrike.java:177)
at sun.font.FileFont.createStrike(FileFont.java:95)
at sun.font.Font2D.getStrike(Font2D.java:344)
at sun.font.Font2D.getStrike(Font2D.java:293)
at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:77)
at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359)
at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302)
at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:800)
at generic.TextPanel.paintComponent(TextPanel.java:26)
at javax.swing.JComponent.paint(JComponent.java:1054)
at javax.swing.JComponent.paintChildren(JComponent.java:887)
at javax.swing.JComponent.paint(JComponent.java:1063)
at javax.swing.JComponent.paintChildren(JComponent.java:887)
at javax.swing.JComponent.paint(JComponent.java:1063)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
at javax.swing.JComponent.paintChildren(JComponent.java:887)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
at javax.swing.JComponent.paint(JComponent.java:1040)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
at java.awt.Container.paint(Container.java:1967)
at java.awt.Window.paint(Window.java:3877)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:711)
at java.awt.EventQueue.access$000(EventQueue.java:104)
at java.awt.EventQueue$3.run(EventQueue.java:672)
at java.awt.EventQueue$3.run(EventQueue.java:670)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:681)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Hot to fix it?
Thank you
You should check your libt2k.so file to see if it is really what you need - right endianness, file integrity. You can utilize readelf to see details.

NullPointerException - JOptionPane

I am getting a NullPointerException with JOptionPane on Linux with OpenJDK 1.6.0.22. I alert the user that a certain number of items must be selected. The thread is running on the Event Dispatch Thread.
JOptionPane.showMessageDialog(this, "At least one entity must be selected.",
"Selection Error", JOptionPane.ERROR_MESSAGE);
java.lang.NullPointerException
at sun.awt.X11.XWindowPeer.restoreTransientFor(XWindowPeer.java:1681)
at sun.awt.X11.XWindowPeer.removeFromTransientFors(XWindowPeer.java:1747)
at sun.awt.X11.XWindowPeer.setModalBlocked(XWindowPeer.java:1469)
at sun.awt.X11.XWindowPeer.setModalBlocked(XWindowPeer.java:1440)
at java.awt.Window.setModalBlocked(Window.java:1359)
at java.awt.Dialog.unblockWindow(Dialog.java:1597)
at java.awt.Dialog.modalHide(Dialog.java:1483)
at java.awt.Dialog.hideAndDisposePreHandler(Dialog.java:1215)
at java.awt.Dialog.hide(Dialog.java:1255)
at java.awt.Component.show(Component.java:1553)
at java.awt.Component.setVisible(Component.java:1503)
at java.awt.Window.setVisible(Window.java:881)
at java.awt.Dialog.setVisible(Dialog.java:1011)
at javax.swing.JOptionPane$3.propertyChange(JOptionPane.java:1021)
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:298)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:291)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:229)
at java.awt.Component.firePropertyChange(Component.java:8148)
at javax.swing.JOptionPane.setValue(JOptionPane.java:1964)
at javax.swing.plaf.basic.BasicOptionPaneUI$ButtonActionListener.actionPerformed(BasicOptionPaneUI.java:1201)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
at java.awt.Component.processMouseEvent(Component.java:6268)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6033)
at java.awt.Container.processEvent(Container.java:2045)
at java.awt.Component.dispatchEventImpl(Component.java:4629)
at java.awt.Container.dispatchEventImpl(Container.java:2103)
at java.awt.Component.dispatchEvent(Component.java:4455)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
at java.awt.Container.dispatchEventImpl(Container.java:2089)
at java.awt.Window.dispatchEventImpl(Window.java:2517)
at java.awt.Component.dispatchEvent(Component.java:4455)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
at java.awt.EventQueue.access$000(EventQueue.java:96)
at java.awt.EventQueue$1.run(EventQueue.java:608)
at java.awt.EventQueue$1.run(EventQueue.java:606)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
at java.awt.EventQueue$2.run(EventQueue.java:622)
at java.awt.EventQueue$2.run(EventQueue.java:620)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:194)
at java.awt.Dialog$1.run(Dialog.java:1072)
at java.awt.Dialog$3.run(Dialog.java:1126)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1124)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:871)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:668)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:639)
at com.walterjwhite.ui.api.renderer.entity.MultipleEntitySelectorRenderer.isSingleRowSelected(MultipleEntitySelectorRenderer.java:191)
at com.walterjwhite.ui.api.renderer.entity.MultipleEntitySelectorRenderer.edit(MultipleEntitySelectorRenderer.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.walterjwhite.ui.api.renderer.callback.ButtonCallbackHandler$1.actionPerformed(ButtonCallbackHandler.java:99)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
at java.awt.Component.processMouseEvent(Component.java:6268)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6033)
at java.awt.Container.processEvent(Container.java:2045)
at java.awt.Component.dispatchEventImpl(Component.java:4629)
at java.awt.Container.dispatchEventImpl(Container.java:2103)
at java.awt.Component.dispatchEvent(Component.java:4455)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
at java.awt.Container.dispatchEventImpl(Container.java:2089)
at java.awt.Window.dispatchEventImpl(Window.java:2517)
at java.awt.Component.dispatchEvent(Component.java:4455)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
at java.awt.EventQueue.access$000(EventQueue.java:96)
at java.awt.EventQueue$1.run(EventQueue.java:608)
at java.awt.EventQueue$1.run(EventQueue.java:606)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
at java.awt.EventQueue$2.run(EventQueue.java:622)
at java.awt.EventQueue$2.run(EventQueue.java:620)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Still seem like a JVM bug. I would try to upgrade your JDK version version 7 where the bug seems fixed.
Check these bug reports:
735472 NullPointerException at XWindowPeer.restoreTransientFor() using a JOptionPane
730015 NullPointerException on disposing modal dialog
Old (didn't fix your problem):
6431340 NullPointerException on Dialog hide on dual head system (non-xinerama)

Categories

Resources