Custom Code deploy error Class can not be used in custom code deployment

0 votes

Hello,

I am using https://github.com/shephertz/App42_CustomCode_Sample

After writing my custom code, I am trying to deploy it.
Although the sample provided worked fine, I cannot upload my code because :

Exception in thread "main" com.shephertz.app42.paas.sdk.java.App42BadParameterException: {"app42Fault":{"httpErrorCode":400,"appErrorCode":1900,"message":"Bad Request","details":"Class can not be used in custom code deployment java.lang.System : in source com.myCompany.myApp.Server.Helper.AntHelper"}}

at com.shephertz.app42.paas.sdk.java.util.Util.multiPartRequest(Util.java:344)
at com.shephertz.app42.paas.sdk.java.customcode.CustomCodeService.deployJarFile(CustomCodeService.java:84)
at com.myCompany.myApp.Server.Helper.AntHelper.upload(AntHelper.java:20)
 

The error description doesnt help me much...
What are the conditions to be able to upload custom class to app42 backend ?

asked Mar 10, 2014 in App42 Cloud API-BaaS by asmodehn (15 points)

1 Answer

0 votes
java.lang.System class is not allowed to be used inside Custom Code.

Can you please let me know for which purpose you are using this class? Probably I can suggest some alternate to do this.
answered Mar 10, 2014 by ajay123 (899 points)
This came from the sample I used.
java.lang.System is used in AntHelper to log a few things.
And I was mistakenly putting this class into the jar I was trying to deploy.

I also came to realize that the package name for my custom code has to start with :
com.shephertz.app42.paas.customcode.... or it will refuse to deploy it.
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
...