Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-1988] Better java exception handling in the java/JNI layer #714

Merged
merged 4 commits into from
Sep 23, 2016

Conversation

selvaganesang
Copy link
Contributor

The stack trace of the exception displayed from JNI side now contains the
cause of the exception displayed in a nested way.

The stack trace of the exception displayed from JNI side now contains the
cause of the exception displayed in a nested way.
@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1154/

@Traf-Jenkins
Copy link

Fix for the check-PR failure in seabase test suite
@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1158/

@Traf-Jenkins
Copy link

Copy link
Contributor

@DaveBirdsall DaveBirdsall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

return true;
}

void JavaObjectInterfaceTM::appendExceptionMessages(JNIEnv *jenv, jthrowable a_exception, std::string *error_msg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't expect error_msg to be null, it might be better to code this as a reference parameter rather than a pointer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dave fixed as per your comments

Fixes as per the review comments

TM exception logging was at times dumping TM core because log4cxx
infrastructure was not initialized  early in the process startup.
Initialized it as early as it can be done.
@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1167/

@Traf-Jenkins
Copy link

Copy link
Contributor

@DaveBirdsall DaveBirdsall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Looks good to me.

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1172/

@Traf-Jenkins
Copy link

Copy link
Contributor

@sbroeder sbroeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not an expert on the logging code, but the changes seem fine to me.

@sureshsubbiah
Copy link
Contributor

+1. Executor portion looks very nice. I am curious to see what kind of output the getCause method produces. If you have a sample handy, please add it to the JIRA.

Copy link
Contributor

@narendragoyal narendragoyal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@asfgit asfgit merged commit 7af1fd0 into apache:master Sep 23, 2016
@prashanth-vasudev
Copy link
Contributor

Changes look good. This change will also help during startup if TM encounters exceptions connecting to Hbase.

@trinakrug
Copy link

Looks good to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants