Can not create WebService with java.util.Locale object why?

I am unable to create a WebService which contains a Locale Object in the request.  I assume its because the java.util.Locale object is not Serializable.  Can anyone tell me if there is a work around for this?

Hi,
Make sure your strings for Locale follow these rules...
The language string should be lower-case, two-letter codes as defined by ISO-639.
http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt
The country string should be upper-case, two-letter codes as defined by ISO-3166.
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
Or try with some constant Locales like
Locale.CANADA
Locale.US
regards,
Uma

Similar Messages

  • How can i create messenger with java tv API on STB

    deal all.
    how can i create messenger with java tv API on STB.
    how can Xlets communicate each other?
    how?
    i am interested in xlet communications with java tv.
    is it impossible or not?
    help all..

    You can create a messenger-style application using JavaTV fairly easily. JavaTV supports standard java.net, and so any IP-based connection is pretty easy to do. The hard part of the application will be text input, but people have been using cellphone keypads to send SMS messages for long enough that they're familiar with doing this. This doesn't work well for long messages, where you really need a decent keyboard, but for short SMS-type messages it's acceptable.
    The biggest problem that you need to work around is the return channel. Many receivers only have a dial-up connection, ties up the phone line and potentially costs people money if they don't get free local calls. Always-on return channels (e.g. ADSL or cable modem) are still pretty uncommon, so it's something that you nee to think about. Of course, if you do have an always-on connection then this problem just goes away.
    This is really one of those cases that's technically do-able, but the infrastructure may not be there to give users a good experience.
    Steve.

  • Multi currency support with java.util.Locale

    My project has a requirement to support multiple currencies as our first internationalization feature. However, I've come across something with the Locale class that doesn't really make sense to me, and I'm wondering if anyone else has any best practices or insight.
    Why can't you create a Locale knowing only the ISO 3166 code? For multi-currency support, it doesn't make sense that I should need to provide a language in order to obtain a Locale, which is needed to generate the proper NumberFormat (and in 1.4 the java.util.Currency) class.
    Is there an instance where the language one speaks is directly correlated to the currency that they use?
    Actually, it doesn't make much sense that you can create a Locale only from a language either, since if my user a Hispanic-American, the language would be Spanish but the country (and therefore currency) would be US.
    It seems to me that if the Locale class can default a country code based on the language, it should also be able to default a language based on the country.
    Given these limitations, is there a recommended best practice about obtaining a Locale without a pre-determined language?

    Hi,
    this was a bit of a bugbear for a long time. Currency kind of wound up inexorably linked to Locale for a long time because the way a currency was formatted depended on the textual layout of the language as well as the country, and as date formatting was an issue too, it was easier for them to implement it the way they did.
    It's been an RFE for a long time, and I believe the beta releases of Merlin carry a currency API that is separate from a Locale. The link to the RFE is below. Hopefully Merlin Beta will allow you to achieve what you want - it seems to be pretty stable from what I've seen of it, and Sun do have a good record when it comes to releasing stable betas, so I wouldn't panic too much about the fact you're developing on a "pre-release candidate" JDK.
    http://developer.java.sun.com/developer/bugParade/bugs/4290801.html
    Hope that helps!
    Martin Hughes

  • Can not create table with the CLOB type VARRAY, ORA-02348: cannot create VA

    CREATE OR REPLACE TYPE Project AS OBJECT (
    project_no NUMBER(2),
    title VARCHAR2(35),
    cost CLOB );
    CREATE OR REPLACE TYPE ProjectList AS VARRAY(50) OF Project;
    CREATE TABLE department (
    dept_id NUMBER(2),
    name VARCHAR2(15),
    budget NUMBER(11,2),
    projects ProjectList );
    The table creatation always with the error :
    ORA-02348: cannot create VARRAY column with embedded LOB
    Can anybody help ???

    Hi Peng,
    It seems you have hit a limitation of the Oracle version, which you don't post.
    Limitations are sometimes also called a 'feature'.
    You would need to find out whether this restriction has been lifted in a subsequent release or redesign your application.
    Sybrand Bakker
    Senior Oracle DBA

  • Can not create printer with my own ppd file

    I have a printer model that is not covered in Solaris Print Manager.
    I downloaded a foomatic-PPD file. Followed the steps (from Solaris 10 administration guide) to add printer. (lpfilter -f $ name -F $ filter didn't succeed, so I manually did lpfilter -f foomatic -F foomatic.fd)
    After printer is added, and it's idle, I tried to print a job, but it says:
    UX:lp: ERROR: The LP print service could not read your request file
    To fix: see if the spooling file system is full.
    I have also tried to add a new entry in /usr/lib/lp/model/ppd/ppdcache and the new entry points to my ppd file.
    Add printer through Soloaris print manager, I got the exact same message.
    Any tips?
    # lpadmin -p paper -v /dev/printers/0 (1)
    # lpadmin -p paper -I postscript (2)
    # lpadmin -p paper -m standard_footmatic (3)
    # lpadmin -p paper -n /path/Lexmark-Optra_E312-Postscript.ppd.gzmake(4)
    # lpadmin -p paper -D "Color printer on third floor, rm 3003" (5)
    # cd /etc/lp/fd
    # for filter in *.fd;do
    > name=`basename $ filter .fd`
    > lpfilter -f $ name -F $ filter
    > done (6)
    # accept paper
         destination �paper� now accepting requests
    # enable paper     (7)
    printer �paper� now enabled
    # lpstat -p paper (8)
    printer paper is idle. enabled since Feb 28 11:21 2004...

    I haven't played with this myself, but from looking at the documentation and what you have done:
    1. is this a locally attached printer (serial port , usb, etc.) or a network printer? You are using standard_foomatic that is for locally attached printers, but your description seems to indicate that the printer is on the network. If it's a network printer, then the netstandard_foomatic script should be used.
    2. Is the content type of postscript appropriate for this printer? The docs use that but that may not be correct. Is the Optra E312 a postscript printer?
    3. althought the built-in ppd files are in the .gz format (and unzipped as needed), the docs indicate that the "home brewed" ppds should be just plain .ppd.
    Not sure if any of this is relevant, but that's my 2 cents.

  • Can not create user with useradd

    Hi,
    the command is (as root):
    # /usr/sbin/useradd -c 'Oracle software owner' -d /u01/oracle -g dba -G ocgroup,ocmaint -m -u 1000 -s /usr/bin/ksh oracle
    The output is:
    UX: /usr/sbin/useradd: ERROR: Inconsistent password files. See pwconv(1M).
    ACTIONS TAKEN:
    # pwconv : no changes
    bash-3.00# wc -l /etc/passwd /etc/shadow
    18 /etc/passwd
    18 /etc/shadow
    36 total
    bash-3.00# cat -ve /etc/passwd
    root:x:0:0:Super-User:/:/sbin/sh$
    daemon:x:1:1::/:$
    bin:x:2:2::/usr/bin:$
    sys:x:3:3::/:$
    adm:x:4:4:Admin:/var/adm:$
    lp:x:71:8:Line Printer Admin:/usr/spool/lp:$
    uucp:x:5:5:uucp Admin:/usr/lib/uucp:$
    nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico$
    smmsp:x:25:25:SendMail Message Submission Program:/:$
    listen:x:37:4:Network Admin:/usr/net/nls:$
    gdm:x:50:50:GDM Reserved UID:/:$
    webservd:x:80:80:WebServer Reserved UID:/:$
    postgres:x:90:90:PostgreSQL Reserved UID:/:/usr/bin/pfksh$
    svctag:x:95:12:Service Tag UID:/:$
    nobody:x:60001:60001:NFS Anonymous Access User:/:$
    noaccess:x:60002:60002:No Access User:/:$
    nobody4:x:65534:65534:SunOS 4.x NFS Anonymous Access User:/:$
    ocadmin:x:1001:107:ON-Center Administrator Account:/export/home/ocadmin:/bin/ksh$
    cat -ve /etc/shadow
    root:VipMkPKbgRZFs:14859::::::$
    daemon:x:14858::::::$
    bin:x:14858::::::$
    sys:x:14858::::::$
    adm:x:14858::::::$
    lp:x:14858::::::$
    uucp:x:14858::::::$
    nuucp:x:14858::::::$
    smmsp:x:14858::::::$
    listen:x:14858::::::$
    gdm:x:14858::::::$
    webservd:x:14858::::::$
    postgres:x:14858::::::$
    svctag:x:14858::::::$
    nobody:x:14858::::::$
    noaccess:x:14858::::::$
    nobody4:x:14858::::::$
    ocadmin:Ru2SfqpBfDlSM:14858::::::$
    PLATFORM DESCRIPTION
    SunOS argenlab 5.10 Generic_139555-08 sun4v sparc SUNW,SPARC-Enterprise-T2000

    I fixed the problem. Somehow the connection and provider properties are defined in machine.config. I did not have anything in my application's web.config. After I moved provider information to my web.config and gave the appliaiton name I was able to create a user account. I do not know at what point the OraAspNetConString properties were added to machine.config.
    Thanks

  • Can I use ' ', ' ', '= ' and ' =' with java.sql.Timestamp objects in EJB-QL

    ie. Is this valid?
    <query>
    <description>Find data between dates</description>
    <query-method>
    <method-name>findMetricsByDate</method-name>
    <method-params>
    <method-param>java.sql.Timestamp</method-param>
    </method-params>
    <method-params>
    <method-param>java.sql.Timestamp</method-param>
    </method-params>
    </query-method>
    <result-type-mapping>Local</result-type-mapping>
    <ejb-ql>
    SELECT OBJECT (o) FROM MetricResults AS o WHERE MetricResults.date > ?1 AND MetricResults.date < ?2
    </ejb-ql>
    </query>

    No. Not with current EJB 2.0 CMP specs at least. Later revisions are supposed to fix this, but for now, this seriously limits the usefulness of EJB-QL.
    .P.

  • Can't create log file with java.util.logging

    Hi,
    I have created a class to create a log file with java.util.logging
    This class works correctly as standalone (without jdev/weblogic)
    import java.io.IOException;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.logging.*;
    public class LogDemo
         private static final Logger logger = Logger.getLogger( "Logging" );
         public static void main( String[] args ) throws IOException
             Date date = new Date();
             DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
             String dateStr = dateFormat.format(date);
             String logFileName = dateStr + "SEC" + ".log";
             Handler fh;          
             try
               fh = new FileHandler(logFileName);
               //fh.setFormatter(new XMLFormatter());
               fh.setFormatter(new SimpleFormatter());
               logger.addHandler(fh);
               logger.setLevel(Level.ALL);
               logger.log(Level.INFO, "Initialization log");
               // force a bug
               ((Object)null).toString();
             catch (IOException e)
                  logger.log( Level.WARNING, e.getMessage(), e );
             catch (Exception e)
                  logger.log( Level.WARNING, "Exception", e);
    }But when I use this class...
    import java.io.File;
    import java.io.IOException;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.logging.FileHandler;
    import java.util.logging.Handler;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import java.util.logging.XMLFormatter;
    public class TraceUtils
      public static Logger logger = Logger.getLogger("log");
      public static void initLogger(String ApplicationName) {
        Date date = new Date();
        DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
        String dateStr = dateFormat.format(date);
        String logFileName = dateStr + ApplicationName + ".log";
        Handler fh;
        try
          fh = new FileHandler(logFileName);
          fh.setFormatter(new XMLFormatter());
          logger.addHandler(fh);
          logger.setLevel(Level.ALL);
          logger.log(Level.INFO, "Initialization log");
        catch (IOException e)
          System.out.println(e.getMessage());
    }and I call it in a backingBean, I have the message in console but the log file is not created.
    TraceUtils.initLogger("SEC");why?
    Thanks for your help.

    I have uncommented this line in logging.properties and it works.
    # To also add the FileHandler, use the following line instead.
    handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandlerBut I have another problem:
    jdev ignore the parameters of the FileHandler method .
    And it creates a general log file with anothers log files created each time I call the method logp.
    So I play with these parameters
    fh = new FileHandler(logFileName,true);
    fh = new FileHandler(logFileName,0,1,true);
    fh = new FileHandler(logFileName,10000000,1,true);without succes.
    I want only one log file, how to do that?

  • Java.util.Locale not thread-safe !

    In multithreading programming, we know that double-checking idiom is broken. But lots of code, even in sun java core libraries, are written using this idiom, like the class "java.util.Locale".
    I have submitted this bug report just now,
    but I wanted to have your opinion about this.
    Don't you think a complete review of the source code of the core libraries is necessary ?
    java.util.Locale seems not to be thread safe, as I look at the source code.
    The static method getDefault() is not synchronized.
    The code is as follows:
    public static Locale getDefault() {
    // do not synchronize this method - see 4071298
    // it's OK if more than one default locale happens to be created
    if (defaultLocale == null) {
    // ... do something ...
    defaultLocale = new Locale(language, country, variant);
    return defaultLocale;
    This method seems to have been synchronized in the past, but the bug report 4071298 removed the "synchronized" modifier.
    The problem is that for multiprocessor machines, each processor having its own cache, the data in these caches are never synchronized with the main memory.
    The lack of a memory barrier, that is provided normally by the "synchronized" modifier, can make a thread read an incompletely initialized Locale instance referenced by the static private variable "defaultlocale".
    This problem is well explained in http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-double.html and other documents about multithreading.
    I think this method must just be synchronized again.

    Shankar, I understand that this is something books and articles about multithreading don't talk much about, because for marketing reasons, multithreading is supposed to be very simple.
    It absolutely not the case.
    Multithreading IS a most difficult topic.
    First, you must be aware that each processor has its own high-speed cache memory, much faster than the main memory.
    This cache is made of a mixture of registers and L1/L2/L3 caches.
    Suppose we have a program with a shared variable "public static int a = 0;".
    On a multiprocessor system, suppose that a thread TA running on processor P1 assign a value to this variable "a=33;".
    The write is done to the cache of P1, but not in the main memory.
    Now, a second thread TB running on processor P2 reads this variable with "System.out.prinln(a);".
    The value of "a" is retrieved from main memory, and is 0 !
    The value 33 is in the cache of P1, not in main memory where its value is still 0, because the cache of P1 has not been flushed.
    When you are using BufferedOutputStream, you use the "flush()" method to flush the buffer, and the "synch()" method to commit data to disk.
    With memory, it is the same thing.
    The java "synchronized" keyword is not only a streetlight to regulate traffic, it is also a "memory barrier".
    The opening brace "{" of a synchronized block writes the data of the processor cache into the main memory.
    Then, the cache is emptied, so that stale values of other data don't remain here.
    Inside the "synchronized" block, the thread must thus retrieve fresh values from main memory.
    At the closing brace "}", data in the processor cache is written to main memory.
    The word "synchronized" has the same meaning as the "sync()" method of FileDescriptor class, which writes data physically to disk.
    You see, it is really a cache communication problem, and the synchronized blocks allows us to devise a kind of data transfer protocol between main memory and the multiple processor local caches.
    The hardware does not do this memory reconciliation for you. You must do it yourself using "synchronized" block.
    Besides, inside a synchronized block, the processor ( or compiler ) feels free to write data in any order it feels most appropriate.
    It can thus reorder assignments and instruction.
    It is like the elevator algorithm used when you store data into a hard disk.
    Writes are reordered so that they can be retrieved more efficiently by one sweep or the magnetic head.
    This reordering, as well as the arbitrary moment the processor decides to reconciliate parts of its cache to main memory ( if you don't use synchronized ) are the source of the problem.
    A thread TB on processor P2 can retrieve a non-null pointer, and retrieve this object from main memory, where it is not yet initialized.
    It has been initialized in the cache of P1 by TA, though, but TB doen't see it.
    To summarize, use "synchronized" every time you access to shared variables.
    There is no other way to be safe.
    You get the problem, now ?
    ( Note that this problem has strictly nothing to do with the atomicity issue, but most people tend to mix the two topics...
    Besides, as each access to a shared variable must be done inside a synchronized block, the issue of atomicity is not important at all.
    Why would you care about atomicity if you can get a stale value ?
    The only case where atomicity is important is when multiple threads access a single shared variable not in synchronized block. In this case, the variable must be declared volatile, which in theory synchronizes main and cache memory, and make even long and double atomic, but as it is broken in lots of implementation, ... )

  • How do I compress a string with  java.util.zip - not a file ?

    How do I compress a string with java.util.zip?
    Is possible to compress something else except a file?

    Of course, compression works on bytes, not some higher level constructs like Strings or files.
    You can use the ZipOutputStream or DeflaterOutputStream for compression.
    And the javadoc for Deflater even has a code example of compressing a String.
    Edited by: Kayaman on May 22, 2011 5:04 PM

  • I can not create an Installer, After install the Vision Builder Demo and then uninstall it. I can not create a Labview installer anymore, it asks me for a Vision Builder Installer, even if My Labview program does not have nothing to do with it...

    I can not create an Installer on LabView, After install the Vision Builder Demo and then uninstall it. I can not create a Labview installer anymore, it asks me for a Vision Builder Installer, even if My Labview program does not have nothing to do with it...
    Solved!
    Go to Solution.

     Hi Shada this can happen if you are including additional installers to your installer for example DAQmx. When you are doing this the installer has to include other files like MAX (Measuremente and Automation Explorer). Probably when you installed Vision Builder it updated MAX, so when your installer is trying to Include MAX, its asking for the source where it was installed in your computer in this case Vision Builder.
     Here you can cache the information so its not asked again, or you can download a newer version fo DAQmx, so it will update MAX and change de dependecy.
     You can find more details about this issue in this KB:
    KnowledgeBase 3S88PJMY: Why Do I Get A "Missing Distribution" Error When Trying to Build an Installe...
    And for keeping a copy here is more info:
     How Do I Stop the Missing Distribution Notification Each Time I Build An Installer?
    Best Regards
    Benjamin C
    Senior Systems Engineer // CLA // CLED // CTD

  • Shopping cart with Asset can not create backend PO in SOSC

    Dear Expert,
    We are using With SRM 7.0 & ECC 6.0 EHP4 , the shopping cart with account assignment cost center can create backend PO in SOSC, but the shopping cart with account assignment Asset can not create backend PO in SOSC.
    The xml message is correct in SRM, but not correct in ECC.
    Your help is very appreciated....
    Best Regards,
    bill

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • Can not create source inspection to to material with mpn optional

    HELLO,
    Our materials are divided to two groups:
    1. materials that their manufacturer part profile is mandatory (mark : 'MPN MANDATORY" CHANGE IN MPN and QM PROCESSING FOR MPN)
    2. materials that their manufacturer part profile is optional (mark: CHANGE I MPN).
    We use source inspection to all materials .
    No problem create source inspection to the first group (mandatory mpn) I created q-infor-ecord to vendor vs mpn-material, in the purchase order header the mpn material is added and by using trns qi07 I get source inspection lot with our firm material
    The problem is that I can not create a source inspection to material that was defined as mpn optional and in the purchase order header the mpn-material is filled.
    regards in advance
    Eyal rosenfeld

    HELLO,
    Our materials are divided to two groups:
    1. materials that their manufacturer part profile is mandatory (mark : 'MPN MANDATORY" CHANGE IN MPN and QM PROCESSING FOR MPN)
    2. materials that their manufacturer part profile is optional (mark: CHANGE I MPN).
    We use source inspection to all materials .
    No problem create source inspection to the first group (mandatory mpn) I created q-infor-ecord to vendor vs mpn-material, in the purchase order header the mpn material is added and by using trns qi07 I get source inspection lot with our firm material
    The problem is that I can not create a source inspection to material that was defined as mpn optional and in the purchase order header the mpn-material is filled.
    regards in advance
    Eyal rosenfeld

  • I can not create a vcard with my contacts

    I can not create a vcard with my contacts

    In select your contact in Contacts, then in the File menu select "export " and then select Export vCard.

  • Could not open firefox and tried to update newer version but could not with error msg "can not create temp folder archive"

    Tried to run firefox as usual but the the page could not connect the server. Thus, uninstalled the browser and tried to install a newer version. Could not run the program and error msg "can not create temp folder archive" popped up.

    See http://answers.yahoo.com/question/index?qid=20080702200623AAOYP13

Maybe you are looking for

  • Problem file xls with jasper (source code mixed in the content XLS file)

    i´m writing xls file with jasper, the problem is that is mixed the source code of the JSP (where doing request) in the content of the file xls, do not import the API thah use. The java code whit JASPER is like: FacesContext ctx = FacesContext.getCurr

  • IDVD create disk image larger than DVD-R capacity

    Here's the background: - I made an iMovie 6 in 16:9 NTSC that is 1:32:00:06 long. I put that into iDVD 6, use the 5.0 Theme called "Wedding White", no slideshow, just a few photos and one 128k audio AAC file for menu music. Motion menu right now is a

  • Itunes killed my soundcard

    Ok, had itunes 8.0 worked great, downloaded 8.1 and the S hit the fan. My Soundcard went kablooey. So to fix this i uninstalled itunes and reinstalled my soundcard drivers, now my sound works but I cant reinstall Itunes because when i try I get an er

  • Items and Purchase Orders...

    Help...Please... We have a problem, we run stock close to minimum at all times, (we supply short dated food stuff), and often our customers ask when the next delivery is due in. Now, we can drag and relate etc but often our staff just don't have time

  • Holding rotated pages

    I am working with PDFs created from InDesign. Trouble is the designer rotated one of the spreads to view a little better. The Client PDF looks fine (not rotated), but when I use that art as a background in InDesign for merging data, the resulting out