cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry App - Java part - Сatch the Java exception.

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

That is most likely a back end error so you would need to check the SAP logs for details.  SMP can't log it since the error occurred at the backend.

--Bill

Former Member
0 Kudos

The error gone when I added index into the Agentry Complex Table ctPlant.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Answers (0)