Topic
  • 2 replies
  • Latest Post - ‏2011-07-27T18:32:33Z by SystemAdmin
SystemAdmin
SystemAdmin
14225 Posts

Pinned topic Android, RSA8, and java.lang.NoClassDefFoundError: sun/security/x509/X500Na

‏2011-07-26T19:22:10Z |
I am experiencing the following runtime failure when trying to develop Android applications in IBM RSA 8.0.2

NoClassDefFoundError: sun/security/x509/X500Name

This occurs when i run my Android app

I believe this NCDF error is due to RSA8 using the IBM jre and not the Sun version.

However when i specify the sun jre location in the eclipse.ini file (using the -vm option) RSA does not start

When i do not specify any jre in the eclipse.ini file RSA fails to start

When i leave the IBM jre location in the jre, RSA starts fine, however i am unable to force RSA to use the Sun jdk as a runtime environment using the windows preferences options

Does anyone have any other ideas/knowledge of how to...

1). Use RSA8 to develop Android applications?
2). specify a jre in the eclipse.ini file other than the ibm supplied one?

Thanks
Updated on 2011-07-27T18:32:33Z at 2011-07-27T18:32:33Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Android, RSA8, and java.lang.NoClassDefFoundError: sun/security/x509/X500Na

    ‏2011-07-27T15:47:46Z  
    I am not specifically familiar with Android development, but there are two places where one can configure the JVM in any Eclipse based application such as Rational Software Architect:

    • eclipse.ini
    Here you configure the JVM used to run Eclipse itself

    • Windows->Preferences->Java->Installed JREs
    Here you configure the JRE used to run the applications you develop.

    From your description, I do not have the impression that you would need to change the first setting, but the second, which is the one actually used for running applications developed inside Eclipse (after you add a JRE here, you also typically reference it in the classpath of your project).

    If you really needed to change the JVM used to Run RSA, then likely you would have to pay attention to any command line switches after the
    -vmargs parameters in eclipse.ini, which could be proprietary to the IBM JVM and unsupported by the JVM you have chosen.

    One of the problematic ones would likely be the Generational Concurrent Garbage Collector policy: -Xgcpolicy:gencon

    The only scenario for changing the RSA JVM occurs when you first install a compatible Eclipse version (started with a compatible JVM that does not have to be the IBM one) and then install RSA on top of it:

    https://www-304.ibm.com/support/docview.wss?uid=swg27019519#JRE

    In that case you also need Eclipse patches as described here:

    http://www.ibm.com/developerworks/wikis/display/rationalinstall/Install+into+an+existing+Eclipse+instance
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: Android, RSA8, and java.lang.NoClassDefFoundError: sun/security/x509/X500Na

    ‏2011-07-27T18:32:33Z  
    I am not specifically familiar with Android development, but there are two places where one can configure the JVM in any Eclipse based application such as Rational Software Architect:

    • eclipse.ini
    Here you configure the JVM used to run Eclipse itself

    • Windows->Preferences->Java->Installed JREs
    Here you configure the JRE used to run the applications you develop.

    From your description, I do not have the impression that you would need to change the first setting, but the second, which is the one actually used for running applications developed inside Eclipse (after you add a JRE here, you also typically reference it in the classpath of your project).

    If you really needed to change the JVM used to Run RSA, then likely you would have to pay attention to any command line switches after the
    -vmargs parameters in eclipse.ini, which could be proprietary to the IBM JVM and unsupported by the JVM you have chosen.

    One of the problematic ones would likely be the Generational Concurrent Garbage Collector policy: -Xgcpolicy:gencon

    The only scenario for changing the RSA JVM occurs when you first install a compatible Eclipse version (started with a compatible JVM that does not have to be the IBM one) and then install RSA on top of it:

    https://www-304.ibm.com/support/docview.wss?uid=swg27019519#JRE

    In that case you also need Eclipse patches as described here:

    http://www.ibm.com/developerworks/wikis/display/rationalinstall/Install+into+an+existing+Eclipse+instance
    thankyou for your time in answering my question

    today i managed to complete the android hello world in IBM RSA v8.0.2 by editing the eclipse.ini file

    so that it only contained the -vm <sun jdk location>/javaw.exe

    i am sure i can add some of the other options now i know how to proceed

    thanks again for your response