It's not a secret anymore!*
The moose likes JBoss/WildFly and the fly likes Unable to print stack trace on own log file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Unable to print stack trace on own log file" Watch "Unable to print stack trace on own log file" New topic
Author

Unable to print stack trace on own log file

Dushyant Agarwal
Ranch Hand

Joined: Oct 14, 2007
Posts: 75
hi,
In my application using JBoss 4.2.1-GA, I have used JSF+trinidad tag library for view and JPA+EJB 3.0 for the business logic. On persisting an entity into the DB using entity manager I got an exception - java.sql.BatchUpdateException. The stack trace is available in <JBOSS_HOME>/server/default/log/server.log.
I want to set up my own log file in<JBOSS_HOME>/bin. For this I set an error.jsp file with isError attribute true in the page.

This provided me with the implicit exception object. But when I used it to log the stack trace, it provided me with only the stack trace of the FacesException.The rest of the exceptions were not logged into my file.

How can I provide all the exception stack traces that were available in jboss server's log file to my own log file??

Thanks,
Dushyant
[ November 27, 2008: Message edited by: Dushyant Agarwal ]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Are you saying that when error.jsp display the stack trace that it is not showing the full trace? It is possible that the code providing the stack trace for error.jsp is catching the exception at a different location, hence the differences between it and what is in server.log.

If this does not help, please post the full stack trace as shown in server.log, and the stack trace that you are seeing and also state where that stack trace is appearing (in the browser or in a log file within the bin directory, or ???).


JBoss In Action
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Unable to print stack trace on own log file