简体   繁体   中英

Cannot pass try catch block return value within two methods

This is the code :


这是代码

On top of the question you can see the code. 
This is the first method (cell_data()).It's got the oracle db cell value.
I want to pass the cell_data() return value to  PUTSuccessful_2() method.
Always display the below result.

but the result is this:Updated column cell: null

I am using to run the maven test to run this code. if I am adding a main method db value is get correctly.

**This is the result**


Updated column cell: null

There are two possibilities here. 1. You are getting an exception. Log statement inside the catch block could prove that. 2. The M150_DESCRIPTION column in table is null

Most probably you are not able to establish db connection . Firstly check the db connection and then check whether your query is returning any result or not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM