Note that there are some explanatory texts on larger screens.

plurals
  1. PORequestCycle goes null when using a separate thread
    text
    copied!<p>I am using a separate thread to handle the processing of a file. The main thread holds the table to display to the user using a listView, and uses an AjaxSelfUpdatingTimer to refresh the list every second. </p> <p>The problem is, after processing about 100 lines in my CSV file, I keep getting a no requestCyle exception:</p> <pre><code>Exception in thread "Thread-12" org.apache.wicket.WicketRuntimeException: No RequestCycle is currently set! at org.apache.wicket.Component.getRequest(Component.java:1804) at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318) at org.apache.wicket.Page.dirty(Page.java:249) at org.apache.wicket.Page.componentStateChanging(Page.java:926) at org.apache.wicket.Component.addStateChange(Component.java:3528) at org.apache.wicket.Component.error(Component.java:1225) at com.wicket.BulkLoadPage$BatchLoaderProcessingThread.processLine(BulkLoadPage.java:806) at com.wicket.BulkLoadPage$BatchLoaderProcessingThread.run(BulkLoadPage.java:674) at java.lang.Thread.run(Thread.java:662) </code></pre> <p>these are my runnable classes the thread calls:</p> <pre><code>class BatchLoaderProcessingThread implements Runnable { @Override public void run() { processLine(); loaderFinished(); } public void cancelThread() { cancelLoaderThread = true; } } class BatchDeleteProcessingThread implements Runnable { @Override public void run() { processLine(); deleterFinished(); } public void cancelThread() { cancelDeleterThread = true; } } </code></pre> <p>I don't understand why the requestCycle would just go null.. How can I prevent this from happening?</p> <p>Edit:</p> <p>Commenting out feedback message do troubleshoot requestRecycle error, I receive this error:</p> <pre><code> java.io.IOException: Read error at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(FileInputStream.java:220) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) at java.io.InputStreamReader.read(InputStreamReader.java:167) at java.io.BufferedReader.read1(BufferedReader.java:185) at java.io.BufferedReader.read(BufferedReader.java:261) at java.io.BufferedReader.fill(BufferedReader.java:136) Dec 30 13:14:31 ERROR BulkLoadPage-java.io.IOException: Read error at java.io.BufferedReader.readLine(BufferedReader.java:299) at java.io.BufferedReader.readLine(BufferedReader.java:362) at au.com.bytecode.opencsv.CSVReader.getNextLine(CSVReader.java:266) at au.com.bytecode.opencsv.CSVReader.readNext(CSVReader.java:233) at com..wicket.BulkLoadPage.processLine(BulkLoadPage.java:547) at com..wicket.BulkLoadPage.access$0(BulkLoadPage.java:532) at com..wicket.BulkLoadPage$BatchLoaderProcessingThread.run(BulkLoadPage.java:1294) at java.lang.Thread.run(Thread.java:662) </code></pre> <p>this error only occurs with the larger file as well. All of the lines inside the csv are duplicate only to mimic a large file.. so all lines are the same, and there shouldn't be an error caused directly from the file. Is there something else that I should be looking for that would cause this error from using another thread?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload