on 08-31-2016 12:29 PM
Agentry App - Java part - Сatch the Java exception.
Hi All
I work with Agentry application and noticed one thing.
When SMP performs Java part of Agentry App and error happens, it doesn't raise the exception and doesn't write anything in the transfer log.
I tested it using next code when accept the data for a complex table
@Override
public void setProperties(Table arg0) throws Exception {
setMatnr(arg0.getString("MATNR-Error"));
setMaktx(arg0.getString("MAKTX"));
}
the field name "MATNR-Error" does not exists in the table but transfer log shows nothing about it.
The debugger stops on this line but skips rest of the code.
Is it possible to make SMP or Eclipse to raise the exception in such cases and writes about it in the log?
Yes, its possible. You have to enhance the class and catch the exception and throw the message to client. so, that sync will not proceed further.
Thanks
Ajitesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ajitesh
Could you give an example of code.
Can SMP be customized to write all exceptions to the log.
Now I have brief information on display at Transfer time.
Logging user into server
Logged in
Sending client info
Sending time info...
Receiving time info...
Checking Transmit Configuration
Updating table Complex Table Names
Updating table Network Connection
Checking Data Tables
Received new table Airport Data Table
Checking Complex Tables
Server error - please contact your administrator (13)
Logging user out
but nothing in the C:\SAP\MobilePlatform3\Server\log\BDV-VP7-PC-smp-server.log
Glad you found the solution.
Please mark this Discussion with a Correct Answer and Helpful Answer where appropriate. See http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why Even if you discovered the solution without any outside contributions, it helps others to understand what the solution turned out to be.
--Bill
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.