Post Reply 
 
Thread Rating:
  • 80 Votes - 2.9 Average
  • 1
  • 2
  • 3
  • 4
  • 5
サーバサイドのExceptionをすべて表示させる
07-31-2012, 05:35 PM
Post: #1
サーバサイドのExceptionをすべて表示させる
CurlORBでは、サーバサイドのExceptionが発生したとき、ORBServerExceptionをcatchすれば
Exceptionの内容を取得できますが、print-stack-traceでは直近の1行しか取得できません。
Javaからthrowされたスタックトレースをすべて表示させる場合はどのような方法にて取得すればよいでしょうか?
Find all posts by this user
Quote this message in a reply
08-01-2012, 11:39 AM
Post: #2
RE: サーバサイドのExceptionをすべて表示させる
簡単だったので対応いたしました。
添付をご利用いただければ出力されるはずです。


また、最新のSourceForgeにもコミットしております。
http://sourceforge.net/scm/?type=svn&group_id=240276


お試しください。


Attached File(s)
.zip  p.zip (Size: 3.17 KB / Downloads: 71)
Find all posts by this user
Quote this message in a reply
08-01-2012, 03:38 PM
Post: #3
RE: サーバサイドのExceptionをすべて表示させる
ありがとうございました。

トレースが全部表示されました。
Find all posts by this user
Quote this message in a reply
12-10-2012, 03:12 PM
Post: #4
RE: サーバサイドのExceptionをすべて表示させる
サーバアプリケーションのException処理で、new UserException()等でユーザ定義のExceptionをスローさせ、ORG.SPRINGFRAMEWORK.JDBCパッケージのExceptionをネストすると、
Curl側のORBServerExceptionのprint-stack-traceの処理で
Exception 'package ORG.SPRINGFRAMEWORK.JDBC' のインスタンスは見つかりません。
が発生しますが対処方法はありますか?ネストしなければ正常にスタックトレースが表示されます。
たとえば、サーバアプリで次のようなSQLエラーが発生した場合です。


Nested is:
org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SQL文]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00942: 表またはビューが存在しません。


ネストしなければ(Nested is: )がなければ正常に表示されます。
Find all posts by this user
Quote this message in a reply
12-12-2012, 09:07 PM
Post: #5
RE: サーバサイドのExceptionをすべて表示させる
サーバアプリケーションのException処理で、new UserException()等でユーザ定義のExceptionをスローさせ、ORG.SPRINGFRAMEWORK.JDBCパッケージのExceptionをネストすると、

testking testking.com
leather4ever leather4ever.co.uk
Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:


User(s) browsing this thread:
1 Guest(s)