• Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.4, 2.5
    • Fix Version/s: 2.9.0
    • Component/s: API
    • Labels:
    • Environment:
      Eclipse Helios Service Release 1, mongodb 1.6.5, Android SDK version 7/release 2, Windows XP SP3, Windows Vista SP2
    • # Replies:
    • Last comment by Customer:


      Hello to everybody,

      I am facing the following problem:

      I am trying to use the java driver within the android SDK and it gets crashed when use it as a precompiled jar (ver. 2.3, ver.2.4, ver.2.5)
      whether I use it as-is or after converting it to dex format with dx.

      Here is the stack trace:

      03-11 22:38:17.320: INFO/dalvikvm(230): Could not find method, referenced from method org.bson.types.ObjectId.<clinit>
      03-11 22:38:17.320: WARN/dalvikvm(230): VFY: unable to resolve static method 1537: Ljava/lang/management/ManagementFactory;.getRuntimeMXBean ()Ljava/lang/management/RuntimeMXBean;
      03-11 22:38:17.320: DEBUG/dalvikvm(230): VFY: replacing opcode 0x71 at 0x006c
      03-11 22:38:17.320: DEBUG/dalvikvm(230): Making a copy of Lorg/bson/types/ObjectId;.<clinit> code (529 bytes)
      03-11 22:38:17.410: WARN/dalvikvm(230): Exception Ljava/lang/RuntimeException; thrown during Lorg/bson/types/ObjectId;.<clinit>
      03-11 22:38:17.580: WARN/dalvikvm(230): Exception Ljava/lang/ExceptionInInitializerError; thrown during Lcom/mongodb/Bytes;.<clinit>

      I have tried to use the source code in the project but depends on the MBeanServer component and the package , hence it can't be compiled for dalvik because of their absence. The exception is thrown from the file ObjectId.class where
      the MBeanServer is called.

      I read in that the compilation of is optional but I couldn't figure it out.

      Any help is greatly apreciated.


          Issue Links



              • Votes:
                2 Vote for this issue
                2 Start watching this issue


                • Created:
                  Days since reply:
                  5 years, 39 weeks, 4 days ago
                  Date of 1st Reply: