Tagged Questions
0
votes
2answers
68 views
How to get the method name from which the exception is thrown? [closed]
I need to get the class name and the method name from which the exception is thrown. How can I do that? Thanks in advance.
My code:
private void setErrorDetails(final Throwable cause) {
for ...
0
votes
1answer
40 views
Handle exceptions on multiple running threads Java
I am developing a java app I would like to know how to handle exceptions on multiple running threads. Is there any example? Thanks
13
votes
4answers
105 views
Java catch block, caught exception is not final
I am checking out the new features of Java SE7 and I am currently at this point:
http://docs.oracle.com/javase/7/docs/technotes/guides/language/catch-multiple.html
regarding the catch multiple ...
0
votes
5answers
45 views
Rethrow checked exception from Runnable
I execute multiple tasks from my main class:
ExecutorService executor = Executors.newFixedThreadPool(N);
for (int i = 0; i < M; i++) {
executor.execute(task);
}
executor .shutdown();
...
-3
votes
0answers
45 views
Java - “throws Exception” in the method declaration [duplicate]
I'm given an interface that includes the following method for which I need to write its implementation. I noticed "throws RuntimeException" is stated in the method specification in the interface. What ...
-7
votes
0answers
77 views
Implementing an interface method that “throws HeapOverflowException” [closed]
I'm given an interface that includes the following method for which I need to write an implementation.
I noticed throws HeapOverflowException is stated in the method specification in the interface. ...
0
votes
1answer
23 views
java.sql.SQLException:[SQLITE_ERROR] SQL error or missing database (near “=”:syntax error)
I made the sqlite database using the firefox web development thing, saved it to my pc but I ran into some problem while linking the database. Whenever I click the login button to test I get ...
1
vote
1answer
35 views
Can I use an annotation inside a method body?
Allows the semantics of Java annotations to place them somewhere inside a functions body, e.g. to annotate a specific function call, statement or expression?
For example:
class MyClass {
void ...
0
votes
1answer
27 views
invoking java function from jsp file
i'm trying to invoke a java function on a jsp page. the function is supposed to send a mail by demand.
this is the java code:
package s;
import java.io.UnsupportedEncodingException;
import ...
0
votes
0answers
28 views
Difference between java.net exceptions (Specifically, no connection)
I'm working on a program that parses a large amount of URLs and grabs images from the links. However, I'm trying to see what to do if I lose connection (i.e. internet drops). How can I differentiate ...
6
votes
2answers
88 views
Java tutorial sample code throws: java.net.SocketException: Connection reset - what does cause it?
So this is a beginner's question.
When executing the sample code from the working with urls chapter it throws:
Exception in thread "main" java.net.SocketException: Connection reset
at ...
0
votes
1answer
34 views
Exception in thread “main” java.lang.InternalError
I'm trying to run a program called Orphelia ( http://orphelia.gobics.de/index.jsp ) in a Ubuntu environment, but always returns me the same java error.
Exception in thread "main" ...
1
vote
0answers
11 views
Generating Eclipse AXIS Web Service Get Exception: java.lang.reflect.InvocationTargetException
I am developing Java AXIS Web Services using Eclipse. When I create a new Dynamic Web Project and sometimes when I right click on my class -> Web Serves -> Create Web Serves
It creates everything ...
0
votes
0answers
36 views
Output exception in the file
There is a unit of a code
catch (SQLException e)
{
System.out.println("Connection Failed! Check output console");
e.printStackTrace();
}
How
to ...
-1
votes
3answers
34 views
Removing item from collection calls java.util.ConcurrentModificationException
I've tried to creating ranking from two sorted lists.
List<Ordered<String>> rankedList = Collections.synchronizedList(WebCBIR.run(queryData, clusters, idf));
...