Ver Mensaje Individual
  #1  
Viejo 03/07/14, 10:31:18
Avatar de jdiego22
jdiego22 jdiego22 no está en línea
Desarrollador
Mensajes: 351
Compra y venta: (1)
 
Fecha de registro: dic 2011
Localización: Valladolid
Mensajes: 351
Modelo de smartphone: Galaxy Note 9
Tu operador: Yoigo
Mencionado: 0 comentarios
Tagged: 0 hilos
java.util.concurrent.RejectedExecutionException:

Tengo problemas al obtener unos logotipos.

mi código es este:
Código:
public class Descarga_Img extends AsyncTask<String, Integer, Bitmap>{

		@Override
		protected Bitmap doInBackground(String... params) {
			// TODO Auto-generated method stub
			try {
				HttpGet web = new HttpGet(params[0]);
				HttpClient httpClient = new DefaultHttpClient();
				HttpResponse response = (HttpResponse) httpClient.execute(web);
				HttpEntity entity = response.getEntity();
				BufferedHttpEntity bufferedHttpEntity = new BufferedHttpEntity(
						entity);
				InputStream inputStream = bufferedHttpEntity.getContent();
				Bitmap loaded = BitmapFactory.decodeStream(inputStream);
				return loaded;
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			return null;
		}
		@Override
		protected void onPreExecute() {
			// TODO Auto-generated method stub
			super.onPreExecute();
		}
		@Override
		protected void onPostExecute(Bitmap result) {
			// TODO Auto-generated method stub
			logo = result;
			super.onPostExecute(result);
		}
}
Y el log:

Código:
07-03 10:21:25.737: W/System.err(29786): java.util.concurrent.RejectedExecutionException: Task android.os.AsyncTask$3@41bfc898 rejected from java.util.concurrent.ThreadPoolExecutor@41855248[Running, pool size = 9, active threads = 9, queued tasks = 128, completed tasks = 21]
07-03 10:21:25.737: W/System.err(29786):    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011)
07-03 10:21:25.737: W/System.err(29786):    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793)
07-03 10:21:25.737: W/System.err(29786):    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1339)
07-03 10:21:25.737: W/System.err(29786):    at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:590)
07-03 10:21:25.737: W/System.err(29786):    at android.os.AsyncTask.execute(AsyncTask.java:535)
07-03 10:21:25.737: W/System.err(29786):    at com.cosmo.basededatosempresa.Empresa.seturl_logo(Empresa.java:162)
07-03 10:21:25.737: W/System.err(29786):    at com.cosmo.basededatosempresa.IntentEmpresas.getEmpresa(IntentEmpresas.java:95)
07-03 10:21:25.737: W/System.err(29786):    at com.cosmo.basededatosempresa.IntentEmpresas.tareaLarga(IntentEmpresas.java:136)
07-03 10:21:25.737: W/System.err(29786):    at com.cosmo.basededatosempresa.IntentEmpresas.onHandleIntent(IntentEmpresas.java:42)
07-03 10:21:25.737: W/System.err(29786):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
07-03 10:21:25.737: W/System.err(29786):    at android.os.Handler.dispatchMessage(Handler.java:102)
07-03 10:21:25.747: W/System.err(29786):    at android.os.Looper.loop(Looper.java:136)
07-03 10:21:25.747: W/System.err(29786):    at android.os.HandlerThread.run(HandlerThread.java:61)
Muchas gracias de antemano.
Responder Con Cita