my custom code "app42Fault":{"httpErrorCode":400,"appErrorCode":1903,"message":"Bad Request","details":" occurred!

0 votes

this is my exception message 

Exception :com.shephertz.app42.paas.sdk.android.App42BadParameterException: {"app42Fault":{"httpErrorCode":400,"appErrorCode":1903,"message":"Bad Request","details":" Application Exception : com.shephertz.app42.paas.customcode.sample.MyCustomCode"}}

 

Exception Message{"app42Fault":{"httpErrorCode":400,"appErrorCode":1903,"message":"Bad Request","details":" Application Exception : com.shephertz.app42.paas.customcode.sample.MyCustomCode"}} requestJSON {"GameMsg":17,"UID":"zet353","username":"xery"}

 

---> this is my request 

 

App42API.initialize( this ,"xxxxxxxxx","xxxxxxxxxxxxxxxx");  

storageService = App42API.buildStorageService();

customCodeService = App42API.buildCustomCodeService();  

 

 

public static void SendJSON( final JSONObject requestJSON, final int nMSG ){

Log.d(TAG, " SendJSON() call nMSG : " + nMSG  );

System.out.println(" SendJSON() CALL !!! requestJSON is " + requestJSON + " nMSG : " + nMSG) ; 

customCodeService.runJavaCode(CustomCodeServerName, requestJSON, new App42CallBack() {  

public void onSuccess(Object response)   

{  

 

}

---> this is my excute 

 

public class MyCustomCode implements Executor {

 

private ServiceAPI sp = new ServiceAPI(  

"xxxxxxxxxxx9",

      "8xxxxxxxxxxxxxxb");

 

ServiceAPI app42ServiceAPI = new ServiceAPI("xxxxxxxxx","xxxxxxxxxxxxxx");

StorageService storageService = app42ServiceAPI.buildStorageService();

 

private final int HTTP_STATUS_SUCCESS = 200;

private String dbName = "xxxxxxxxxx";

private String moduleName = "xxxxxxxxxxx";

 

boolean bEtherItem = false;

LogService logger = sp.buildLogService();

 

public HttpResponseObject execute(HttpRequestObject request) {

 

JSONObject body = request.getBody();

// Build Log Service For logging in Your Code

 

logger.debug(" Recieved Request Body : :" + body.toString(), moduleName);

 

// Write Your Custom Code Here

// ......//

JSONObject jsonResponse = null;

 

try {

 

int GameMsg = body.getInt("GameMsg");

String strUserName = body.getString("username");

jsonResponse.put("username", strUserName);

} catch (JSONException e) {

// TODO Auto-generated catch block

// e.printStackTrace();

logger.debug(" HttpResponseObject JSONObject body JSONException e: :" + e.toString(), moduleName);

}

//System.out.println("MyCustomCode JSONObject SummonHero call requestJSON : " + requestJSON );  

//logger.info("Running Custom Code Hello World  ", moduleName);

// Create JSON Response Based on Your business logic

logger.debug(" !!!!!!!HttpResponseObject execute(HttpRequestObject request) call return new HttpResponseObject jsonResponse : :" + jsonResponse.toString(), moduleName);

return new HttpResponseObject(HTTP_STATUS_SUCCESS, jsonResponse);

}

until last day code work but today i deploy new customcode suddenly error occured!!! what problem?

give me answer please!

 

 

asked Feb 18, 2016 in Java by zetcrusader (13 points)

1 Answer

0 votes

Hi,

 
We notice that there was some issue while deploying new jar files on App42 Custom code server. I believe it has been resolved now, could you please verify for the same and let me know if you still face any issue. 
 
Regards,
Himanshu Sharma
answered Feb 18, 2016 by hs00105 (2,005 points)
Not yet. I have the last two or three hours trying to download my .jar file to Custom code, constantly appears Internal Server Error.
If you still get any exception then let us know.

regards,
Himanshu Sharma
yes the problem be gone... thank you
Internal Server Error when upload .jar to Custom code
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...