The problem in the thread pool implemented by myself

Hello, I need to a thread pool in J2ME CDC 1.0 + FP 1.0, so I implemented a simple one by myself that also meets my own requirement.
Here is the main idea:
The thread pool creates a fixed number of threads in advance. When a task comes, it is put in the waiting list. All threads tries to get the tasks from the waiting list. If no task exists, the threads wait until someone wakes them up.
Here are the requirements from myself:
1. when a task has finished its work in one execution, it is put in the waiting list for the next run.
2. the task can control the delay between when the task owner tries to put it in the waiting list and when the task is actually put in the waiting list. I need this function because sometimes I don't want the tasks to run too often and want to save some CPU usage.
In my program, I creates two thread pools. In one pool, every task don't use the delay, and the thread pool works very well. The other pool has the tasks that use the delay, and sometimes, as I can see from the printed information, there are many tasks in the waiting list but 0 or 1 thread executes tasks. It seems that the waiting threads cannot wake up when new tasks comes.
I suspect the code in addTask(), but cannot find the reason why it fails. Could anyone please help me find out the bug in my code? I put the code of thread pool below
Thank you in advance
Zheng Da
ThreadPool.java
package j2me.concurrent;
import java.util.LinkedList;
import java.util.Timer;
import java.util.TimerTask;
import alvis.general.Util;
public class ThreadPool {
     private int maxQueueSize;
     private boolean running = true;
     private Thread[] threads;
     private LinkedList tasks = new LinkedList();
     private Timer timer = new Timer(true);
     private AtomicInteger usingThreads = new AtomicInteger(0);
     private synchronized boolean isRunning() {
          return running;
     private synchronized void stopRunning() {
          running = false;
     private synchronized PoolTask getTask() {
          while (tasks.isEmpty() && isRunning()) {
               try {
                    this.wait();
               } catch (InterruptedException e) {
                    e.printStackTrace();
          if (tasks.isEmpty())
               return null;
          // Util.log.info(Thread.currentThread().getName() +
          // " gets a task, left tasks: " + tasks.size());
          return (PoolTask) tasks.removeFirst();
     private synchronized void addTaskNoDelay(PoolTask task) {
          tasks.addLast(task);
          notifyAll();
     private synchronized void addTask(final PoolTask task) {
          long delay = task.delay();
          if (delay == 0) {
               addTaskNoDelay(task);
          } else {
               timer.schedule(new TimerTask() {
                    public void run() {
                         addTaskNoDelay(task);
               }, delay);
     private synchronized int numTasks() {
          return tasks.size();
     private class PoolThread extends Thread {
          public void run() {
               Util.poolThreads.inc();
               while (isRunning()) {
                    PoolTask task = getTask();
                    if (task == null) {
                         Util.poolThreads.dec();
                         return;
                    usingThreads.inc();
                    long currentTime = System.currentTimeMillis();
                    task.run();
                    long elapsedTime = System.currentTimeMillis() - currentTime;
                    if (elapsedTime > 100)
                         System.err.println(task.toString() + " takes " + ((double) elapsedTime)/1000 + "s");
                    usingThreads.dec();
                    if (!task.finish()) {
                         addTask(task);
               Util.poolThreads.dec();
     public ThreadPool(int size, int taskQueueSize) {
          maxQueueSize = taskQueueSize;
          threads = new Thread[size];
          for (int i = 0; i < threads.length; i++) {
               threads[i] = new PoolThread();
               threads.start();
     public synchronized boolean executor(PoolTask task) {
          if (!isRunning()) {
               return false;
          Util.log.info("Thread Pool gets " + task + ", there are "
                    + numTasks() + " waiting tasks");
          if (numTasks() >= maxQueueSize) {
               return false;
          addTask(task);
          return true;
     public synchronized void destroy() {
          stopRunning();
          timer.cancel();
          // TODO: I am not sure it can wake up all threads and destroy them.
          this.notifyAll();
     public synchronized void printSnapshot() {
          System.err.println("using threads: " + usingThreads + ", remaining tasks: " + tasks.size());
PoolTask.javapackage j2me.concurrent;
public interface PoolTask extends Runnable {
     * It shows if the task has already finished.
     * If it isn't, the task will be put in the thread pool for the next execution.
     * @return
     boolean finish();
     * It shows the delay in milliseconds that the task is put in the thread pool.
     * @return
     long delay();

are receiving/sends tasks packets time consuming operation in your case or not? if it is not you do not need to use thread pools at all. you can create a queue like in your code through the linked list and dispatch this queue periodically with minimum monitor usage. try this.
import java.util.LinkedList;
public class PacketDispatcher extends Thread {
    LinkedList list = new LinkedList();
    public PacketDispatcher (String name) {
        super(name);
    public void putTask(Task task) {
        synchronized (list) {
            list
                    .add(task);
            list.notify();
    public void run() {
        while (true/* your condition */) {
            Task task = null;
            synchronized (list) {
                while (list.isEmpty())
                    try {
                        list.wait();
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                task = (Task)list
                        .poll();
            if (task == null) {
                try {
                    Thread
                            .sleep(1);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                continue;
            task
                    .run();
            if (!task.isFinished()) {
                putTask(task);
            Thread
                    .yield();
    public static void main(String[] args) {
        // just for test
        try {
            Thread.sleep (10000);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        PacketDispatcher dispatcher = new PacketDispatcher("Packet Dispatcher");
        Task task = new Task();
        dispatcher.putTask(task);
        dispatcher.start();
        try {
            Thread.sleep (10000);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        Task task2 = new Task();
        dispatcher.putTask(task2);
class Task {
    long result = 0;
    public boolean isFinished () {
        if (getResult() >= 10000000) {
            return true;
        return false;
    public void run() {
        for (int i = 0; i < 1000; i++) {
            result += i;
    public long getResult () {
        return result;       
}

Similar Messages

  • How can I use the same thread pool implementation for different tasks?

    Dear java programmers,
    I have written a class which submits Callable tasks to a thread pool while illustrating the progress of the overall procedure in a JFrame with a progress bar and text area. I want to use this class for several applications in which the process and consequently the Callable object varies. I simplified my code and looks like this:
            threadPoolSize = 4;
            String[] chainArray = predock.PrepareDockEnvironment();
            int chainArrayLength = chainArray.length;
            String score = "null";
            ExecutorService executor = Executors.newFixedThreadPool(threadPoolSize);
            CompletionService<String> referee = new ExecutorCompletionService<String>(executor);
            for (int i = 0; i < threadPoolSize - 1; i++) {
                System.out.println("Submiting new thread for chain " + chainArray);
    referee.submit(new Parser(chainArray[i]));
    for (int chainIndex = threadPoolSize; chainIndex < chainArrayLength; chainIndex++) {
    try {
    System.out.println("Submiting new thread for chain " + chainArray[chainIndex]);
    referee.submit(new Parser(chainArray[i]));
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    executor.shutdown();
    int index = chainArrayLength - threadPoolSize;
    score = "null";
    while (!executor.isTerminated()) {
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    index++;
    My question is how can I replace Parser object with something changeable, so that I can set it accordingly whenever I call this method to conduct a different task?
    thanks,
    Tom                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    OK lets's start from the beginning with more details. I have that class called ProgressGUI which opens a small window with 2 buttons ("start" and "stop"), a progress bar and a text area. It also implements a thread pool to conducts the analysis of multiple files.
    My main GUI, which is much bigger that the latter, is in a class named GUI. There are 3 types of operations which implement the thread pool, each one encapsulated in a different class (SMAP, Dock, EP). The user can set the necessary parameters and when clicking on a button, opens the ProgressGUI window which depicts the progress of the respective operation at each time step.
    The code I posted is taken from ProgressGui.class and at the moment, in order to conduct one of the supported operations, I replace "new Parser(chainArray)" with either "new SMAP(chainArray[i])", "new Dock(chainArray[i])", "new EP(chainArray[i])". It would be redundant to have exactly the same thread pool implementation (shown in my first post) written 3 different times, when the only thing that needs to be changed is "new Parser(chainArray[i])".
    What I though at first was defining an abstract method named MainOperation and replace "new Parser(chainArray[i])" with:
    new Callable() {
      public void call() {
        MainOperation();
    });For instance when one wants to use SMAP.class, he would initialize MainOperation as:
    public abstract String MainOperation(){
        return new SMAP(chainArray));
    That's the most reasonable explanation I can give, but apparently an abstract method cannot be called anywhere else in the abstract class (ProgressGUI.class in my case).
    Firstly it should be Callable not Runnable.Can you explain why? You are just running a method and ignoring any result or exception. However, it makes little difference.ExecutorCompletionService takes Future objects as input, that's why it should be Callable and not Runnable. The returned value is a score (String).
    Secondly how can I change that runMyNewMethod() on demand, can I do it by defining it as abstract?How do you want to determine which method to run?The user will click on the appropriate button and the GUI will initialize (perhaps implicitly) the body of the abstract method MainOperation accordingly. Don't worry about that, this is not the point.
    Edited by: tevang2 on Dec 28, 2008 7:18 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • What is the problem in my Thread Dump's output?

    Dear all,
    Below is my Thread Dump output. I can not figure out what and where is the problem of this Thread Dump's output. Could some one please give me some hints?
    Thanks alot
    Tu
    ----------------Thread Dump's Output-----------------
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_07-b03 mixed mode, sharing):
    "TP-Monitor" daemon prio=1 tid=0xb0b14490 nid=0xfaa in Object.wait()
    [0xb08fe000..0xb08fee40]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89433f70> (a
    org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
    at org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:559)
    - locked <0x89433f70> (a
    org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "TP-Processor4" daemon prio=1 tid=0xb0b13730 nid=0xfa9 runnable
    [0xb097e000..0xb097efc0]
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
    - locked <0x89438110> (a java.net.SocksSocketImpl)
    at java.net.ServerSocket.implAccept(ServerSocket.java:450)
    at java.net.ServerSocket.accept(ServerSocket.java:421)
    at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:293)
    at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:647)
    at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:857)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    "TP-Processor3" daemon prio=1 tid=0xb0b0f6b8 nid=0xfa8 in
    Object.wait() [0xb09fe000..0xb09fef40]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89434250> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89434250> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "TP-Processor2" daemon prio=1 tid=0xb0b0fec8 nid=0xfa7 in
    Object.wait() [0xb0a7e000..0xb0a7f0c0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x894342e8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x894342e8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "TP-Processor1" daemon prio=1 tid=0xb0b14978 nid=0xfa6 in
    Object.wait() [0xb0afe000..0xb0aff040]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89434380> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89434380> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Monitor" prio=1 tid=0x08609b18 nid=0xfa5 in Object.wait()
    [0xb0cc9000..0xb0cc91c0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378950> (a
    org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
    at org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:559)
    - locked <0x89378950> (a
    org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor25" daemon prio=1 tid=0x08608ce0 nid=0xfa4
    runnable [0xb0d48000..0xb0d49140]
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
    - locked <0x89010c58> (a java.net.SocksSocketImpl)
    at java.net.ServerSocket.implAccept(ServerSocket.java:450)
    at java.net.ServerSocket.accept(ServerSocket.java:421)
    at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:60)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:407)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor24" daemon prio=1 tid=0x086085f8 nid=0xfa3 in
    Object.wait() [0xb0dc8000..0xb0dc8ec0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378ab8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89378ab8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor23" daemon prio=1 tid=0x08606dd0 nid=0xfa2 in
    Object.wait() [0xb0e48000..0xb0e48e40]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378b50> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89378b50> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor22" daemon prio=1 tid=0x08605ed0 nid=0xfa1 in
    Object.wait() [0xb0ec8000..0xb0ec8fc0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378be8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89378be8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor21" daemon prio=1 tid=0x08604fd0 nid=0xfa0 in
    Object.wait() [0xb0f48000..0xb0f48f40]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378c80> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89378c80> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor20" daemon prio=1 tid=0x086040f0 nid=0xf9f in
    Object.wait() [0xb0fc8000..0xb0fc90c0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378d18> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89378d18> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor19" daemon prio=1 tid=0x08432538 nid=0xf9e in
    Object.wait() [0xb1048000..0xb1049040]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378db0> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89378db0> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor18" daemon prio=1 tid=0x08431638 nid=0xf9d in
    Object.wait() [0xb10c9000..0xb10c91c0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378e48> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89378e48> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor17" daemon prio=1 tid=0x08430738 nid=0xf9c in
    Object.wait() [0xb1148000..0xb1149140]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378ee0> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89378ee0> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor16" daemon prio=1 tid=0x0842f838 nid=0xf9b in
    Object.wait() [0xb11c8000..0xb11c8ec0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89378f78> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89378f78> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor15" daemon prio=1 tid=0x0842e938 nid=0xf9a in
    Object.wait() [0xb1248000..0xb1248e40]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379010> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379010> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor14" daemon prio=1 tid=0x0842da38 nid=0xf99 in
    Object.wait() [0xb12c8000..0xb12c8fc0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x893790a8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x893790a8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor13" daemon prio=1 tid=0x0842cb38 nid=0xf98 in
    Object.wait() [0xb1348000..0xb1348f40]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379140> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379140> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor12" daemon prio=1 tid=0x0842bc50 nid=0xf97 in
    Object.wait() [0xb13c8000..0xb13c90c0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x893791d8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x893791d8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor11" daemon prio=1 tid=0x084f75d0 nid=0xf96 in
    Object.wait() [0xb1448000..0xb1449040]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379270> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379270> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor10" daemon prio=1 tid=0x084f66d0 nid=0xf95 in
    Object.wait() [0xb14c9000..0xb14c91c0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379308> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379308> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor9" daemon prio=1 tid=0x084f57d0 nid=0xf94 in
    Object.wait() [0xb1548000..0xb1549140]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x893793a0> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x893793a0> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor8" daemon prio=1 tid=0x08488970 nid=0xf93 in
    Object.wait() [0xb15c8000..0xb15c8ec0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379438> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379438> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor7" daemon prio=1 tid=0x08487a70 nid=0xf92 in
    Object.wait() [0xb1648000..0xb1648e40]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x893794d0> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x893794d0> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor6" daemon prio=1 tid=0x08486b90 nid=0xf91 in
    Object.wait() [0xb16c8000..0xb16c8fc0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379568> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379568> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor5" daemon prio=1 tid=0x084e3e30 nid=0xf90 in
    Object.wait() [0xb1748000..0xb1748f40]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379600> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379600> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor4" daemon prio=1 tid=0x084e2f90 nid=0xf8f in
    Object.wait() [0xb17c8000..0xb17c90c0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379698> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379698> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor3" daemon prio=1 tid=0x084e2158 nid=0xf8e in
    Object.wait() [0xb1848000..0xb1849040]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379730> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379730> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor2" daemon prio=1 tid=0x085e74d0 nid=0xf8d in
    Object.wait() [0xb18c9000..0xb18c91c0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x893797c8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x893797c8> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "http-8080-Processor1" daemon prio=1 tid=0x085e6638 nid=0xf8c in
    Object.wait() [0xb1948000..0xb1949140]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x89379860> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Object.wait(Object.java:474)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656)
    - locked <0x89379860> (a
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
    at java.lang.Thread.run(Thread.java:595)
    "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon prio=1
    tid=0x083719f8 nid=0xf8b waiting on condition [0xb1a85000..0xb1a85ec0]
    at java.lang.Thread.sleep(Native Method)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1547)
    at java.lang.Thread.run(Thread.java:595)
    "Low Memory Detector" daemon prio=1 tid=0x080a44f8 nid=0xf7f runnable
    [0x00000000..0x00000000]
    "CompilerThread0" daemon prio=1 tid=0x080a2f98 nid=0xf7e waiting on
    condition [0x00000000..0xb21b2928]
    "Signal Dispatcher" daemon prio=1 tid=0x080a2068 nid=0xf7d waiting on
    condition [0x00000000..0x00000000]
    "Finalizer" daemon prio=1 tid=0x0809c540 nid=0xf7c in Object.wait()
    [0xb24b2000..0xb24b3040]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x88f01de0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x88f01de0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=1 tid=0x0809a6b0 nid=0xf7b in
    Object.wait() [0xb2533000..0xb25331c0]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x88f01e60> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:474)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <0x88f01e60> (a java.lang.ref.Reference$Lock)
    "main" prio=1 tid=0x0805d1c8 nid=0xf79 runnable [0xbfbd9000..0xbfbda4f8]
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
    - locked <0x8946f690> (a java.net.SocksSocketImpl)
    at java.net.ServerSocket.implAccept(ServerSocket.java:450)
    at java.net.ServerSocket.accept(ServerSocket.java:421)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:388)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    "VM Thread" prio=1 tid=0x08097b58 nid=0xf7a runnable
    "VM Periodic Task Thread" prio=1 tid=0x080a5998 nid=0xf80 waiting on condition

    Thanks alot for your reply. It is a web application
    using java and tomcat server. And the problem is that
    sometime when I click on a button or a link than the
    CPU goes to 100% and it hangs but normally it works
    smoothly without any problem.This often indicates a busy retry loop somewhere. You need to acquire the thread dump when the problem occurs, but be warned that depending on the problem it may not be possible to obtain a Java-level thread dump. In that case you need to try and take an OS level thread dump - eg using pstack on solaris/linux (and there's some win32 tool as well if I recall correctly).

  • My wife was given a 5s and she sent her 4s to her daughter in Thailand to use. The problem is the 4s needs to have the imei number unlocked. We need assistance on how that can be done. We are long time Verizon customers.

    My wife was given a 5s and she sent her 4s to her daughter in Thailand to use. The problem is the 4s needs to have the imei number unlocked. We need assistance on how that can be done. We are long time Verizon customers.

    Your daughter will have to send it back to you. You will have to reactivate it on you line. You will then have to request to have it unlocked. See THIS thread for more information.

  • I have a new hard drive and itunes and my computer (windows XP) no longer recognise my ipod. I also had the problem with the registry keys not being present but this has now been fixed. However i can no longer link my ipod up with itunes.

    When I first tried itunes with my new hard drive there was the problem with the registry keys but something also flagged up about needing a signed driver. Is this anything to do with why Itunes and my computer no longer recognises when my ipod is linked up? Whatever i try under 'devices' my ipod is never available to sync up. If anyone can help I would be most grateful.

    Thanks for your reply. Unfortunately this has not worked. I didn't have quicktime to begin with so I don't know if that makes a difference? After following the instructions, I get the "registry keys missing" problem appear again (which I've subsequently fixed again) and then when I connected the ipod I got the following message - 'Device driver software was not successfully installed'.
    I've tried windows update but this doesn't do anything as '...the service is not running'.
    Any suggestions?

  • When apple will fix the problem of the Bluetooth. It is not working after the upgrade to7.03

    when apple will fix the problem of the Bluetooth. It is not working after the upgrade to7.03

    there is no problem with B/T and iOS7.0.3 in my case used on iPhone 5 and 4 in several environments including in car
    Do a reset
    restore with back up and if required as new

  • I purchased photoshop elements and i am having all the problems in the world installing it.... first the link in the emails were errors and secondly i have downloaded and installed multiple times and it says my serial number from the email i received is i

    I purchased photoshop elements and i am having all the problems in the world installing it.... first the link in the emails were errors and secondly i have downloaded and installed multiple times and it says my serial number from the email i received is incorrect.... please help

    Ok, since this forum is for Photoshop Standard and Photoshop Extended, we don't know much about Photoshop Elements. There is a Photoshop Elements forum and I'll link it for you since they best know how to field your questions.
    Photoshop Elements
    Good luck on it! 
    Gene

  • When Firefox freezes, how can I shut it down, and re-start it without it automatically going to the site which caused the problem in the first place ?

    I have Firefox set so that when I start up, I have it set so that it automatically goes to my home page. However when it freezes, which it does on a daily basis, and I have to shut it down and re-start, it automatically goes to the site which caused the problem in the first place.
    If I was a hacker, I would probably find it quite fun to design a virus to reintroduce bugs after they had been exterminated - except that Firefox seem to have got there first.

    Here's how:
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the search box above the list, type or paste '''sess''' and pause while the list is filtered
    (3) Double-click the '''browser.sessionstore.max_resumed_crashes''' preference and enter 0 (that's a zero) and click OK.
    When Firefox resumes after a crash, instead of resuming automatically, it will display a list of your previous windows and tabs and you can deselect problem pages.
    (This assumes it wasn't a private browsing session.)

  • My MBP recently started logging itself out.  I narrowed the problem to the external monitor which is connected with a Thunderbolt adapter. When I disconnected it, the problem went away.

    My early 2011 MBP laptop (OS Yosemite 10.2.2) recently started logging itself out.  I narrowed the problem to the external monitor which is connected with a Thunderbolt adapter. I installed Thunderbolt firmware update 1.2, that did not correct the problem. When I disconnect the external monitor, the problem went away. Is there something I can do to be able to use the external monitor again?

    Try Function F1

  • How do i back my iphone4s to rettailler of hello dolly if only 1month warranty the problem with the iphone4s is the wifi it was greyed out. nty on the receipt?

    how do i back my iphone 4s if the warranty on the receipt is only one month. the problem is the wifibis greyed out, and i-restore my iphone4s twicely.

    Correct, my cellular data is currently off. I don't think this will solve my problem because I was able to use iMessage before without my data and only on wifi. If nothing else works, I will try this. But I would like to try to find a solution that doesn't require me using data.

  • Hello! My iMac frozed and I had to switch the electricty supply off and on in order to start again the system, with the problem that the screen looks wierd, I tried to calibrate it... doesnt works any suggestion?

    hello! My iMac frozed and I had to switch the electricty supply off and on in order to start again the system, with the problem that the screen looks wierd, I tried to calibrate it... doesnt works any suggestion?

    Dear Paul, thank you very much for your time and answer, I followed those steps, somehow it helped the performance of my Imac, is faster now, but the screen issue about the very High contrast colours is still there. Since I am a photographer I am very depending on the screen calibration. I am worried that I came to damage the video card when I shut down the computer from the swicth when It was frozed.

  • I have the problem with the eFax Create Account button being grayed out for my newly purchased 6525.

    I have the problem with the eFax Create Account button being grayed out for my newly purchased 6525.
    Can you help?

    Hi Marv13, disregard my last post. The 6520 does have eFax capabilities and the support document I provided a link to needs updating. If you contact HP Cloud Services phone support they will be able to resolve this issue for you. The number and available times are posted below:
    HP Cloud Services
    1-855-785-2777
    Hours of Operation
    Monday-Friday 8am-11pm ET
    Saturday 10am-6:30pm ET
    Best.
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

  • Thank you all for the responses. By process of elimination, I think the problem is the connection to the express in between the extreme and dock. I bought another express and tried it at dock, no luck, I then replaced new express where the one is between

    I have an airport extreme and express setup. My extreme is in my 2nd floor office with windows facing the water. My dock is about 250 ft away down a very steep hill. I have the express about 100 ft down the hill in an electrical waterproof box attached to a tree as high as I could install. The signal is weak and I'm thinking I might have to buy another express. Any thoughts on the best setup for me. I ultimately want to control speakers(hard wired in) down at the dock with my iphone. I have a receiver coming with airplay built in.
    Thank you all for the responses. By process of elimination, I think the problem is the connection to the express in between the extreme and dock. I bought another express and tried it at dock, no luck, I then replaced new express where the one is between extreme and dock, no better. I unplugged the express between extreme and dock and there was no difference. So I believe I am connecting to the airport express or extreme that is inside the house. Again because when i approach express that is halfway I reconnect. so if you can understand my chaos, I believe the express in between is not really connecting to the extreme inside my house. Yes, No? So I need to know how to know if the express half way down the hill is getting the connection from the the extreme in the house. This is wearing me out!!!!!

    You are asking several different questions. If you need to store your photos, music, and movies on an external volume, you certainly can. Any externally connected hard disk drive will work, connected either directly to your Mac or to your Time Capsule as a shared volume.
    You should not rely upon using that as a backup device though. Although you certainly may use it for both purposes, it is a better idea to have dedicated backup devices for a variety of reasons not limited to redundancy. You would not want to simultaneously lose all your pictures as well as your backup. If they are all on the same device, that could happen. Furthermore, a backup cannot back up the volume on which it is running.
    As for adding an Extreme or Express, using its LAN port for your iMac, and then enable Internet sharing so you can effectively use the iMac as a "hotspot", you can do that too, but I am unclear on what benefit you believe this arrangement would convey for you.
    An Extreme's Guest network is separate from its Main network; that is the reason for having it.

  • The problem with the warranty repair in Russia. I bought an Iphone without a contract in Paris, and now I must go there to have it repaired? In Russia, the repair takes only bought in Russia. Is this correct?

    The problem with the warranty repair in Russia. I bought Iphone4 without a contract in Paris, and now I must go there to have it repaired? In Russia, the repair takes only bought in Russia. Is this correct? So I was told over the phone in service and support in the near future, I was not planning to fly to Paris. Just for the sake of repairing the phone to fly to Paris is expensive.
    The problem of 100% on your phone, as trying to change SIM cards of different operator and the problem remains.
    Phone is constantly losing the signal during a call, and often just disabled.
    I bought 5 phones for himself, his wife and friends, and only I have these problems.
    Very annoying.

    Yes you will need to go back to France as the warranty is country specific except in EU countries.  Or if you know anyone there they could take it to an Apple store if you posted it to them.

  • I am having trouble with the initial connection. I have isolated the problem to the cable/ connection. My new hdmi cable has a resolution up to 1080p...does the resolution matter?is this the right hdmi cable for the apple tv?

    I am having trouble with the initial connection of the apple tv. I have isolated the problem to the cable/connection. My new hdmi cable has a resolution up to 1080p...does the resolution matter?is this the right hdmi cable for the apple tv?

    There are only two types of HDMI cables (standard and high speed - listen to all 1.2, 1.3 etc etc nonsense they will try to tell in the store) both types will work with the Apple TV.
    The cable may be faulty though, have you got another to try, what exactly is happening.

Maybe you are looking for

  • My external hard drive does not appear.

    So I have a 500 GB USB 3.0 HDD. It does not show up in the Finder. It also doesn't show up in Disk Utility, Time Machine, or the terminal command diskutil. I used both USB ports and it still doesn't work. I even tried a normal USB 2.0 cable and it st

  • Mdb : missing modules on Solaris 10 ??

    I'm trying to debug a core using mdb. All of the web pages I look at show commands like "::ps" and "::pgrep". These would be great, but I don't see any of these when I enter "::dcmds" nor "::dmods -l". It looks like the "modules" are in /usr/lib/mdb/

  • Start a batch action sequence by name inside a native Acrobat Plugin (C++)

    Hi folks, i am trying to figure out how to execute a named batch sequence (build by the action wizard) inside Acrobat X via the native Acrobat API. I could not find a function in the SDK that could execute a sequence on the current document. Can some

  • Need online tutorials for balancing ragged text

    Can anyone recommend online tutorials on how to work with ragged text in Indesign? I need a quick & dirty overview on how to achieve better balanced ragged text but many of the online sites I've encountered don't talk about how to "design" text....I'

  • Using Adobe Air Auto Print and Download in Web application

    HI All, We need to integration Adobe Air in the MVC4 Asp.net Application and Javascript. We have a requirement to download to the PDF/DOCX file into user selected destination and print it automatically. Browser Support : IE, Firefox,Chrome and safari