6 Replies Latest reply: Sep 27, 2013 12:35 AM by EJP RSS

    CurrencyData - missing currency

    pawel

      Hi,

       

      I have in production mode on WLS 8.1* java jrockit 142_10 and i found that i have 20 missing currency up to now:

      //    AFN, AZN, COU, CUC, GHS, MGA, XUA, MZN,RSD, XSU, SSP, SDG,  SRD,CHE, CHW, TMT, UYI, VEF, ZMW, ZWL,

       

      I can't upgrade java so i have to change ownself CurrencyData class in my java ver.

      I want to take this class from java jrockit 160_29:

       

      [code]

      class CurrencyData

      {

       

          CurrencyData()

          {

          }

       

          static final String version = "140";

          static final String mainTable = "\177\177\177\201CM\202\177\202\177\177KCF@\177\200R\203\201C\177F\201\177\204LC\177S\201\205Mc\005\205\177\201CCA\177\177KCM\177\206O\177\021CC\177\207E\177\210\210E\205\177\211\017\210XO\177\177BC\177OD\177\207\212J\177\177\177\177\201\177\177\177\177\005J\177\202\177O\177\177\177\177\177\177\177\177\177\177C\177\177\203\177J\177O\213\177\177\177\177\177\177\177\177\177M\201A\177\177\177\177\177\177\177\177\177\177\177\177\177\177\201CO\177\203\177\214\177\177\201\177\177\177\177\177\177\177\177\210O\177\202K\201\215\216O\177\177\214C\005\177\201\210\201\215P\203\177\205\177C\177\177\177\177\177\177\177\177\177\177\177C\177\207K\177\177\177J\177FE\177\177\177\177\177\177\177\177Q\201\177\177\177\177\177\177R\215Q\203\177cQ\n\201\177\177\177\177\177\177\177\177\177\177\215\177\177\177\177\177\177\177C\177c\030\177\177\177\177\177\177\177\177\177\177\177\177\177\177R\177RQ\207\177\177\177\005\202\177V\177\026\177\177\177\177c\177CSJO\202\177\177\177\177\177\217\177Q\177\177\177\177\177\177CKK\201K\177\177c\177C\177\201K\201\201@\203\177\177C\205JSO\203\201N\202\220QQJMQ\221C\177\222\177\205\207M\177N\177\177\201\177\177JQ\177\207\177\177\211\177\177\177\177C\177\177\177\177\177\177\177\177\177\177\177\177q\177\177\177\177\177\177\177\177\177\177\177\177\177A\177\177\177M\222JO\177\177QM\201\211\177\177\177\203\223\201\177\177\203\177\006\177Q\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\201\177\177\177\177\177\177\177\177\177\224\177\177\177C\177A\177\005\177\177\177QCQFJ\177CO\201\206JK\201\205R\177\177C\177C\177B\177\177OK\177\177\203\210\177\201\205A\177R\211\203LcO\177\177\225\177C\177\207C\177\177RG\177\177\177\177\177W\177\177\177\177\177\203\177\177\177\177\177C\177\177\177\177\177TR\201\177\202\177\226\177\203\177\203\177\177\177\177C\177\177\177\177\177\177\025\177\177\177\177\177\177\177\177\177\177\222\177\177\177\177\177\177\177\177\177\177\177\177S\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177Q\177\177\177\177\177\177\177\177\177\177\177\177\177\177\201\177\177\177\177\177\177Q\177\177\177\177\177\177\177\177\177\177\177J\177\177\177\177\177\177\177\177\177C\177\177\177";

          static final long scCutOverTimes[] = {

              0x7fffffffffffffffL, 0x7fffffffffffffffL, 0x7fffffffffffffffL, 0x1088267b200L, 0x7fffffffffffffffL, 0x7fffffffffffffffL, 0x7fffffffffffffffL, 0x7fffffffffffffffL, 0x7fffffffffffffffL, 0x1173237e700L,

              0x7fffffffffffffffL, 0x7fffffffffffffffL, 0x7fffffffffffffffL, 0x1137f13a400L, 0x7fffffffffffffffL, 0x117326ed580L, 0x10c26f49b00L, 0x7fffffffffffffffL, 0x7fffffffffffffffL, 0x104cf0c8080L,

              0x1012b246300L, 0x11733817e00L

          };

          static final String scOldCurrencies[] = {

              "EUR", "XCD", "USD", "AZM", "XOF", "NOK", "AUD", "XAF", "NZD", "CYP",

              "MAD", "DKK", "GBP", "GHC", "CHF", "MTL", "MZM", "XPF", "ILS", "ROL",

              "TRL", "VEB"

          };

          static final String scNewCurrencies[] = {

              null, null, null, "AZN", null, null, null, null, null, "EUR",

              null, null, null, "GHS", null, "EUR", "MZN", null, null, "RON",

              "TRY", "VEF"

          };

          static final int scOldCurrenciesDFD[] = {

              2, 2, 2, 2, 0, 2, 2, 0, 2, 2,

              2, 2, 2, 2, 2, 2, 2, 0, 2, 2,

              0, 2

          };

          static final int scNewCurrenciesDFD[] = {

              0, 0, 0, 2, 0, 0, 0, 0, 0, 2,

              0, 0, 0, 2, 0, 2, 2, 0, 0, 2,

              2, 2

          };

          static final String otherCurrencies = "ADP-AFA-ATS-AYM-AZM-AZN-BEF-BGL-BOV-BYB-CLF-CYP-DEM-ESP-EUR-FIM-FRF-GHC-GHP-GHS-GRD-GWP-IEP-ITL-LUF-MGF-MTL-MXV-MZM-MZN-NLG-PTE-ROL-RON-RUR-SDD-SIT-SRG-TPE-TRL-TRY-USN-USS-VEB-VEF-XAF-XAG-XAU-XBA-XBB-XBC-XBD-XCD-XDR-XFO-XFU-XOF-XPD-XPF-XPT-XTS-XXX-YUM-ZWN";

          static final int otherCurrenciesDFD[] = {

              0, 2, 2, 2, 2, 2, 0, 2, 2, 0,

              0, 2, 2, 0, 2, 2, 2, 2, 2, 2,

              0, 2, 2, 0, 0, 0, 2, 2, 2, 2,

              2, 0, 2, 2, 2, 2, 2, 2, 0, 0,

              2, 2, 2, 2, 2, 0, -1, -1, -1, -1,

              -1, -1, 2, -1, -1, -1, 0, -1, 0, -1,

              -1, -1, 2, 2

          };

       

      }

      [/code]

       

      1) Do you know can I do it and don't have any side effects ?

      2) Can you tell me where is the class with basic currency ? Becouse in this class we have only changes..

       

      thanks

        • 1. Re: CurrencyData - missing currency
          aksarben

          I can't tell much from your post. You seem to think "currencies" (monetary?) are missing, but you don't explain why you think so. Is an exception being thrown somewhere? If so, post the complete stack trace and we'll have a better chance at understanding your problem.

          • 2. Re: CurrencyData - missing currency
            jschellSomeoneStoleMyAlias

            > 1) Do you know can I do it and don't have any side effects ?

             

            That is more than one question.

            1. Is it possible? Perhaps.

            2. Is your solution correct? No idea

            3. Will a correct solution using this idiom have side effects? Perhaps.  So test a lot.

            • 3. Re: CurrencyData - missing currency
              pawel

              I wrote everything is important. Java 142update 05 didn't support this currency: AFN, AZN, COU, CUC, GHS, MGA, XUA, MZN,RSD, XSU, SSP, SDG,  SRD,CHE, CHW, TMT, UYI, VEF, ZMW, ZWL becouse in that time that currency didn't exist. There new currency from past few years, you can check this in wikipedia. I can't upgrade java and i have to do some workaround.

              And this is error when java don't support some currency: java.lang.IllegalArgumentException      

              at java.util.Currency.getInstance(Ljava.lang.String;I)Ljava.util.Currency;(Currency.java:201)      

              at java.util.Currency.getInstance(Ljava.lang.String;)Ljava.util.Currency;(Currency.java:167)      

              at CurrencyTest.main([Ljava.lang.String;)V(CurrencyTest.java:300)

              • 4. Re: CurrencyData - missing currency
                gimbal2

                Check out the JRockit forum.

                 

                JRockit

                 

                See the incredibly low frequency of questions and the near-zero response rate to those questions? That should give you a hint just how alone you are with your problem. I wouldn't get my hopes up that you are going to get any coherent answer to this.

                 

                > I can't upgrade java

                 

                Nonsense. You just don't want to. I think you have hit a wall and you will have to upgrade your ancient installation of Java and Weblogic.

                • 5. Re: CurrencyData - missing currency
                  pawel

                  "Nonsense. You just don't want to. I think you have hit a wall and you will have to upgrade your ancient installation of Java and Weblogic." - We have big system at this weblogic and Admins upgrade only from java 14_05 to 14_10 becouse in later java versions we had unstable working problems

                  • 6. Re: CurrencyData - missing currency
                    EJP

                    JRockit is now up to version 28. You're half its product lifetime out of date. You have to upgrade some time, and you've just hit a cogent reason to do so.