corda / node-server

Corda Springboot and RPCClient server for DevEx tools
5 stars 8 forks source link

In transaction service throwing class not found makes the tool unusable #2

Closed DannyRussellWP closed 4 years ago

DannyRussellWP commented 4 years ago

In other places within the same file (i.e. line 422, 425 etc) you print the stack trace rather than throwing the exception. By the throwing an exception it breaks the entire tool because you cannot see, the vault, or transactions or the flow list. Better to print the stack trace and return the items that do work.

In the current implementation having the r3 billing app jar in the cordapps folder breaks all of the other cordapps because it cannot find the class StateAndRef

I have changed line 473 of transactionServiceImpl from throw new GenericException(cne.getMessage()); to cne.printStackTrace();

And this now enables us to view our vault and transactions (and the 20 odd other cordapps that are working fine)

anixon604 commented 4 years ago

@DannyRussellWP thanks for the heads-up. The node-server has now been adjusted to allow valid flow constructors to pass through. The printStackTrace() was implemented one method up at line 447, so that invalid constructors can be shielded from the UI. That particular flow will now show an error message if there isn't at LEAST 1 constructor with valid params.

Changes have been committed and new node-explorer binaries are also available. https://github.com/corda/node-explorer/releases

DannyRussellWP commented 4 years ago

Thanks @anixon604 . I will test them now

DannyRussellWP commented 4 years ago

I can confirm this has worked. thank you