java.lang.IllegalStateException: Queue is full! Cannot process another character.

Apache's JIRA Issue Tracker | Julián Lastiri | 4 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    I'm getting the following exception while disconnecting a threaded (readerThread=true) TelnetClient connection. {code} Exception in thread "Thread-160" java.lang.IllegalStateException: Queue is full! Cannot process another character. at org.apache.commons.net.telnet.TelnetInputStream.__processChar(TelnetInputStream.java:339) at org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:647) at java.lang.Thread.run(Thread.java:722) {code} I noticed that when TelnetClient.disconnect() is called the attribute __threaded is set to false while the thread in the TelnetInputStream.run() method could call TelnetInputStream().__processChar(...) throwing IllegalStateException This is a test program to reproduce the issue {code} public class TestTelnetClient implements Runnable { /** * @param args */ public static void main(String[] args) { ArrayList<Thread> workers = new ArrayList<Thread>(); for( int i=0; i<1000; ++i){ Thread t = new Thread ( new TestTelnetClient() ); t.start(); workers.add(t); } for (Thread t : workers ) { try { t.join(); } catch (InterruptedException e) { e.printStackTrace(); } } } @Override public void run() { System.out.println("Starting thread..."); TelnetClient tc = new TelnetClient(); // tc.setReaderThread(false); try { tc.connect("localhost", 23); tc.setSoTimeout(1000); InputStream in = tc.getInputStream(); int ch; in.read(); } catch (SocketException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { System.out.println("Disconnecting..."); try { tc.disconnect(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } {code} A telnet server (telnetd) is required. I also modified the initial banner ( /etc/issue.net ) with a lot of characters to get a better chance to receive information while calling disconnect.

    Apache's JIRA Issue Tracker | 4 years ago | Julián Lastiri
    java.lang.IllegalStateException: Queue is full! Cannot process another character.
  2. 0

    I'm getting the following exception while disconnecting a threaded (readerThread=true) TelnetClient connection. {code} Exception in thread "Thread-160" java.lang.IllegalStateException: Queue is full! Cannot process another character. at org.apache.commons.net.telnet.TelnetInputStream.__processChar(TelnetInputStream.java:339) at org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:647) at java.lang.Thread.run(Thread.java:722) {code} I noticed that when TelnetClient.disconnect() is called the attribute __threaded is set to false while the thread in the TelnetInputStream.run() method could call TelnetInputStream().__processChar(...) throwing IllegalStateException This is a test program to reproduce the issue {code} public class TestTelnetClient implements Runnable { /** * @param args */ public static void main(String[] args) { ArrayList<Thread> workers = new ArrayList<Thread>(); for( int i=0; i<1000; ++i){ Thread t = new Thread ( new TestTelnetClient() ); t.start(); workers.add(t); } for (Thread t : workers ) { try { t.join(); } catch (InterruptedException e) { e.printStackTrace(); } } } @Override public void run() { System.out.println("Starting thread..."); TelnetClient tc = new TelnetClient(); // tc.setReaderThread(false); try { tc.connect("localhost", 23); tc.setSoTimeout(1000); InputStream in = tc.getInputStream(); int ch; in.read(); } catch (SocketException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { System.out.println("Disconnecting..."); try { tc.disconnect(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } {code} A telnet server (telnetd) is required. I also modified the initial banner ( /etc/issue.net ) with a lot of characters to get a better chance to receive information while calling disconnect.

    Apache's JIRA Issue Tracker | 4 years ago | Julián Lastiri
    java.lang.IllegalStateException: Queue is full! Cannot process another character.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    How can I cope with "IllegalStateException: BeanFactory not initialized or already closed"?

    Stack Overflow | 6 years ago | user569825
    java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
  5. 0

    issues in spring petclinic applicaiton

    Stack Overflow | 4 years ago | user2216702
    java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - c all 'refresh' before multicasting events via the context: Root WebApplicationCon text: startup date [Wed Mar 27 11:31:56 CDT 2013]; root of context hierarchy at org.springframework.context.support.AbstractApplic ationContext.getApp licationEventMulticaster(AbstractApplicationContex t.java:347) [spring-context-3. 2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.context.support.AbstractApplic ationContext.publis hEvent(AbstractApplicationContext.java:334) [spring-context-3.2.2.RELEASE.jar:3. 2.2.RELEASE] at org.springframework.context.support.AbstractApplic ationContext.doClos e(AbstractApplicationContext.java:1049) [spring-context-3.2.2.RELEASE.jar:3.2.2. RELEASE] at org.springframework.context.support.AbstractApplic ationContext.close( AbstractApplicationContext.java:1010) [spring-context-3.2.2.RELEASE.jar:3.2.2.RE LEASE] at org.springframework.web.context.ContextLoader.clos eWebApplicationCont ext(ContextLoader.java:558) [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.springframework.web.context.ContextLoaderListe ner.contextDestroye d(ContextLoaderListener.java:143) [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE] at org.apache.catalina.core.StandardContext.listenerS top(StandardContext .java:4831) [tomcat-embed-core-7.0.30.jar:7.0.30] at org.apache.catalina.core.StandardContext.stopInter nal(StandardContext .java:5478) [tomcat-embed-core-7.0.30.jar:7.0.30] at org.apache.catalina.util.LifecycleBase.stop(Lifecy cleBase.java:232) [ tomcat-embed-core-7.0.30.jar:7.0.30] at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:160) [tomcat-embed-core-7.0.30.jar:7.0.30] at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase. java:1559) [tomcat-embed-core-7.0.30.jar:7.0.30] at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase. java:1549) [tomcat-embed-core-7.0.30.jar:7.0.30] at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303) [n a:1.6.0_20] at java.util.concurrent.FutureTask.run(FutureTask.jav a:138) [na:1.6.0_20 ] at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExec utor.java:886) [na:1.6.0_20] at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor .java:908) [na:1.6.0_20]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Queue is full! Cannot process another character.

      at org.apache.commons.net.telnet.TelnetInputStream.__processChar()
    2. Commons Net
      TelnetInputStream.run
      1. org.apache.commons.net.telnet.TelnetInputStream.__processChar(TelnetInputStream.java:339)
      2. org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:647)
      2 frames
    3. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:722)
      1 frame