[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 698
  • Last Modified:

Display entire exception trace in Eclipse console

I am getting an exception in when running my program in eclipse. The entire trace is not shown. It displays some of the lines, but then is stays "and 12 more lines"
How do I get these lines to display?
0
allelopath
Asked:
allelopath
  • 2
  • 2
1 Solution
 
mkatmonkeyCommented:
This issue was reported as a BUG to sun.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4775147

It's not something that they'll FIX, but they do list the customer's workaround which was to override the printstacktrace function.
0
 
mkatmonkeyCommented:
The javadoc on printStackTrace() contains an example of how the output should look:

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html#printStackTrace(java.io.PrintWriter)
0
 
allelopathAuthor Commented:
So the exception class is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
I should create my own CommunicationsException?

package com.mycompany.exceptions;

public class CommunicationsException {

public void printStackTrace(PrintWriter s) {
  // what goes here?
}
 
}
0
 
allelopathAuthor Commented:
I thought this was an Eclipse issue, but it is a Java issue.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now