Questions tagged [executionexception]

17 questions
64
votes
30 answers

Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/JDBC_DBO]]

I get this Tomcat Error: Sep 09, 2012 4:16:54 PM org.apache.catalina.core.AprLifecycleListener init Information: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the…
50
votes
11 answers

What is the best way to handle an ExecutionException?

I have a method that performs some task with a timeout. I use the ExecutorServer.submit() to get a Future object, and then I call future.get() with a timeout. This is working fine, but my question is the best way to handle checked exceptions that…
Jesse Barnum
  • 6,507
  • 6
  • 40
  • 69
11
votes
3 answers

how to handle java.util.concurrent.ExecutionException exception?

Some part of my code is throwing java.util.concurrent.ExecutionException exception. How can I handle this? Can I use throws clause? I am a bit new to java.
user811433
  • 3,999
  • 13
  • 53
  • 76
7
votes
3 answers

Handling the cause of an ExecutionException

Suppose I have a class defining a big block of work to be done, that can produce several checked Exceptions. class WorkerClass{ public Output work(Input input) throws InvalidInputException, MiscalculationException { ... } } Now suppose…
DieterDP
  • 4,039
  • 2
  • 29
  • 38
6
votes
4 answers

Andorid Studio lass 'FlutterLocationService' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult

Out of nowhere, the build is crashing with a strange error related to the location component , the error is in the "src..\location\FlutterLocationService.kt:" Here is the error: e:…
3
votes
1 answer

Future task throws ExecutionException caused by IndexOutOfBoundsExceptionwhile I, to the best of my knowledge am using no array

the following snippet: public void handleInput() { Scanner sc = new Scanner(System.in); int x = 3; while (true) { FutureTask readNextLine = new FutureTask(sc::nextLine); …
3
votes
1 answer

java.io.IOException: Connection was aborted by the software in your host machine with Sendkey() in selenium java

OS: Win7 64bit Browser:Chrome I'm working on my assignment to test a program with selenium. I'm using the code provided by the professor,which creates a web-app on my localhost:8080 (So there shouldn't be any connection problem) public void…
3
votes
1 answer

Android gives nullpointer on retrieving images

I am making an app that picks 3 images of the gallery with an AsyncTask. The content of my AsyncTask> is: public class ShoppingGallery extends AsyncTask> { private Activity activity; private static final String…
3
votes
3 answers

Overhead of rethrowing Java exception vs. using instanceof/cast

I know the overhead of Java exceptions has been done to death on SO, but I didn't find anything that addressed my situation. I have a Future, which upon calling get() might throw an ExecutionException containing any number of application-specific…
Nick
  • 2,821
  • 5
  • 30
  • 35
2
votes
0 answers

Volley exception handling with RequestFutures

I'm using Volley to make synchronous requests to a server. The following is how I'd make a synchronous request -- RequestFuture future = RequestFuture.newFuture(); JsonObjectRequest request = new JsonObjectRequest("http://my-url.com",…
Matthew
  • 6,356
  • 9
  • 47
  • 59
1
vote
0 answers

I'm getting a resource file error and when i try to clean project i'm getting an execution exception

My Main Activity public class MainActivity extends AppCompatActivity implements NotificationCenter.NotificationCenterDelegate { private ListView chatListView; private EditText chatEditText1; private ArrayList
0
votes
0 answers

unable to find schemalocation when building with maven

I am trying to build an project which contains wsdl and xsd with maven. when I am building it i am getting [ERROR] Failed to execute goal org.codehaus.mojo:axistools-maven-plugin:1.4:wsdl2java (default) on project (project_name) Error generating…
adarsh
  • 348
  • 1
  • 4
  • 17
0
votes
0 answers

Are SwingWorker threads isolated from each other, and are they a good fit for an ExecutorService?

I am attempting to execute SwingWorker's with an Executor. When I execute/submit these tasks with a thread pool size of 1, the tasks execute perfectly. However when I execute the tasks with a thread pool size of bigger than 1 I get…
0
votes
1 answer

AsyncHttpClient ConnectException with no error message

I have a problem but could not be found any solution, I use AsyncHttpClient in https://github.com/AsyncHttpClient/async-http-client, I can run my code in API level 10, but not in API level 17. I am getting this error: 11-13 14:36:47.987 …
0
votes
1 answer

Execution Exception with @inputDate when call form.get() method

I have a input of date type. The attribute is like this: @Formats.DateTime(pattern="dd/MM/yyyy") public Date prazo; In the *.scala.html file, I tried this: @helper.input(pedidoForm("prazo"), '_label -> "Prazo", '_help -> "") { (id, name, value,…
1
2