Merge remote-tracking branch 'apache/master' into 1.6
diff --git a/decode_test.go b/decode_test.go
index 3728fec..30468d7 100644
--- a/decode_test.go
+++ b/decode_test.go
@@ -30,6 +30,9 @@
 	"reflect"
 	"testing"
 )
+import (
+	"github.com/apache/dubbo-go-hessian2/java_exception"
+)
 
 const (
 	hessianJar = "test_hessian/target/test_hessian-1.0.0.jar"
@@ -109,7 +112,15 @@
 	if ok {
 		r = tmp.value.Interface()
 	}
-	if !reflect.DeepEqual(r, expected) {
+	trow, o1 := r.(java_exception.Throwabler)
+	expe, o2 := expected.(java_exception.Throwabler)
+	if o1 && o2 {
+		log.Println(reflect.TypeOf(trow), reflect.TypeOf(trow).Elem().Name())
+		if trow.Error() == expe.Error() && reflect.TypeOf(trow).Elem().Name() == reflect.TypeOf(expe).Elem().Name() {
+			return
+		}
+		t.Errorf("%s: got %v, wanted %v", method, r, expected)
+	} else if !reflect.DeepEqual(r, expected) {
 		t.Errorf("%s: got %v, wanted %v", method, r, expected)
 	}
 }
@@ -127,3 +138,10 @@
 	}
 	expected(r)
 }
+
+func TestUserDefindeException(t *testing.T) {
+	expect := &UnknownException{
+		DetailMessage: "throw UserDefindException",
+	}
+	testDecodeFramework(t, "throw_UserDefindException", expect)
+}
diff --git a/java_exception/annotation_type_mismatch_exception.go b/java_exception/annotation_type_mismatch_exception.go
index c0e482d..cbd2301 100644
--- a/java_exception/annotation_type_mismatch_exception.go
+++ b/java_exception/annotation_type_mismatch_exception.go
@@ -42,3 +42,8 @@
 func (AnnotationTypeMismatchException) JavaClassName() string {
 	return "java.lang.annotation.AnnotationTypeMismatchException"
 }
+
+// equals to getStackTrace in java
+func (e AnnotationTypeMismatchException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/arithmetic_exception.go b/java_exception/arithmetic_exception.go
index 8af4640..c9b7e1d 100644
--- a/java_exception/arithmetic_exception.go
+++ b/java_exception/arithmetic_exception.go
@@ -40,3 +40,8 @@
 func (ArithmeticException) JavaClassName() string {
 	return "java.lang.ArithmeticException"
 }
+
+// equals to getStackTrace in java
+func (e ArithmeticException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
diff --git a/java_exception/array_index_out_of_bounds_exception.go b/java_exception/array_index_out_of_bounds_exception.go
index ef85247..0a09ed6 100644
--- a/java_exception/array_index_out_of_bounds_exception.go
+++ b/java_exception/array_index_out_of_bounds_exception.go
@@ -40,3 +40,8 @@
 func (ArrayIndexOutOfBoundsException) JavaClassName() string {
 	return "java.lang.ArrayIndexOutOfBoundsException"
 }
+
+// equals to getStackTrace in java
+func (e ArrayIndexOutOfBoundsException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/array_store_exception.go b/java_exception/array_store_exception.go
index 98a23b9..94bcf52 100644
--- a/java_exception/array_store_exception.go
+++ b/java_exception/array_store_exception.go
@@ -40,3 +40,8 @@
 func (ArrayStoreException) JavaClassName() string {
 	return "java.lang.ArrayStoreException"
 }
+
+// equals to getStackTrace in java
+func (e ArrayStoreException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
diff --git a/java_exception/backing_store_exception.go b/java_exception/backing_store_exception.go
index 8224aaa..3f2e4ce 100644
--- a/java_exception/backing_store_exception.go
+++ b/java_exception/backing_store_exception.go
@@ -40,3 +40,8 @@
 func (BackingStoreException) JavaClassName() string {
 	return "java.util.prefs.BackingStoreException"
 }
+
+// equals to getStackTrace in java
+func (e BackingStoreException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/broken_barrier_exception.go b/java_exception/broken_barrier_exception.go
index 47fbc0e..44c24e0 100644
--- a/java_exception/broken_barrier_exception.go
+++ b/java_exception/broken_barrier_exception.go
@@ -40,3 +40,8 @@
 func (BrokenBarrierException) JavaClassName() string {
 	return "java.util.concurrent.BrokenBarrierException"
 }
+
+// equals to getStackTrace in java
+func (e BrokenBarrierException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/cancellation_exception.go b/java_exception/cancellation_exception.go
index facaa70..fddc8df 100644
--- a/java_exception/cancellation_exception.go
+++ b/java_exception/cancellation_exception.go
@@ -40,3 +40,8 @@
 func (CancellationException) JavaClassName() string {
 	return "java.util.concurrent.CancellationException"
 }
+
+// equals to getStackTrace in java
+func (e CancellationException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/class_not_found_exception.go b/java_exception/class_not_found_exception.go
index b987e74..69eab81 100644
--- a/java_exception/class_not_found_exception.go
+++ b/java_exception/class_not_found_exception.go
@@ -41,3 +41,8 @@
 func (ClassNotFoundException) JavaClassName() string {
 	return "java.lang.ClassNotFoundException"
 }
+
+// equals to getStackTrace in java
+func (e ClassNotFoundException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/classc_cast_exception.go b/java_exception/classc_cast_exception.go
index 4d50d18..4c6d5a2 100644
--- a/java_exception/classc_cast_exception.go
+++ b/java_exception/classc_cast_exception.go
@@ -40,3 +40,8 @@
 func (ClassCastException) JavaClassName() string {
 	return "java.lang.ClassCastException"
 }
+
+// equals to getStackTrace in java
+func (e ClassCastException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/clone_not_supported_exception.go b/java_exception/clone_not_supported_exception.go
index 38bb4ec..e9ef78b 100644
--- a/java_exception/clone_not_supported_exception.go
+++ b/java_exception/clone_not_supported_exception.go
@@ -44,3 +44,8 @@
 func (CloneNotSupportedException) JavaClassName() string {
 	return "java.lang.CloneNotSupportedException"
 }
+
+// equals to getStackTrace in java
+func (e CloneNotSupportedException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/completion_exception.go b/java_exception/completion_exception.go
index 43e3d17..e55395b 100644
--- a/java_exception/completion_exception.go
+++ b/java_exception/completion_exception.go
@@ -40,3 +40,8 @@
 func NewCompletionException(detailMessage string) *CompletionException {
 	return &CompletionException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e CompletionException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/concurrent_modification_exception.go b/java_exception/concurrent_modification_exception.go
index 4f73bb5..716bf54 100644
--- a/java_exception/concurrent_modification_exception.go
+++ b/java_exception/concurrent_modification_exception.go
@@ -40,3 +40,8 @@
 func NewConcurrentModificationException(detailMessage string) *ConcurrentModificationException {
 	return &ConcurrentModificationException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e ConcurrentModificationException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/data_format_exception.go b/java_exception/data_format_exception.go
index ce5fed3..4154798 100644
--- a/java_exception/data_format_exception.go
+++ b/java_exception/data_format_exception.go
@@ -40,3 +40,8 @@
 func (DataFormatException) JavaClassName() string {
 	return "java.util.zip.DataFormatException"
 }
+
+// equals to getStackTrace in java
+func (e DataFormatException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/date_time_exception.go b/java_exception/date_time_exception.go
index 61fb270..6607ef8 100644
--- a/java_exception/date_time_exception.go
+++ b/java_exception/date_time_exception.go
@@ -40,3 +40,8 @@
 func (DateTimeException) JavaClassName() string {
 	return "java.time.DateTimeException"
 }
+
+// equals to getStackTrace in java
+func (e DateTimeException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/date_time_parse_exception.go b/java_exception/date_time_parse_exception.go
index e8cb5d6..3fc4f15 100644
--- a/java_exception/date_time_parse_exception.go
+++ b/java_exception/date_time_parse_exception.go
@@ -42,3 +42,8 @@
 func (DateTimeParseException) JavaClassName() string {
 	return "java.time.format.DateTimeParseException"
 }
+
+// equals to getStackTrace in java
+func (e DateTimeParseException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/dubbo_generic_exception.go b/java_exception/dubbo_generic_exception.go
index f3e0e45..d6c4a9c 100644
--- a/java_exception/dubbo_generic_exception.go
+++ b/java_exception/dubbo_generic_exception.go
@@ -42,3 +42,8 @@
 func (DubboGenericException) JavaClassName() string {
 	return "com.alibaba.dubbo.rpc.service.GenericException"
 }
+
+// equals to getStackTrace in java
+func (e DubboGenericException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/duplicate_format_flags_exception.go b/java_exception/duplicate_format_flags_exception.go
index d99f477..23e1798 100644
--- a/java_exception/duplicate_format_flags_exception.go
+++ b/java_exception/duplicate_format_flags_exception.go
@@ -46,3 +46,8 @@
 func NewDuplicateFormatFlagsException(detailMessage string) *DuplicateFormatFlagsException {
 	return &DuplicateFormatFlagsException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e DuplicateFormatFlagsException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/empty_stack_exception.go b/java_exception/empty_stack_exception.go
index 91793ab..21dfb0c 100644
--- a/java_exception/empty_stack_exception.go
+++ b/java_exception/empty_stack_exception.go
@@ -40,3 +40,8 @@
 func NewEmptyStackException(detailMessage string) *EmptyStackException {
 	return &EmptyStackException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e EmptyStackException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/enum_constant_not_present_exception.go b/java_exception/enum_constant_not_present_exception.go
index 1e6c96e..c2fcb85 100644
--- a/java_exception/enum_constant_not_present_exception.go
+++ b/java_exception/enum_constant_not_present_exception.go
@@ -42,3 +42,8 @@
 func (EnumConstantNotPresentException) JavaClassName() string {
 	return "java.lang.EnumConstantNotPresentException"
 }
+
+// equals to getStackTrace in java
+func (e EnumConstantNotPresentException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/eof_exception.go b/java_exception/eof_exception.go
index 7e72123..4d973ee 100644
--- a/java_exception/eof_exception.go
+++ b/java_exception/eof_exception.go
@@ -40,3 +40,8 @@
 func (EOFException) JavaClassName() string {
 	return "java.io.EOFException"
 }
+
+// equals to getStackTrace in java
+func (e EOFException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/exception.go b/java_exception/exception.go
index 19f952a..f5a00e9 100644
--- a/java_exception/exception.go
+++ b/java_exception/exception.go
@@ -25,6 +25,7 @@
 type Throwabler interface {
 	Error() string
 	JavaClassName() string
+	GetStackTrace() []StackTraceElement
 }
 
 ////////////////////////////
@@ -54,6 +55,11 @@
 	return "java.lang.Throwable"
 }
 
+// equals to getStackTrace in java
+func (e Throwable) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
+
 ////////////////////////////
 // Exception
 ////////////////////////////
@@ -79,15 +85,20 @@
 	return "java.lang.Exception"
 }
 
-////////////////////////////
+// equals to getStackTrace in java
+func (e Exception) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
+
+/////////////////////////////
 // StackTraceElement
-////////////////////////////
+/////////////////////////////
 
 type StackTraceElement struct {
 	DeclaringClass string
 	MethodName     string
 	FileName       string
-	LineNumber     int
+	LineNumber     int32
 }
 
 //JavaClassName  java fully qualified path
diff --git a/java_exception/execution_exception.go b/java_exception/execution_exception.go
index ea75cbb..e7b8fef 100644
--- a/java_exception/execution_exception.go
+++ b/java_exception/execution_exception.go
@@ -40,3 +40,8 @@
 func (ExecutionException) JavaClassName() string {
 	return "java.util.concurrent.ExecutionException"
 }
+
+// equals to getStackTrace in java
+func (e ExecutionException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/file_not_found_exception.go b/java_exception/file_not_found_exception.go
index 2a09aba..5aa2197 100644
--- a/java_exception/file_not_found_exception.go
+++ b/java_exception/file_not_found_exception.go
@@ -40,3 +40,8 @@
 func (FileNotFoundException) JavaClassName() string {
 	return "java.io.FileNotFoundException"
 }
+
+// equals to getStackTrace in java
+func (e FileNotFoundException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/formatter_closed_exception.go b/java_exception/formatter_closed_exception.go
index 61c8277..b8ccfee 100644
--- a/java_exception/formatter_closed_exception.go
+++ b/java_exception/formatter_closed_exception.go
@@ -40,3 +40,8 @@
 func (FormatterClosedException) JavaClassName() string {
 	return "java.util.FormatterClosedException"
 }
+
+// equals to getStackTrace in java
+func (e FormatterClosedException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_access_exception.go b/java_exception/illegal_access_exception.go
index 06a1d57..70070d8 100644
--- a/java_exception/illegal_access_exception.go
+++ b/java_exception/illegal_access_exception.go
@@ -40,3 +40,8 @@
 func (IllegalAccessException) JavaClassName() string {
 	return "java.lang.IllegalAccessException"
 }
+
+// equals to getStackTrace in java
+func (e IllegalAccessException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_argument_exception.go b/java_exception/illegal_argument_exception.go
index c8db71c..004358f 100644
--- a/java_exception/illegal_argument_exception.go
+++ b/java_exception/illegal_argument_exception.go
@@ -40,3 +40,7 @@
 func (IllegalArgumentException) JavaClassName() string {
 	return "java.lang.IllegalArgumentException"
 }
+// equals to getStackTrace in java
+func (e IllegalArgumentException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_classFormat_exception.go b/java_exception/illegal_classFormat_exception.go
index 5411529..6303651 100644
--- a/java_exception/illegal_classFormat_exception.go
+++ b/java_exception/illegal_classFormat_exception.go
@@ -40,3 +40,8 @@
 func (IllegalClassFormatException) JavaClassName() string {
 	return "java.lang.instrument.IllegalClassFormatException"
 }
+
+// equals to getStackTrace in java
+func (e IllegalClassFormatException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_format_code_point_exception.go b/java_exception/illegal_format_code_point_exception.go
index 79cdd2f..b61fa8d 100644
--- a/java_exception/illegal_format_code_point_exception.go
+++ b/java_exception/illegal_format_code_point_exception.go
@@ -43,3 +43,8 @@
 func (IllegalFormatCodePointException) JavaClassName() string {
 	return "java.util.IllegalFormatCodePointException"
 }
+
+// equals to getStackTrace in java
+func (e IllegalFormatCodePointException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_format_conversion_exception.go b/java_exception/illegal_format_conversion_exception.go
index 83a4695..96642c8 100644
--- a/java_exception/illegal_format_conversion_exception.go
+++ b/java_exception/illegal_format_conversion_exception.go
@@ -44,3 +44,8 @@
 func NewIllegalFormatConversionException(detailMessage string) *IllegalFormatConversionException {
 	return &IllegalFormatConversionException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e IllegalFormatConversionException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_format_flags_exception.go b/java_exception/illegal_format_flags_exception.go
index 4a2434f..d844f83 100644
--- a/java_exception/illegal_format_flags_exception.go
+++ b/java_exception/illegal_format_flags_exception.go
@@ -43,3 +43,8 @@
 func (IllegalFormatFlagsException) JavaClassName() string {
 	return "java.util.IllegalFormatFlagsException"
 }
+
+// equals to getStackTrace in java
+func (e IllegalFormatFlagsException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_format_precision_exception.go b/java_exception/illegal_format_precision_exception.go
index 71ab7b8..336e25c 100644
--- a/java_exception/illegal_format_precision_exception.go
+++ b/java_exception/illegal_format_precision_exception.go
@@ -43,3 +43,8 @@
 func (IllegalFormatPrecisionException) JavaClassName() string {
 	return "java.util.IllegalFormatPrecisionException"
 }
+
+// equals to getStackTrace in java
+func (e IllegalFormatPrecisionException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_format_width_exception.go b/java_exception/illegal_format_width_exception.go
index fca27cc..680ccfc 100644
--- a/java_exception/illegal_format_width_exception.go
+++ b/java_exception/illegal_format_width_exception.go
@@ -43,3 +43,8 @@
 func NewIllegalFormatWidthException(w int) *IllegalFormatWidthException {
 	return &IllegalFormatWidthException{W: w}
 }
+
+// equals to getStackTrace in java
+func (e IllegalFormatWidthException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_monitor_state_exception.go b/java_exception/illegal_monitor_state_exception.go
index 0b1e314..2f2a254 100644
--- a/java_exception/illegal_monitor_state_exception.go
+++ b/java_exception/illegal_monitor_state_exception.go
@@ -40,3 +40,8 @@
 func (IllegalMonitorStateException) JavaClassName() string {
 	return "java.lang.IllegalMonitorStateException"
 }
+
+// equals to getStackTrace in java
+func (e IllegalMonitorStateException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_state_exception.go b/java_exception/illegal_state_exception.go
index 0e48485..21d1e94 100644
--- a/java_exception/illegal_state_exception.go
+++ b/java_exception/illegal_state_exception.go
@@ -40,3 +40,8 @@
 func (IllegalStateException) JavaClassName() string {
 	return "java.lang.IllegalStateException"
 }
+
+// equals to getStackTrace in java
+func (e IllegalStateException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illegal_thread_state_exception.go b/java_exception/illegal_thread_state_exception.go
index 6f3db69..a800e60 100644
--- a/java_exception/illegal_thread_state_exception.go
+++ b/java_exception/illegal_thread_state_exception.go
@@ -40,3 +40,8 @@
 func (IllegalThreadStateException) JavaClassName() string {
 	return "java.lang.IllegalThreadStateException"
 }
+
+// equals to getStackTrace in java
+func (e IllegalThreadStateException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/illformed_locale_exception.go b/java_exception/illformed_locale_exception.go
index 142666d..6c78812 100644
--- a/java_exception/illformed_locale_exception.go
+++ b/java_exception/illformed_locale_exception.go
@@ -41,3 +41,8 @@
 func NewIllformedLocaleException(detailMessage string) *IllformedLocaleException {
 	return &IllformedLocaleException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e IllformedLocaleException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/incomplete_annotation_exception.go b/java_exception/incomplete_annotation_exception.go
index f11a45e..6217b99 100644
--- a/java_exception/incomplete_annotation_exception.go
+++ b/java_exception/incomplete_annotation_exception.go
@@ -42,3 +42,8 @@
 func (IncompleteAnnotationException) JavaClassName() string {
 	return "java.lang.annotation.IncompleteAnnotationException"
 }
+
+// equals to getStackTrace in java
+func (e IncompleteAnnotationException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/index_out_of_bounds_exception.go b/java_exception/index_out_of_bounds_exception.go
index 7481fef..0bbf1d3 100644
--- a/java_exception/index_out_of_bounds_exception.go
+++ b/java_exception/index_out_of_bounds_exception.go
@@ -40,3 +40,8 @@
 func (IndexOutOfBoundsException) JavaClassName() string {
 	return "java.lang.IndexOutOfBoundsException"
 }
+
+// equals to getStackTrace in java
+func (e IndexOutOfBoundsException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/input_mismatch_exception.go b/java_exception/input_mismatch_exception.go
index 266b648..4f6d075 100644
--- a/java_exception/input_mismatch_exception.go
+++ b/java_exception/input_mismatch_exception.go
@@ -40,3 +40,8 @@
 func (InputMismatchException) JavaClassName() string {
 	return "java.util.InputMismatchException"
 }
+
+// equals to getStackTrace in java
+func (e InputMismatchException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/instantiation_exception.go b/java_exception/instantiation_exception.go
index 8df5cb8..ac744fc 100644
--- a/java_exception/instantiation_exception.go
+++ b/java_exception/instantiation_exception.go
@@ -40,3 +40,8 @@
 func (InstantiationException) JavaClassName() string {
 	return "java.lang.InstantiationException"
 }
+
+// equals to getStackTrace in java
+func (e InstantiationException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/interrupted_exception.go b/java_exception/interrupted_exception.go
index a8f638b..8f26e56 100644
--- a/java_exception/interrupted_exception.go
+++ b/java_exception/interrupted_exception.go
@@ -43,3 +43,8 @@
 func (InterruptedException) JavaClassName() string {
 	return "java.lang.InterruptedException"
 }
+
+// equals to getStackTrace in java
+func (e InterruptedException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/interrupted_io_exception.go b/java_exception/interrupted_io_exception.go
index c69d1b8..deb4e2d 100644
--- a/java_exception/interrupted_io_exception.go
+++ b/java_exception/interrupted_io_exception.go
@@ -44,3 +44,8 @@
 func (InterruptedIOException) JavaClassName() string {
 	return "java.io.InterruptedIOException"
 }
+
+// equals to getStackTrace in java
+func (e InterruptedIOException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/invalid_class_exception.go b/java_exception/invalid_class_exception.go
index ebc2579..3dbffdf 100644
--- a/java_exception/invalid_class_exception.go
+++ b/java_exception/invalid_class_exception.go
@@ -48,3 +48,8 @@
 func (InvalidClassException) JavaClassName() string {
 	return "java.io.InvalidClassException"
 }
+
+// equals to getStackTrace in java
+func (e InvalidClassException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/invalid_object_exception.go b/java_exception/invalid_object_exception.go
index 5080553..35cf767 100644
--- a/java_exception/invalid_object_exception.go
+++ b/java_exception/invalid_object_exception.go
@@ -40,3 +40,8 @@
 func (InvalidObjectException) JavaClassName() string {
 	return "java.io.InvalidObjectException"
 }
+
+// equals to getStackTrace in java
+func (e InvalidObjectException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/invalid_preferences_format_exception.go b/java_exception/invalid_preferences_format_exception.go
index a264ccc..8e83f88 100644
--- a/java_exception/invalid_preferences_format_exception.go
+++ b/java_exception/invalid_preferences_format_exception.go
@@ -40,3 +40,8 @@
 func (InvalidPreferencesFormatException) JavaClassName() string {
 	return "java.util.prefs.InvalidPreferencesFormatException"
 }
+
+// equals to getStackTrace in java
+func (e InvalidPreferencesFormatException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/invalid_properties_format_exception.go b/java_exception/invalid_properties_format_exception.go
index ab0f4e7..705e942 100644
--- a/java_exception/invalid_properties_format_exception.go
+++ b/java_exception/invalid_properties_format_exception.go
@@ -40,3 +40,8 @@
 func (InvalidPropertiesFormatException) JavaClassName() string {
 	return "java.util.InvalidPropertiesFormatException"
 }
+
+// equals to getStackTrace in java
+func (e InvalidPropertiesFormatException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/invocation_target_exception.go b/java_exception/invocation_target_exception.go
index 08f54ba..55bb113 100644
--- a/java_exception/invocation_target_exception.go
+++ b/java_exception/invocation_target_exception.go
@@ -41,3 +41,8 @@
 func (InvocationTargetException) JavaClassName() string {
 	return "java.lang.reflect.InvocationTargetException"
 }
+
+// equals to getStackTrace in java
+func (e InvocationTargetException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/io_exception.go b/java_exception/io_exception.go
index 10a81df..94333c7 100644
--- a/java_exception/io_exception.go
+++ b/java_exception/io_exception.go
@@ -40,3 +40,8 @@
 func (IOException) JavaClassName() string {
 	return "java.io.IOException"
 }
+
+// equals to getStackTrace in java
+func (e IOException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/jar_exception.go b/java_exception/jar_exception.go
index f0029a5..899a101 100644
--- a/java_exception/jar_exception.go
+++ b/java_exception/jar_exception.go
@@ -40,3 +40,8 @@
 func (JarException) JavaClassName() string {
 	return "java.util.jar.JarException"
 }
+
+// equals to getStackTrace in java
+func (e JarException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/lambda_conversion_exception.go b/java_exception/lambda_conversion_exception.go
index 4e0f504..c2ba972 100644
--- a/java_exception/lambda_conversion_exception.go
+++ b/java_exception/lambda_conversion_exception.go
@@ -43,3 +43,8 @@
 func (LambdaConversionException) JavaClassName() string {
 	return "java.lang.invoke.LambdaConversionException"
 }
+
+// equals to getStackTrace in java
+func (e LambdaConversionException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/malformed_parameterized_type_exception.go b/java_exception/malformed_parameterized_type_exception.go
index 0135f22..5747ea3 100644
--- a/java_exception/malformed_parameterized_type_exception.go
+++ b/java_exception/malformed_parameterized_type_exception.go
@@ -40,3 +40,8 @@
 func NewMalformedParameterizedTypeException(detailMessage string) *MalformedParameterizedTypeException {
 	return &MalformedParameterizedTypeException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e MalformedParameterizedTypeException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/malformed_parameters_exception.go b/java_exception/malformed_parameters_exception.go
index 49e3118..9d2c0f4 100644
--- a/java_exception/malformed_parameters_exception.go
+++ b/java_exception/malformed_parameters_exception.go
@@ -40,3 +40,8 @@
 func NewMalformedParametersException(detailMessage string) *MalformedParametersException {
 	return &MalformedParametersException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e MalformedParametersException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/missing_format_argument_exception.go b/java_exception/missing_format_argument_exception.go
index 281821e..791e4d6 100644
--- a/java_exception/missing_format_argument_exception.go
+++ b/java_exception/missing_format_argument_exception.go
@@ -43,3 +43,8 @@
 func (MissingFormatArgumentException) JavaClassName() string {
 	return "java.util.MissingFormatArgumentException"
 }
+
+// equals to getStackTrace in java
+func (e MissingFormatArgumentException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/missing_format_width_exception.go b/java_exception/missing_format_width_exception.go
index b22e8ad..52825f5 100644
--- a/java_exception/missing_format_width_exception.go
+++ b/java_exception/missing_format_width_exception.go
@@ -41,3 +41,8 @@
 func (MissingFormatWidthException) JavaClassName() string {
 	return "java.util.MissingFormatWidthException"
 }
+
+// equals to getStackTrace in java
+func (e MissingFormatWidthException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/missing_resource_exception.go b/java_exception/missing_resource_exception.go
index 0d0bab7..7845aab 100644
--- a/java_exception/missing_resource_exception.go
+++ b/java_exception/missing_resource_exception.go
@@ -42,3 +42,8 @@
 func NewMissingResourceException(detailMessage, classname, key string) *MissingResourceException {
 	return &MissingResourceException{DetailMessage: detailMessage, ClassName: classname, Key: key}
 }
+
+// equals to getStackTrace in java
+func (e MissingResourceException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/negative_array_size_exception.go b/java_exception/negative_array_size_exception.go
index a8aeb84..e6740a3 100644
--- a/java_exception/negative_array_size_exception.go
+++ b/java_exception/negative_array_size_exception.go
@@ -40,3 +40,8 @@
 func (NegativeArraySizeException) JavaClassName() string {
 	return "java.lang.NegativeArraySizeException"
 }
+
+// equals to getStackTrace in java
+func (e NegativeArraySizeException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/no_such_element_exception.go b/java_exception/no_such_element_exception.go
index 3f8c8a7..a6bb56a 100644
--- a/java_exception/no_such_element_exception.go
+++ b/java_exception/no_such_element_exception.go
@@ -40,3 +40,8 @@
 func NewNoSuchElementException(detailMessage string) *NoSuchElementException {
 	return &NoSuchElementException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e NoSuchElementException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/no_such_field_exception.go b/java_exception/no_such_field_exception.go
index dddcbf2..ec06e52 100644
--- a/java_exception/no_such_field_exception.go
+++ b/java_exception/no_such_field_exception.go
@@ -40,3 +40,8 @@
 func (NoSuchFieldException) JavaClassName() string {
 	return "java.lang.NoSuchFieldException"
 }
+
+// equals to getStackTrace in java
+func (e NoSuchFieldException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/no_such_method_exception.go b/java_exception/no_such_method_exception.go
index 05587f3..9e0f79b 100644
--- a/java_exception/no_such_method_exception.go
+++ b/java_exception/no_such_method_exception.go
@@ -40,3 +40,8 @@
 func (NoSuchMethodException) JavaClassName() string {
 	return "java.lang.NoSuchMethodException"
 }
+
+// equals to getStackTrace in java
+func (e NoSuchMethodException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/not_active_exception.go b/java_exception/not_active_exception.go
index 5d1d34a..46077c8 100644
--- a/java_exception/not_active_exception.go
+++ b/java_exception/not_active_exception.go
@@ -40,3 +40,8 @@
 func (NotActiveException) JavaClassName() string {
 	return "java.io.NotActiveException"
 }
+
+// equals to getStackTrace in java
+func (e NotActiveException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/not_serializable_exception.go b/java_exception/not_serializable_exception.go
index 3782df3..ab6dac4 100644
--- a/java_exception/not_serializable_exception.go
+++ b/java_exception/not_serializable_exception.go
@@ -40,3 +40,8 @@
 func (NotSerializableException) JavaClassName() string {
 	return "java.io.NotSerializableException"
 }
+
+// equals to getStackTrace in java
+func (e NotSerializableException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/null_pointer_exception.go b/java_exception/null_pointer_exception.go
index f3cb0a5..b1eb851 100644
--- a/java_exception/null_pointer_exception.go
+++ b/java_exception/null_pointer_exception.go
@@ -40,3 +40,8 @@
 func (e NullPointerException) JavaClassName() string {
 	return "java.lang.NullPointerException"
 }
+
+// equals to getStackTrace in java
+func (e NullPointerException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/number_format_exception.go b/java_exception/number_format_exception.go
index 2158bbc..e7a8008 100644
--- a/java_exception/number_format_exception.go
+++ b/java_exception/number_format_exception.go
@@ -40,3 +40,8 @@
 func (NumberFormatException) JavaClassName() string {
 	return "java.lang.NumberFormatException"
 }
+
+// equals to getStackTrace in java
+func (e NumberFormatException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/object_stream_exception.go b/java_exception/object_stream_exception.go
index 2e005d6..3b569d7 100644
--- a/java_exception/object_stream_exception.go
+++ b/java_exception/object_stream_exception.go
@@ -40,3 +40,8 @@
 func (ObjectStreamException) JavaClassName() string {
 	return "java.io.ObjectStreamException"
 }
+
+// equals to getStackTrace in java
+func (e ObjectStreamException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/optional_data_exception.go b/java_exception/optional_data_exception.go
index ab2dcdc..c901bf1 100644
--- a/java_exception/optional_data_exception.go
+++ b/java_exception/optional_data_exception.go
@@ -42,3 +42,8 @@
 func (OptionalDataException) JavaClassName() string {
 	return "java.io.OptionalDataException"
 }
+
+// equals to getStackTrace in java
+func (e OptionalDataException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/reflective_operation_exception.go b/java_exception/reflective_operation_exception.go
index 70b1632..703cc65 100644
--- a/java_exception/reflective_operation_exception.go
+++ b/java_exception/reflective_operation_exception.go
@@ -40,3 +40,8 @@
 func (ReflectiveOperationException) JavaClassName() string {
 	return "java.lang.ReflectiveOperationException"
 }
+
+// equals to getStackTrace in java
+func (e ReflectiveOperationException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/rejected_execution_exception.go b/java_exception/rejected_execution_exception.go
index b03b385..1a760c8 100644
--- a/java_exception/rejected_execution_exception.go
+++ b/java_exception/rejected_execution_exception.go
@@ -40,3 +40,8 @@
 func NewRejectedExecutionException(detailMessage string) *RejectedExecutionException {
 	return &RejectedExecutionException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e RejectedExecutionException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/runtime_exception.go b/java_exception/runtime_exception.go
index 993e81b..d4829c1 100644
--- a/java_exception/runtime_exception.go
+++ b/java_exception/runtime_exception.go
@@ -40,3 +40,8 @@
 func (RuntimeException) JavaClassName() string {
 	return "java.lang.RuntimeException"
 }
+
+// equals to getStackTrace in java
+func (e RuntimeException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/security_exception.go b/java_exception/security_exception.go
index efa3bb2..fb1961d 100644
--- a/java_exception/security_exception.go
+++ b/java_exception/security_exception.go
@@ -40,3 +40,8 @@
 func (SecurityException) JavaClassName() string {
 	return "java.lang.SecurityException"
 }
+
+// equals to getStackTrace in java
+func (e SecurityException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/stream_corrupted_exception.go b/java_exception/stream_corrupted_exception.go
index 5df3065..99793a9 100644
--- a/java_exception/stream_corrupted_exception.go
+++ b/java_exception/stream_corrupted_exception.go
@@ -40,3 +40,8 @@
 func (StreamCorruptedException) JavaClassName() string {
 	return "java.io.StreamCorruptedException"
 }
+
+// equals to getStackTrace in java
+func (e StreamCorruptedException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/string_index_out_of_bounds_exception.go b/java_exception/string_index_out_of_bounds_exception.go
index fcada97..2cce9cd 100644
--- a/java_exception/string_index_out_of_bounds_exception.go
+++ b/java_exception/string_index_out_of_bounds_exception.go
@@ -40,3 +40,8 @@
 func (StringIndexOutOfBoundsException) JavaClassName() string {
 	return "java.lang.StringIndexOutOfBoundsException"
 }
+
+// equals to getStackTrace in java
+func (e StringIndexOutOfBoundsException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/sync_failed_exception.go b/java_exception/sync_failed_exception.go
index 20f9b6b..ba4e7db 100644
--- a/java_exception/sync_failed_exception.go
+++ b/java_exception/sync_failed_exception.go
@@ -40,3 +40,8 @@
 func (SyncFailedException) JavaClassName() string {
 	return "java.io.SyncFailedException"
 }
+
+// equals to getStackTrace in java
+func (e SyncFailedException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/timeout_exception.go b/java_exception/timeout_exception.go
index 3692e5d..8456fda 100644
--- a/java_exception/timeout_exception.go
+++ b/java_exception/timeout_exception.go
@@ -40,3 +40,8 @@
 func (TimeoutException) JavaClassName() string {
 	return "java.util.concurrent.TimeoutException"
 }
+
+// equals to getStackTrace in java
+func (e TimeoutException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/too_many_listeners_exception.go b/java_exception/too_many_listeners_exception.go
index 93d2614..68d45b4 100644
--- a/java_exception/too_many_listeners_exception.go
+++ b/java_exception/too_many_listeners_exception.go
@@ -40,3 +40,8 @@
 func (TooManyListenersException) JavaClassName() string {
 	return "java.util.TooManyListenersException"
 }
+
+// equals to getStackTrace in java
+func (e TooManyListenersException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/type_not_present_exception.go b/java_exception/type_not_present_exception.go
index 09920ee..ed15498 100644
--- a/java_exception/type_not_present_exception.go
+++ b/java_exception/type_not_present_exception.go
@@ -41,3 +41,8 @@
 func NewTypeNotPresentException(typeName string, detailMessage string) *TypeNotPresentException {
 	return &TypeNotPresentException{TypeName: typeName, DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e TypeNotPresentException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/unchecked_IO_exception.go b/java_exception/unchecked_IO_exception.go
index 86e09cf..ac66e32 100644
--- a/java_exception/unchecked_IO_exception.go
+++ b/java_exception/unchecked_IO_exception.go
@@ -44,3 +44,8 @@
 func (UncheckedIOException) JavaClassName() string {
 	return "java.io.UncheckedIOException"
 }
+
+// equals to getStackTrace in java
+func (e UncheckedIOException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/undeclared_throwable_exception.go b/java_exception/undeclared_throwable_exception.go
index 64ba396..297425d 100644
--- a/java_exception/undeclared_throwable_exception.go
+++ b/java_exception/undeclared_throwable_exception.go
@@ -41,3 +41,8 @@
 func NewUndeclaredThrowableException(detailMessage string) *UndeclaredThrowableException {
 	return &UndeclaredThrowableException{DetailMessage: detailMessage, UndeclaredThrowable: Throwable{}}
 }
+
+// equals to getStackTrace in java
+func (e UndeclaredThrowableException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/unknown_format_conversion_exception.go b/java_exception/unknown_format_conversion_exception.go
index 986074a..74687af 100644
--- a/java_exception/unknown_format_conversion_exception.go
+++ b/java_exception/unknown_format_conversion_exception.go
@@ -43,3 +43,8 @@
 func (UnknownFormatConversionException) JavaClassName() string {
 	return "java.util.UnknownFormatConversionException"
 }
+
+// equals to getStackTrace in java
+func (e UnknownFormatConversionException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/unknown_format_flags_exception.go b/java_exception/unknown_format_flags_exception.go
index eb07864..ae0a334 100644
--- a/java_exception/unknown_format_flags_exception.go
+++ b/java_exception/unknown_format_flags_exception.go
@@ -41,3 +41,8 @@
 func (UnknownFormatFlagsException) JavaClassName() string {
 	return "java.util.UnknownFormatFlagsException"
 }
+
+// equals to getStackTrace in java
+func (e UnknownFormatFlagsException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/unmodifiable_class_exception.go b/java_exception/unmodifiable_class_exception.go
index a7c75d5..4ac7c3d 100644
--- a/java_exception/unmodifiable_class_exception.go
+++ b/java_exception/unmodifiable_class_exception.go
@@ -43,3 +43,8 @@
 func (UnmodifiableClassException) JavaClassName() string {
 	return "java.lang.instrument.UnmodifiableClassException"
 }
+
+// equals to getStackTrace in java
+func (e UnmodifiableClassException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/unsupported_operation_exception.go b/java_exception/unsupported_operation_exception.go
index 01f3e06..3c16ed0 100644
--- a/java_exception/unsupported_operation_exception.go
+++ b/java_exception/unsupported_operation_exception.go
@@ -40,3 +40,8 @@
 func (UnsupportedOperationException) JavaClassName() string {
 	return "java.lang.UnsupportedOperationException"
 }
+
+// equals to getStackTrace in java
+func (e UnsupportedOperationException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/unsupported_temporal_type_exception.go b/java_exception/unsupported_temporal_type_exception.go
index 9ebc180..6ec8f44 100644
--- a/java_exception/unsupported_temporal_type_exception.go
+++ b/java_exception/unsupported_temporal_type_exception.go
@@ -40,3 +40,8 @@
 func (UnsupportedTemporalTypeException) JavaClassName() string {
 	return "java.time.temporal.UnsupportedTemporalTypeException"
 }
+
+// equals to getStackTrace in java
+func (e UnsupportedTemporalTypeException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/utf_data_format_exception.go b/java_exception/utf_data_format_exception.go
index fe1c8e9..356033a 100644
--- a/java_exception/utf_data_format_exception.go
+++ b/java_exception/utf_data_format_exception.go
@@ -40,3 +40,8 @@
 func (UTFDataFormatException) JavaClassName() string {
 	return "java.io.UTFDataFormatException"
 }
+
+// equals to getStackTrace in java
+func (e UTFDataFormatException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/write_aborted_exception.go b/java_exception/write_aborted_exception.go
index cb03a1f..7f24bdb 100644
--- a/java_exception/write_aborted_exception.go
+++ b/java_exception/write_aborted_exception.go
@@ -42,3 +42,8 @@
 func (WriteAbortedException) JavaClassName() string {
 	return "java.io.WriteAbortedException"
 }
+
+// equals to getStackTrace in java
+func (e WriteAbortedException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/wrong_method_type_exception.go b/java_exception/wrong_method_type_exception.go
index 7e47062..2fd20c7 100644
--- a/java_exception/wrong_method_type_exception.go
+++ b/java_exception/wrong_method_type_exception.go
@@ -40,3 +40,8 @@
 func NewWrongMethodTypeException(detailMessage string) *WrongMethodTypeException {
 	return &WrongMethodTypeException{DetailMessage: detailMessage}
 }
+
+// equals to getStackTrace in java
+func (e WrongMethodTypeException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/zip_exception.go b/java_exception/zip_exception.go
index e67aa1c..894134d 100644
--- a/java_exception/zip_exception.go
+++ b/java_exception/zip_exception.go
@@ -40,3 +40,8 @@
 func (ZipException) JavaClassName() string {
 	return "java.util.zip.ZipException"
 }
+
+// equals to getStackTrace in java
+func (e ZipException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_exception/zone_rules_exception.go b/java_exception/zone_rules_exception.go
index 3b16471..4143ae4 100644
--- a/java_exception/zone_rules_exception.go
+++ b/java_exception/zone_rules_exception.go
@@ -40,3 +40,8 @@
 func (ZoneRulesException) JavaClassName() string {
 	return "java.time.zone.ZoneRulesException"
 }
+
+// equals to getStackTrace in java
+func (e ZoneRulesException) GetStackTrace() []StackTraceElement {
+	return e.StackTrace
+}
\ No newline at end of file
diff --git a/java_unknown_exception.go b/java_unknown_exception.go
new file mode 100644
index 0000000..6787e3c
--- /dev/null
+++ b/java_unknown_exception.go
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package hessian
+
+import (
+	"fmt"
+	"sync"
+)
+
+import (
+	"github.com/apache/dubbo-go-hessian2/java_exception"
+)
+
+var mutex sync.Mutex
+
+func checkAndGetException(cls classInfo) (structInfo, bool) {
+
+	if len(cls.fieldNameList) < 4 {
+		return structInfo{}, false
+	}
+	var (
+		throwable structInfo
+		ok        bool
+	)
+	var count = 0
+	for _, item := range cls.fieldNameList {
+		if item == "detailMessage" || item == "suppressedExceptions" || item == "stackTrace" || item == "cause" {
+			count++
+		}
+	}
+	// if have these 4 fields, it is throwable struct
+	if count == 4 {
+		mutex.Lock()
+		defer mutex.Unlock()
+		if throwable, ok = getStructInfo(cls.javaName); ok {
+			return throwable, true
+		}
+		RegisterPOJO(newBizException(cls.javaName))
+		if throwable, ok = getStructInfo(cls.javaName); ok {
+			return throwable, true
+		}
+	}
+	return throwable, count == 4
+}
+
+type UnknownException struct {
+	SerialVersionUID     int64
+	DetailMessage        string
+	SuppressedExceptions []java_exception.Throwabler
+	StackTrace           []java_exception.StackTraceElement
+	Cause                java_exception.Throwabler
+	name                 string
+}
+
+// NewThrowable is the constructor
+func newBizException(name string) *UnknownException {
+	return &UnknownException{name: name, StackTrace: []java_exception.StackTraceElement{}}
+}
+
+// Error output error message
+func (e UnknownException) Error() string {
+	return fmt.Sprintf("throw %v : %v", e.name, e.DetailMessage)
+}
+
+//JavaClassName  java fully qualified path
+func (e UnknownException) JavaClassName() string {
+	return e.name
+}
+
+// equals to getStackTrace in java
+func (e UnknownException) GetStackTrace() []java_exception.StackTraceElement {
+	return e.StackTrace
+}
diff --git a/java_unknown_exception_test.go b/java_unknown_exception_test.go
new file mode 100644
index 0000000..ea24321
--- /dev/null
+++ b/java_unknown_exception_test.go
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package hessian
+
+import (
+	"testing"
+)
+import (
+	"github.com/stretchr/testify/assert"
+)
+
+func TestCheckAndGetException(t *testing.T) {
+	clazzInfo1 := classInfo{
+		javaName:      "com.test.UserDefinedException",
+		fieldNameList: []string{"detailMessage", "code", "suppressedExceptions", "stackTrace", "cause"},
+	}
+	s, b := checkAndGetException(clazzInfo1)
+	assert.True(t, b)
+
+	assert.Equal(t, s.javaName, "com.test.UserDefinedException")
+	assert.Equal(t, s.goName, "hessian.UnknownException")
+
+	clazzInfo2 := classInfo{
+		javaName:      "com.test.UserDefinedException",
+		fieldNameList: []string{"detailMessage", "code", "suppressedExceptions", "cause"},
+	}
+	s, b = checkAndGetException(clazzInfo2)
+	assert.False(t, b)
+	assert.Equal(t, s, structInfo{})
+}
diff --git a/list.go b/list.go
index 34c8aec..87aef90 100644
--- a/list.go
+++ b/list.go
@@ -29,6 +29,9 @@
 import (
 	perrors "github.com/pkg/errors"
 )
+import (
+	"github.com/apache/dubbo-go-hessian2/java_exception"
+)
 
 var (
 	listTypeNameMapper = &sync.Map{}
@@ -46,6 +49,8 @@
 		"date":             reflect.TypeOf(time.Time{}),
 		"object":           reflect.TypeOf([]Object{}).Elem(),
 		"java.lang.Object": reflect.TypeOf([]Object{}).Elem(),
+		// exception field StackTraceElement
+		"java.lang.StackTraceElement": reflect.TypeOf([]*java_exception.StackTraceElement{}).Elem(),
 	}
 )
 
diff --git a/object.go b/object.go
index e2ef7b3..9148dfa 100644
--- a/object.go
+++ b/object.go
@@ -547,6 +547,10 @@
 	cls = d.classInfoList[idx]
 	s, ok = getStructInfo(cls.javaName)
 	if !ok {
+		// exception
+		if s, ok = checkAndGetException(cls); ok {
+			return s.typ, cls, nil
+		}
 		if !d.isSkip {
 			err = perrors.Errorf("can not find go type name %s in registry", cls.javaName)
 		}
diff --git a/test_hessian/src/main/java/test/TestThrowable.java b/test_hessian/src/main/java/test/TestThrowable.java
index 20652ff..3647e67 100644
--- a/test_hessian/src/main/java/test/TestThrowable.java
+++ b/test_hessian/src/main/java/test/TestThrowable.java
@@ -409,4 +409,8 @@
     return new AnnotationTypeMismatchException(Override.class.getEnclosingMethod(), "AnnotationTypeMismatchException");
   }
 
+  public static Object throw_UserDefindException() {
+      return new UserDefindException("throw UserDefindException");
+  }
+
 }
diff --git a/test_hessian/src/main/java/test/UserDefindException.java b/test_hessian/src/main/java/test/UserDefindException.java
new file mode 100644
index 0000000..26d1db1
--- /dev/null
+++ b/test_hessian/src/main/java/test/UserDefindException.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package test;
+
+public class UserDefindException extends RuntimeException{
+    public UserDefindException(String dd){
+        super(dd);
+    }
+}
\ No newline at end of file