cancel
Showing results for 
Search instead for 
Did you mean: 

Geting errors while using MBOs

0 Kudos

Dear All,

       I am using Sybase Unwired Workspace( Mobile SDK) version 2.1 esd 3.

      When I am adding an MBO in my Mobile App project. It gives out a error:

         > Invalid attribute name : '<mbo name>-TYPE'.name cannot be a Java or C# language keyboard

      When I am trying to generate the code, it gives out a information message:

          >  The third-party class 'android.content.Context' cannot be found

      

      When I am generating code. In the 'src' folder the program '<project name>DB.java' program I'm getting error in the following code:

    

     How to overcome these errors.


Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

SUP wont allow you to create your MBO attributes with keywords like TYPE. Use any other Name for your attribute or just modify "TYPE" to "_TYPE" as said above.

Regards

Srinivas.

DoanManhQuynh
Active Contributor
0 Kudos

just change your attirbute "TYPE" to another name (like "_TYPE") to fix the first error: Invalid attribute name : '<mbo name>-TYPE'.name cannot be a Java or C# language keyboard. I think it is the main cause.

Former Member
0 Kudos

Hi Supriyo,

When you right click and say generate code it starts a wizard..... In the last step of the wizard it asks for Third-party jar file so here you need to provide Android API file ie. Android.jar.

You will find this file in android sdk (<path>\android-sdk\platforms\android-8\Android.jar).....

After this copy your code in Android Project.....

Still you will find some errors....

Now you need to copy some more jar files into your android project's lib directory....

Go to C:\Sybase\UnwiredPlatform\MobileSDK22\ObjectAPI\Android\ copy all jar files....

Also copy that armeabi folder in same directory....

After this right click on project -> go to properties -> Java Build Path -> Libraries -> Add Jar

Select all jar files from the lib directory....

Over.....

Regards

ShashanK MarathE

midhun_vp
Active Contributor
0 Kudos
  • What do you mean by "  When I am adding an MBO in my Mobile App project. It gives out a error:". Are you getting an error when you are adding MBO in the Sybase workspace or when you are adding the Generated code into the Android project. Have you added the libraries needed as . If not please add the required files.

  • Please ignore the error

The third-party class 'android.content.Context' cannot be found

Once you add the code to the Eclipse environment where you develop the android app this error will be solved. It is related to the missing of the android context.

- Midhun VP

0 Kudos

The image is not clear. The image texts are given below:

public static synchronized void setApplication(com.sybase.mobile.Application app)

    {

                              com.sybase.sup.client.mbs.RegistryUtil.setApplicationContext(app.getInstance().getApplicationContext());

          initialize();

    }