I am getting this stack trace in applet code that worked in jre6.0.33+ but fail with this in 7.025. Can anyone help me understand why and correct?
Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
at sun.awt.SunToolkit.getSystemEventQueueImpl(Unknown Source)
at java.awt.Toolkit.getEventQueue(Unknown Source)
at java.awt.EventQueue.isDispatchThread(Unknown Source)
at javax.swing.SwingUtilities.isEventDispatchThread(Unknown Source)
at javax.swing.JComponent.revalidate(Unknown Source)
at javax.swing.JTable.resizeAndRepaint(Unknown Source)
at javax.swing.JTable.sortedTableChanged(Unknown Source)
at javax.swing.JTable.sorterChanged(Unknown Source)
at javax.swing.RowSorter.fireRowSorterChanged(Unknown Source)
at javax.swing.RowSorter.fireRowSorterChanged(Unknown Source)
at javax.swing.DefaultRowSorter.sort(Unknown Source)
at sun.swing.FilePane$DetailsTableRowSorter.access$1601(Unknown Source)
at sun.swing.FilePane$DetailsTableRowSorter$1.call(Unknown Source)
at sun.swing.FilePane$DetailsTableRowSorter$1.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 sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Mea culpa
Yes, I should have refrained and read. The problem is with sorting the dialog box. I accept my down merit punishment. I hope I can still post naive though they be. Please note this is not sarcastic, even with that statement just under pressure.
I am getting the same, and it is apparently an "incarnation" of this bug, according to this forum post. It seems to be fixed, but only in a JDK8 version. OTOH, it seems there is an "Apple patch" that fixed this in (presumably) JDK 7 (but only for Apple users).
Related
I am trying to automate BUILDS with anthill3 using remoting API but am getting an error when i try to get the Workflows from a project.
It seems the jar commons-graph.jar which is required to run this is not provided in anthill3-devkit.
As per the below link it says to download the JAr from anthill 5 , but i get an error when i try to download any fixes or release of anthill5 .
So if anybody has a resolution or the required JAR it will be very helpfull.
http://www-01.ibm.com/support/docview.wss?uid=swg1PI43350
Exception in thread "main" java.lang.NoClassDefFoundError: Lcom/urbancode /commons/graph/TableDisplayableGraph;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredField(Unknown Source)
at java.io.ObjectStreamClass.getDeclaredSUID(Unknown Source)
at java.io.ObjectStreamClass.access$700(Unknown Source)
at java.io.ObjectStreamClass$2.run(Unknown Source)
at java.io.ObjectStreamClass$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(Unknown Source)
at java.io.ObjectStreamClass.lookup(Unknown Source)
at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readClass(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readArray(Unknown Source)
From your question its hard to understand why you are getting the error and why you might need JAR from a newer version of Anthill. From what I know, even sending you the JAR won't do the job because of the different versions. Please try to explain what is exactly you try and maybe we can find another way of doing it without using upper version
Anyway how can I send it to you ? E-mail ?
Thanks,
Elyahu
I am new to optaPlanner and am trying to better learn how to use it by changing around the dinner party example to solve a different type of problem. I added a new score rule called sameSleepingPreference, which uses a new enum I created called sleepingPreference that is a property of the guest. People who have the same sleeping preference are put next to each other.
rule "sameSleepingPreference"
when
$leftDesignation : SeatDesignation($leftGuest : guest)
$rightDesignation : SeatDesignation(isRightOf($leftDesignation), $rightGuest : guest)
eval($leftGuest.sleepingPreference.equals($rightGuest.sleepingPreference))
then
scoreHolder.addConstraintMatch(kcontext, +1);
end
When I try to run optaPlanner using a data sheet of only four people, the example works fine. However, I made a longer list of 144 people by changing around one of the original data sheets from the dinner party example, and it gives me this error:
2015-07-23 10:41:59,414 [AWT-EventQueue-0] INFO Opened: data\dinnerparty\unsolved\hannahWeddingTest.xml
2015-07-23 10:42:01,012 [SwingWorker-pool-4-thread-1] INFO Solving started: time spent (97), best score (uninitialized/-14400), environment mode (REPRODUCIBLE), random (JDK with seed 0).
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Solving failed.
at org.optaplanner.examples.common.swingui.SolverAndPersistenceFrame$SolveWorker.done(SolverAndPersistenceFrame.java:297)
at javax.swing.SwingWorker$5.run(Unknown Source)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
at sun.swing.AccumulativeRunnable.run(Unknown Source)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$300(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.RuntimeException: org.optaplanner.examples.dinnerparty.solver.Rule_sameSleepingPreference1438171934Eval0Invoker#a59a25b3 : java.lang.NullPointerException
at org.drools.core.rule.EvalCondition.isAllowed(EvalCondition.java:123)
at org.drools.core.phreak.PhreakEvalNode.doLeftInserts(PhreakEvalNode.java:55)
at org.drools.core.phreak.PhreakEvalNode.doNode(PhreakEvalNode.java:39)
at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:342)
at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)
at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:231)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:106)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1016)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1302)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1289)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1262)
at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.calculateScore(DroolsScoreDirector.java:87)
at org.optaplanner.examples.dinnerparty.solver.solution.initializer.DinnerPartySolutionInitializer.initializeSeatDesignationList(DinnerPartySolutionInitializer.java:69)
at org.optaplanner.examples.dinnerparty.solver.solution.initializer.DinnerPartySolutionInitializer.changeWorkingSolution(DinnerPartySolutionInitializer.java:41)
at org.optaplanner.core.impl.phase.custom.DefaultCustomPhase.doStep(DefaultCustomPhase.java:78)
at org.optaplanner.core.impl.phase.custom.DefaultCustomPhase.solve(DefaultCustomPhase.java:60)
at org.optaplanner.core.impl.solver.DefaultSolver.runPhases(DefaultSolver.java:213)
at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:176)
at org.optaplanner.examples.common.business.SolutionBusiness.solve(SolutionBusiness.java:302)
at org.optaplanner.examples.common.swingui.SolverAndPersistenceFrame$SolveWorker.doInBackground(SolverAndPersistenceFrame.java:286)
at org.optaplanner.examples.common.swingui.SolverAndPersistenceFrame$SolveWorker.doInBackground(SolverAndPersistenceFrame.java:1)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.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 org.optaplanner.examples.dinnerparty.solver.Rule_sameSleepingPreference1438171934.eval0(Rule_sameSleepingPreference1438171934.java:8)
at org.optaplanner.examples.dinnerparty.solver.Rule_sameSleepingPreference1438171934Eval0InvokerGenerated.evaluate(Unknown Source)
at org.optaplanner.examples.dinnerparty.solver.Rule_sameSleepingPreference1438171934Eval0Invoker.evaluate(Unknown Source)
at org.drools.core.rule.EvalCondition.isAllowed(EvalCondition.java:118)
... 27 more
Is my example of 144 people just impossible to solve, or is there a different problem? I have tried making the sleeping preference rule add points and subtract points from the score, (I am using simple score) but both cause the program to fail.
This is the recommended way to write that rule, as "eval" is deprecated and drools =='s turn into equal calls:
rule "sameSleepingPreference"
when
$leftDesignation : SeatDesignation($leftGuest : guest)
$rightDesignation : SeatDesignation(isRightOf($leftDesignation), $leftGuest.sleepingPreference == guest.sleepingPreference)
then
scoreHolder.addConstraintMatch(kcontext, +1);
end
When I'm trying to start my Derby Network Server, I'm getting this exception. This has never happened before and I don't now what's the cause of problem. Any ideas?
Exception in thread "main" java.lang.NoSuchFieldError: completionKey
at sun.nio.fs.WindowsNativeDispatcher.initIDs(Native Method)
at sun.nio.fs.WindowsNativeDispatcher.<clinit>(Unknown Source)
at sun.nio.fs.WindowsLinkSupport.getRealPath(Unknown Source)
at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
at sun.util.calendar.ZoneInfoFile$1.run(Unknown Source)
at sun.util.calendar.ZoneInfoFile$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.util.calendar.ZoneInfoFile.<clinit>(Unknown Source)
at sun.util.calendar.ZoneInfo.getTimeZone(Unknown Source)
at java.util.TimeZone.getTimeZone(Unknown Source)
at java.util.TimeZone.setDefaultZone(Unknown Source)
at java.util.TimeZone.getDefaultRef(Unknown Source)
at java.util.TimeZone.getDefault(Unknown Source)
at java.text.SimpleDateFormat.initializeCalendar(Unknown Source)
at java.text.SimpleDateFormat.<init>(Unknown Source)
at java.text.DateFormat.get(Unknown Source)
at java.text.DateFormat.getDateInstance(Unknown Source)
at org.apache.derby.iapi.tools.i18n.LocalizedResource.init(Unknown Source)
at org.apache.derby.iapi.tools.i18n.LocalizedResource.<init>(Unknown Source)
at org.apache.derby.impl.drda.NetworkServerControlImpl.init(Unknown Source)
at org.apache.derby.impl.drda.NetworkServerControlImpl.<init>(Unknown Source)
at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)
This is an Error (!) that is due to running code that was compiled against a class with a field and executing it with another (compiled) version without that field.
Go back and check installed versions, recompile everything, etc. etc-
We've been struggling here at the office with a seemingly unsolvable bug in one of our (massive) applets, this one being a Java simulation of MS Word, for exam purposes. The exception seems to stem from swing itself, and I'm not sure how I would go about solving it. Here's what happens:
The applet loads with a loading screen till 100%. After this, the components are all displayed in a broken way as if some of their paint methods are not being called correctly, hovering the cursor over some buttons etc. does make them flash/display for a while. And an exception is printed to the console every second or so. (See below) This bug does NOT occur within Eclipse, only in the browser.
Summary: Applet components all get built without exceptions, but on every "paint" call of a some component (I assume), it visually bugs out and the following is printed every second:
Exception in thread "AWT-EventQueue-11" java.lang.ClassCastException: javax.swing.JLabel cannot be cast to javax.swing.text.JTextComponent
at javax.swing.text.html.EditableView.paint(Unknown Source)
at javax.swing.text.BoxView.paintChild(Unknown Source)
at javax.swing.text.BoxView.paint(Unknown Source)
at javax.swing.text.BoxView.paintChild(Unknown Source)
at javax.swing.text.BoxView.paint(Unknown Source)
at javax.swing.text.ParagraphView.paint(Unknown Source)
at javax.swing.text.html.ParagraphView.paint(Unknown Source)
at javax.swing.text.BoxView.paintChild(Unknown Source)
at javax.swing.text.BoxView.paint(Unknown Source)
at javax.swing.text.html.BlockView.paint(Unknown Source)
at javax.swing.text.BoxView.paintChild(Unknown Source)
at javax.swing.text.BoxView.paint(Unknown Source)
at javax.swing.text.html.BlockView.paint(Unknown Source)
at javax.swing.plaf.basic.BasicHTML$Renderer.paint(Unknown Source)
at javax.swing.plaf.basic.BasicLabelUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager$3.run(Unknown Source)
at javax.swing.RepaintManager$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1000(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Help would be greatly appreciated, as this is driving me nuts, I can't seem to find what triggers this, as the code is from a previous developer, and an utter mess. I have tried different JDK versions.
Thanx.
java.lang.ClassCastException: javax.swing.JLabel cannot be cast to
javax.swing.text.JTextComponent
see components tree for JTextComponents, there isn't JLabel, JLabel isn't member of JTextComponents
safest could be to test if (Xxx instanceof JTextComponent) before any casting
Found a fix to my problem. The target Java version was wrong. In the build.xml file, there were the following lines:
<property name="target" value="1.5" />
<property name="source" value="1.5" />
Changed those to 1.7, and voila! This seems to have been a Swing bug that has been fixed in the newer versions of Java.
I've noticed that this problem can occur when a JLabel with tags around the content contains nested tags. The solution is to escape the angle brackets on the
I have a peculiar situation here in an application I've programmed using a Substance LookAndFeel. In my application, as seen in the screenshot below, I have three JMenus in the MenuBar.
The one all the way on the right (Take Screenshot) is click-able and takes a screenshot of the entire application window. It has no MenuItems beneath it and works as a standalone faux "button".
Upon being clicked, it works perfectly fine. But in the console I get a HUGE block of errors related to what I'm assuming is the current L&F I'm using (seeing as this didn't happen with the System Default L&F).
Another question I would like to have answered is how to fix the opaque part of the menu's shadow, also as seen in the screenshot provided. None of this affects execution of the application in any way, I would just like them both resolved to ensure execution is optimal.
If any of my code needs to be posted to help resolve the issue, please recommend where you think thr issue is originating from (i.e. the Robot, or the L&F, or the MenuBar, or whatever). I will post whatever is needed.
edit: I have done some more exploration and it seems to occur only when any of the Menus are selected, then I hover over to the Screenshot menu. My guess is simply because it has no MenuItems to be displayed, but I could be wrong. I still haven't a clue on how to resolve the issue, though.
Here's the error log:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Recta
ngle width and height must be > 0
at java.awt.Robot.checkValidRect(Unknown Source)
at java.awt.Robot.createScreenCapture(Unknown Source)
at org.pushingpixels.substance.internal.contrib.jgoodies.looks.common.Sh
adowPopup.snapshot(ShadowPopup.java:286)
at org.pushingpixels.substance.internal.contrib.jgoodies.looks.common.Sh
adowPopup.show(ShadowPopup.java:198)
at javax.swing.JPopupMenu.getPopup(Unknown Source)
at javax.swing.JPopupMenu.setVisible(Unknown Source)
at javax.swing.JPopupMenu.show(Unknown Source)
at javax.swing.JMenu.setPopupMenuVisible(Unknown Source)
at javax.swing.JPopupMenu.menuSelectionChanged(Unknown Source)
at javax.swing.MenuSelectionManager.setSelectedPath(Unknown Source)
at javax.swing.plaf.basic.BasicMenuUI.appendPath(Unknown Source)
at javax.swing.plaf.basic.BasicMenuUI.access$200(Unknown Source)
at javax.swing.plaf.basic.BasicMenuUI$Handler.mousePressed(Unknown Sourc
e)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
This is a bug in Substance that is based on older code in JGoodies. Kirill took an older snapshot of ShadowPopup that didn't have code to check for things like zero width or height. Current versions of ShadowPopup look for that error and handle it properly.
Substance itself is no longer maintained by Kirill, but I do have a maintenence fork. Could you post this as an issue there?