text: rms inconsistencies in sdk ea2? | Oracle Community	Skip navigationOracle Community DirectoryOracle Community FAQGo Directly To Oracle Technology Network CommunityMy Oracle Support CommunityOPN Cloud ConnectionOracle Employee CommunityOracle User Group CommunityTopliners CommunityJava CommunityOTN Speaker BureauLog inRegisterSearchSearchCancelError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page.
  Please enter a title.	You can not post a blank message. Please type your message and try again.	More discussions in Java Embedded MOOC All PlacesJavaEmbedded TechnologiesJava Embedded MOOC 7 Replies
  Latest reply on Apr 25, 2014 11:02 AM by Andrey.P-Oracle rms inconsistencies in sdk ea2?
  Colin Cooper Apr 20, 2014 5:57 PM
  I ran into some issues implementing RMSPersistentStore. It seems as though oracle-jmesdk-8-0-ea2-win32-bin.exe installs into c:\Java_ME_platform_SDK_8.0_EA an RMS whose RecordStore.addRecord signature is: public int addRecord(byte[], int, int) throws javax.microedition.rms.InvalidRecordIDException, javax.microedition.rms.RecordStoreException, javax.microedition.rms.RecordStoreNotOpenException However EA2 actually contains:public int addRecord(byte[], int, int) throws javax.microedition.rms.RecordStoreNotOpenException, javax.microedition.rms.RecordStoreException, javax.microedition.rms.RecordStoreFullException; The javadoc in Java_ME_platform_SDK_8.0_EA is consistent with the latter In either case, the RMSPersistentStore.saveData implementation has to catch and wrap these exceptions, as the course-provided PersistentStore.java declares saveData to throw an IOException -- but the RecordStoreException classes don't extend IOException. I'd appreciate if anyone could confirm that the above is accurate; if not could you point me to which bit of my environment might be incorrect. Thanks Colin
  Re: rms inconsistencies in sdk ea2?
  Andrey.P-Oracle Apr 21, 2014 7:48 AM
  Hi Colin, I'm not sure what your mean that ME SDK 8.0 EA installs an RMS with invalid method signature. But RecordStore.addRecord() shall have RecordStoreFullException, not InvalidRecordIDException. And Oracle's Java ME runtime has always had the proper signature WRT the PersistentStore.java I'll let for Tom to answer Regards,Andrey
  Colin Cooper Apr 21, 2014 11:43 AM
  Andrey, I'm intrigued by your claim that "Oracle's Java ME runtime has always had the proper signature"? oracle-jmesdk-8-0-ea2-win32-bin.exe installscode - C:\Java_ME_platform_SDK_8.0_EA\lib\meep_8.0-rms.jarextracting & decompiling RecordStore showsaddRecord(byte[], int, int) throws javax.microedition.rms.InvalidRecordIDException, javax.microedition.rms.RecordStoreException, javax.microedition.rms.RecordStoreNotOpenException;javadoc - C:\Java_ME_platform_SDK_8.0_EA\docs\api\meep-8.0.zipjavadoc for RecordStore showsaddRecord(byte[] data, int offset, int numBytes) throws RecordStoreNotOpenException,RecordStoreException, RecordStoreFullException This, to me, is an inconsistency. Are you claiming that the class in your jar has a different signature for addRecord? Regards, Colin
  Trinity Apr 25, 2014 9:14 AM
  Hi Colin Almost everyone usually only use the general RecordStoreException which is the superclass exception of both InvalidRecordIDException and RecordStoreFullException and several other exceptions as well.
  Andrey.P-Oracle Apr 25, 2014 9:25 AM
  Hi Colin, Please pardon my long reply. A small explanation: the meep_8.0-rms.jar is actually not the code, but rather stubs which are only used when application is compiled into bytecode (These are supplied to javac under the hood when you hit the Build or Run in Netbeans). The "runtime" I've referred to is the actual implementation of Java ME technology and is not directly related to the .jars in the lib folder (although in theory these should match ) So yes, this is definitely an inconsistency, but, unless you really write "catch (InvalidRecordIDException)" into your application it does not effect you Regards,Andrey
  Trinity Apr 25, 2014 9:44 AM
  Thanks Andrey, also I think you can write out all the subclass exceptions of RecordStoreException, including the RecordStoreException itself without being affected....just in case you really want to catch specific exceptions.
  Colin Cooper Apr 25, 2014 10:58 AM
  Thanks - that explains a lot. It would be good if the stubs matched the implementation though -- I only discovered this when NetBeans generated a catch block for me which the compiler later rejected.
  Andrey.P-Oracle Apr 25, 2014 11:02 AM
  Absolutely agree. But please note that letters EA in "EA2" deciphers to "Early Access" Of course the bug was fixed, you will not find it in "EA2 latest developer build" or GA release, when it's out Regards,Andrey