IllegalArgumentException while highlighting pdf using PDFClown - pdf

I've been working on highlighting pdf using PDFClown and mostly its working fine however in few cases its giving the exception as provided in the below stacktrace :
Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(Unknown Source)
at java.util.TimSort.mergeAt(Unknown Source)
at java.util.TimSort.mergeCollapse(Unknown Source)
at java.util.TimSort.sort(Unknown Source)
at java.util.TimSort.sort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at java.util.Collections.sort(Unknown Source)
at org.pdfclown.tools.TextExtractor.sort(TextExtractor.java:633)
at org.pdfclown.tools.TextExtractor.extract(TextExtractor.java:284)
at org.pdfclown.samples.cli.TextHighlightSample.run(TextHighlightSample.java:60)
at com.dhawan.poc.Highlight.main(Highlight.java:9)
Link to PDF File
Any idea how can I resolve this ?

Which version of PDFClown do you use? Your stack trace does not match the current code at http://svn.code.sf.net/p/clown/code/trunk/java/pdfclown.lib but instead contains the following comparison used for sorting:
public int compare(
ITextString textString1,
ITextString textString2
)
{
Rectangle2D box1 = textString1.getBox();
Rectangle2D box2 = textString2.getBox();
if(isOnTheSameLine(box1,box2))
{
/*
[FIX:55:0.1.3] In order not to violate the transitive condition, equivalence on x-axis
MUST fall back on y-axis comparison.
*/
int xCompare = Double.compare(box1.getX(), box2.getX());
if(xCompare != 0)
return xCompare;
}
return Double.compare(box1.getY(), box2.getY());
}
(http://svn.code.sf.net/p/clown/code/trunk/java/pdfclown.lib/src/org/pdfclown/tools/TextExtractor.java at revision 121)
This fix has been introduced on May 5th, 2014. If you have a PDFClown version from before 0.1.3 or a version 0.1.3 built before that date, you should update PDFClown.

Related

Upgrading to 11.4.6 causes java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.fonts.IdentityPlusMapper

Case:
Writing a docx as pdf using WordprocessingMLPackage and setting the fontMapper using IdentityPlusMapper() from org.docx4j.fonts to map the fonts in the document we receive:
java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.fonts.IdentityPlusMapper
at: getFontMapper()
This happens after upgrading from docx4j 11.2.8 to 11.4.6.
Dependencies in usage are:
org.docx4j:docx4j-core:11.4.6
org.docx4j:docx4j-export-fo:11.4.6
org.docx4j:docx4j-JAXB-ReferenceImpl:11.4.6
Is this a known issue already?
Looking forward to a possible reply!
Thanks in advance.
This assertion error is appearing from the static block of the IdentityPlusMapper or the BestMatchingMapper whatever we use. The exact line is:
PhysicalFonts.discoverPhysicalFonts();
The fix of the problem is to restrict fonts loading before the static block using font selection regex as stated in the javadoc of:
PhysicalFonts.setRegex()
The following way quickly solved the problem along with that it reduces memory utilization and the static block's execution time:
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage
.load(new ByteArrayInputStream(os.toByteArray()));
String fontRegex = ".*(Courier New|Arial|Times New Roman|Comic Sans|Georgia|Impact|Lucida Console|Lucida Sans Unicode|Palatino Linotype|Tahoma|Trebuchet|Verdana|Symbol|Webdings|Wingdings|MS Sans Serif|MS Serif).*";
if(System.getProperty("os.name").startsWith("Windows")) {
fontRegex = ".*(calibri|cour|arial|times|comic|georgia|impact|LSANS|pala|tahoma|trebuc|verdana|symbol|webdings|wingding).*";
}
PhysicalFonts.setRegex(fontRegex);
wordMLPackage.setFontMapper(new BestMatchingMapper());
Docx4J.toPDF(wordMLPackage, outputStream);
This seems to be a font loading problem. I'm on a Mac (latest Monterey) and I'm getting the same exception in the contructor call:
java.lang.AssertionError:
Expecting code not to raise a throwable but caught
java.lang.AssertionError
at org.docx4j.fonts.fop.complexscripts.fonts.GlyphPositioningTable$DeviceTable.<init>(GlyphPositioningTable.java:1778)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readPosDeviceTable(OTFAdvancedTypographicTableReader.java:1729)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readPosAnchor(OTFAdvancedTypographicTableReader.java:2053)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readMarkToLigaturePosTableFormat1(OTFAdvancedTypographicTableReader.java:2347)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readMarkToLigaturePosTable(OTFAdvancedTypographicTableReader.java:2373)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readGPOSSubtable(OTFAdvancedTypographicTableReader.java:3124)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readLookupTable(OTFAdvancedTypographicTableReader.java:3193)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readLookupList(OTFAdvancedTypographicTableReader.java:3220)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readCommonLayoutTables(OTFAdvancedTypographicTableReader.java:3241)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readGPOS(OTFAdvancedTypographicTableReader.java:3501)
at org.docx4j.fonts.fop.complexscripts.fonts.OTFAdvancedTypographicTableReader.readAll(OTFAdvancedTypographicTableReader.java:88)
at org.docx4j.fonts.fop.fonts.truetype.OpenFont.handleCharacterSpacing(OpenFont.java:895)
at org.docx4j.fonts.fop.fonts.truetype.OpenFont.readFont(OpenFont.java:867)
at org.docx4j.fonts.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:121)
at org.docx4j.fonts.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:105)
at org.docx4j.fonts.fop.fonts.FontLoader.getFont(FontLoader.java:130)
at org.docx4j.fonts.fop.fonts.FontLoader.loadFont(FontLoader.java:114)
at org.docx4j.fonts.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:262)
at org.docx4j.fonts.PhysicalFonts.getPhysicalFont(PhysicalFonts.java:307)
at org.docx4j.fonts.PhysicalFonts.addPhysicalFonts(PhysicalFonts.java:246)
at org.docx4j.fonts.PhysicalFonts.addPhysicalFont(PhysicalFonts.java:236)
at org.docx4j.fonts.PhysicalFonts.discoverPhysicalFonts(PhysicalFonts.java:183)
at org.docx4j.fonts.IdentityPlusMapper.<clinit>(IdentityPlusMapper.java:74)
at foo(...)
open fun foo(...) {
...
val mlPackage = WordprocessingMLPackage.load(ByteArrayInputStream(input))
mlPackage.fontMapper = IdentityPlusMapper() //<-- boom
}
Update (August 29th 2022): I fixed the issue by upgrading Docx4j to 11.4.7 . Additionally I had to add the following code before the call to Docx4J.toFO(...):
val fopFactoryBuilder: FopFactoryBuilder = FORendererApacheFOP.getFopFactoryBuilder(foSettings)
FORendererApacheFOP.getFOUserAgent(foSettings, fopFactoryBuilder.build())
I have fixed the same by setting regex for fonts available in Mac which's recommened by PhysicalFonts class set regex method as well.
PhysicalFonts.regex = ".*(Courier New|Arial|Times New Roman|Comic Sans|Georgia|Impact|Lucida Console|Lucida Sans Unicode|Palatino Linotype|Tahoma|Trebuchet|Verdana|Symbol|Webdings|Wingdings|MS Sans Serif|MS Serif).*"

Getting WebDriverSampler: Cannot cast org.openqa.selenium.remote.RemoteWebElement to org.openqa.selenium.By error

When I try running my jmeter webdriver sampler with the below code I am getting the error message as shown below.
var selenium = JavaImporter(org.openqa.selenium)
var time = JavaImporter(java.util.concurrent.TimeUnit)
WDS.browser.manage().timeouts().implicitlyWait(30, time.TimeUnit.SECONDS)
WDS.sampleResult.sampleStart()
WDS.log.info("Enter email batch details");
var batchNameText = WDS.browser.findElement(selenium.By.xpath("//div[contains(#data-testid,\"batchNameTextField\")]//input"))
wait.until(EC.presenceOfElementLocated(batchNameText));
batchNameText.click();
batchNameText.clear();
batchNameText.sendKeys("test");
batchNameText.SendKeys(selenium.Keys.TAB);
WDS.sampleResult.sampleEnd()
Error in log file shows as
java.lang.ClassCastException: Cannot cast
org.openqa.selenium.remote.RemoteWebElement to org.openqa.selenium.By
at java.lang.invoke.MethodHandleImpl.newClassCastException(Unknown
Source) at java.lang.invoke.MethodHandleImpl.castReference(Unknown
Source) at jdk.nashorn.internal.scripts.Script$5$^eval_.:program(
:39) at
jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
at
jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
at
jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at
jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
at
jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
at
jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
at
jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(Unknown Source) at
com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler.sample(WebDriverSampler.java:86)
at
org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638)
at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
at java.lang.Thread.run(Unknown Source)
Not sure whats the issue here. Its same as getting webelement and assigning it to a variable as what I guess.
Thanks in advance.
Looking at presenceOfElementLocated​ function JavaDoc it expects By class instance and you're passing a WebElement to it that's why your code fails.
So my expectation is that you need to change it to something like:
wait.until(EC.presenceOfElementLocated(selenium.By.xpath("//div[contains(#data-testid,\"batchNameTextField\")]//input"))
Going forward please include the full code because it's not very clear what is EC as it isn't declared anywhere.
More information on WebDriver Sampler: The WebDriver Sampler: Your Top 10 Questions Answered

How to fix NullPointerException within AnyLogic

I have been trying to fix a NullPointerException for awhile now and I am completely stumped. It is occurring in a 'seize' block, but I cannot determine what exactly is causing it.
I have a feeling it could be the code I have inputted into the seize block due to the fact that I am a beginner.
I am trying to seize another agent and send it to different parts of the world via a parameter within the 'order' agent that contains a value from 1 to 8.
On seize unit I have the following code:
if (agent.missionLocation <= 1); KC30resource1.moveTo(main.AsiaRegion.randomPointInside());
{
if (agent.missionLocation <= 2); KC30resource1.moveTo(main.AfricaRegion.randomPointInside());
}
{
if (agent.missionLocation <= 3); KC30resource1.moveTo(main.MiddleeastRegion.randomPointInside());
}
{
if (agent.missionLocation <= 4); KC30resource1.moveTo(main.EuropeRegion.randomPointInside());
}
{
if (agent.missionLocation <= 5); KC30resource1.moveTo(main.NAmericaRegion.randomPointInside());
}
{
if (agent.missionLocation <= 6); KC30resource1.moveTo(main.SAmericaRegion.randomPointInside());
}
{
if (agent.missionLocation <= 7); KC30resource3.moveTo(main.AustraliaNzRegion.randomPointInside());
}
{
if (agent.missionLocation <= 8); KC30resource2.moveTo(main.PacificRegion.randomPointInside());
}
Could this be the reason why it is happening?
Exception during discrete event execution:
NullPointerException
java.lang.NullPointerException
at com.anylogic.libraries.processmodeling.Seize.a(Unknown Source)
at com.anylogic.libraries.processmodeling.Seize.a(Unknown Source)
at com.anylogic.libraries.processmodeling.Seize.a(Unknown Source)
at com.anylogic.libraries.processmodeling.Seize.a(Unknown Source)
at com.anylogic.libraries.processmodeling.Seize.a(Unknown Source)
at com.anylogic.libraries.processmodeling.Seize.a(Unknown Source)
at com.anylogic.libraries.processmodeling.Seize.a(Unknown Source)
at com.anylogic.libraries.processmodeling.Seize$16.a(Unknown Source)
at com.anylogic.libraries.processmodeling.Seize$16.action(Unknown Source)
at com.anylogic.libraries.processmodeling.AsynchronousExecutor_xjal.executeActionOf(Unknown Source)
at com.anylogic.engine.EventTimeout.execute(Unknown Source)
at com.anylogic.engine.Engine.f(Unknown Source)
at com.anylogic.engine.Engine.gj(Unknown Source)
at com.anylogic.engine.Engine.e(Unknown Source)
at com.anylogic.engine.Engine$m.run(Unknown Source)
Expected results are that the unit will fly to the GISregion specified in the code. Each 'MoveTo' block for each region is connect to the Seize block.
Thank you in advance.
I think you are using the Seize block wrong. You are trying to tell the resource to move within the seize object but that is not how you do this, see some tutorials on that.
Instead, you set up your resource pool with your resources (Seems to be KC30 in your case). Set it up to have 10 or however many you have.
Now in Seize, make your order seize 1 KC30 from the resource pool. You may tell it to first move towards the order agent, if you like:
To make the KC30 agent move to a region with the order now, you use a "MoveTo" block after the seize block and tell the order (and its seized KC30) to your world region with your code.
PS: your if-statements could be replaced by a switch statement, it is more elegant and error-proof, check it out :-)

Get broken constrains in OptaPanner with non-reversible accumulator

I am trying to obtains list of broken constrains from a problem instance in OptaPlanner. I am using OptaPlanner version 7.0.0.Final and drools for rules engine (also 7.0.0.Final). The problem is solved correctly and without any error, but when I try to obtain broken constrains I get a NullPointer exception.
As far as I have researched, I found out, that this only happens, when I use drools accumulator without reverse operation (like max or min). Further I have made a custom accumulator, which is the exact copy from org.drools.core.base.accumulators.LongSumAccumulateFunction and everything works as expected, but as soon as I change the supportsReverse() function to return false, the NullPointer exception rises.
I have managed to reconstruct this problem in one of the provided examples - CloudBalancing. This is the change to CloudBalancingHelloWorld, it's only purpose is to obtain list of broken constraints as mentioned in this post.
public class CloudBalancingHelloWorld {
public static void main(String[] args) {
// Build the Solver
SolverFactory<CloudBalance> solverFactory = SolverFactory.createFromXmlResource(
"org/optaplanner/examples/cloudbalancing/solver/cloudBalancingSolverConfig.xml");
Solver<CloudBalance> solver = solverFactory.buildSolver();
// Load a problem with 400 computers and 1200 processes
CloudBalance unsolvedCloudBalance = new CloudBalancingGenerator().createCloudBalance(400, 1200);
// Solve the problem
CloudBalance solvedCloudBalance = solver.solve(unsolvedCloudBalance);
// Display the result
System.out.println("\nSolved cloudBalance with 400 computers and 1200 processes:\n"
+ toDisplayString(solvedCloudBalance));
//
//A Piece of code added - start
//
ScoreDirector<CloudBalance> scoreDirector = solver.getScoreDirectorFactory().buildScoreDirector();
scoreDirector.setWorkingSolution(solvedCloudBalance);
Collection<ConstraintMatchTotal> constrains = scoreDirector.getConstraintMatchTotals();
System.out.println(constrains.size());
//
//A Piece of code added - end
//
}
public static String toDisplayString(CloudBalance cloudBalance) {
StringBuilder displayString = new StringBuilder();
for (CloudProcess process : cloudBalance.getProcessList()) {
CloudComputer computer = process.getComputer();
displayString.append(" ").append(process.getLabel()).append(" -> ")
.append(computer == null ? null : computer.getLabel()).append("\n");
}
return displayString.toString();
}
}
And this is the change to requiredCpoPowerTotal rule. Please note that I have done this only to demonstrate the problem. Basicaly I have changed sum to max.
rule "requiredCpuPowerTotal"
when
$computer : CloudComputer($cpuPower : cpuPower)
accumulate(
CloudProcess(
computer == $computer,
$requiredCpuPower : requiredCpuPower);
$requiredCpuPowerTotal : max($requiredCpuPower);
(Integer) $requiredCpuPowerTotal > $cpuPower
)
then
scoreHolder.addHardConstraintMatch(kcontext, $cpuPower - (Integer) $requiredCpuPowerTotal);
end
I am really confused, because the error does not happen during planing phase, but when the scoreDirector recomputes the score to obtain broken constrains it does. I mean the same calculations must have happened during the planning phase right?
Anyway here is the stack trace
Exception in thread "main" Exception executing consequence for rule "requiredCpuPowerTotal" in org.optaplanner.examples.cloudbalancing.solver: java.lang.NullPointerException
at org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at org.drools.core.common.DefaultAgenda.handleException(DefaultAgenda.java:1256)
at org.drools.core.phreak.RuleExecutor.innerFireActivation(RuleExecutor.java:438)
at org.drools.core.phreak.RuleExecutor.fireActivation(RuleExecutor.java:379)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:135)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:88)
at org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:34)
at org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43)
at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1072)
at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1019)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1011)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1321)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1312)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1296)
at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.getConstraintMatchTotals(DroolsScoreDirector.java:134)
at org.optaplanner.examples.cloudbalancing.app.CloudBalancingHelloWorld.main(CloudBalancingHelloWorld.java:52)
Caused by: java.lang.NullPointerException
at org.drools.core.base.accumulators.JavaAccumulatorFunctionExecutor$JavaAccumulatorFunctionContext.getAccumulatedObjects(JavaAccumulatorFunctionExecutor.java:208)
at org.drools.core.reteoo.FromNodeLeftTuple.getAccumulatedObjects(FromNodeLeftTuple.java:94)
at org.drools.core.common.AgendaItem.getObjectsDeep(AgendaItem.java:78)
at org.drools.core.reteoo.RuleTerminalNodeLeftTuple.getObjectsDeep(RuleTerminalNodeLeftTuple.java:359)
at org.optaplanner.core.api.score.holder.AbstractScoreHolder.extractJustificationList(AbstractScoreHolder.java:118)
at org.optaplanner.core.api.score.holder.AbstractScoreHolder.registerConstraintMatch(AbstractScoreHolder.java:88)
at org.optaplanner.core.api.score.buildin.hardsoft.HardSoftScoreHolder.addHardConstraintMatch(HardSoftScoreHolder.java:53)
at org.optaplanner.examples.cloudbalancing.solver.Rule_requiredCpuPowerTotal1284553313.defaultConsequence(Rule_requiredCpuPowerTotal1284553313.java:14)
at org.optaplanner.examples.cloudbalancing.solver.Rule_requiredCpuPowerTotal1284553313DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at org.optaplanner.examples.cloudbalancing.solver.Rule_requiredCpuPowerTotal1284553313DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.core.phreak.RuleExecutor.innerFireActivation(RuleExecutor.java:431)
... 13 more
Thank you for any help in advance.
That NPE sounds like a bug in Drools. The ConstraintMatch API should always just work. Very that you get it against the latest master version. If so, please create a jira for this with a minimal reproducer and we'll look into it.

"Absent Code attribute in method that is not native or abstract in class" exception when starting a project in Netbeans 7.2

I've just installed the newest version of Netbeans ( 7.2 ) and tried to run an existing Swing project in it. I got the following exception:
StackTrace:
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file com/eositservices/eldorado/dialogs/zahlungverrechnung/model/InitDataList
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethod(Class.java:1935)
at java.awt.Component.isCoalesceEventsOverriden(Component.java:5975)
at java.awt.Component.access$500(Component.java:169)
at java.awt.Component$3.run(Component.java:5929)
at java.awt.Component$3.run(Component.java:5927)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Component.checkCoalescing(Component.java:5926)
at java.awt.Component.<init>(Component.java:5895)
at java.awt.Container.<init>(Container.java:249)
at javax.swing.JComponent.<init>(JComponent.java:570)
at javax.swing.JPanel.<init>(JPanel.java:65)
at javax.swing.JPanel.<init>(JPanel.java:92)
at javax.swing.JPanel.<init>(JPanel.java:100)
at com.eositservices.eldorado.masken.FormForderung.<init>(FormForderung.java:72)
at com.eositservices.eldorado.tabsheets.zahlung.TSZahlung.<init>(TSZahlung.java:183)
at com.eositservices.eldorado.masken.TFormForderung.addTabs(TFormForderung.java:366)
at com.eositservices.eldorado.masken.TFormForderung.initializeComponents(TFormForderung.java:275)
at com.eositservices.eldorado.masken.TFormForderung.configureComponents(TFormForderung.java:148)
at com.eositservices.bones.view.components.EOSInternalFrame.setUp(EOSInternalFrame.java:81)
at com.eositservices.eldorado.masken.TFormForderung.<init>(TFormForderung.java:113)
at com.eositservices.eldorado.main.MainFrame.oeffneForderung(MainFrame.java:577)
at com.eositservices.eldorado.main.MainFrame.showForderung(MainFrame.java:488)
at com.eositservices.eldorado.dev.QuickLogin.openForderung(QuickLogin.java:109)
at com.eositservices.eldorado.dev.QuickLogin.openInitialViews(QuickLogin.java:143)
at com.eositservices.eldorado.main.MainFrame$2.run(MainFrame.java:433)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
at com.eositservices.bones.view.GlobalHotkeyManager.dispatchEvent(GlobalHotkeyManager.java:163)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
The method in question looks like this:
#Override
public boolean add( InitData e ) {
boolean returnValue = super.add( e );
Collections.sort( this, c );
return returnValue;
}
The strange thing is that the exception only comes when I set the project properties to "Compile on save". When the option is unchecked it runs fine. We had no such problems in the previous versions of NetBeans. Is it just a coincidence and I should look elsewhere for the source of this error or has anyone had similar problems? Thanks in advance for your help.
It seems to be a bug in the NetBeans.
When this exception occurs, let's make an error in the code (e.g
#Override
**efefefefef**
public boolean add( InitData e ) {
boolean returnValue = super.add( e );
Collections.sort( this, c );
return returnValue;
}
)
save it and when the Netbeans displays the error, correct it back. I have tried to clear the Project, remove everything from the cache, but nothing happened. But this way helped on me.