IOException reading reader invalid first byte 11111000

Hi,
I have just switched from Vista to Ubuntu 8.04, and when I try to emulate a j2me application I get an exception.
The first time I start the application (with no ~/j2mewtk/ folder) the following exception is casted:
Running with storage root ~/j2mewtk/2.5.2/appdb/DefaultColorPhone
Running with locale: LC_CTYPE=nb_NO.UTF-8;LC_NUMERIC=nb_NO.UTF-8;LC_TIME=nb_NO.UTF-8;LC_COLLATE=nb_NO.UTF-8;LC_MONETARY=nb_NO.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=nb_NO.UTF-8;LC_NAME=nb_NO.UTF-8;LC_ADDRESS=nb_NO.UTF-8;LC_TELEPHONE=nb_NO.UTF-8;LC_MEASUREMENT=nb_NO.UTF-
8;LC_IDENTIFICATION=nb_NO.UTF-8
Running in the manufacturer security domain
Uncaught exception java/lang/RuntimeException: IOException reading reader invalid first byte 11111000.
Execution completed.
22885068 bytecodes executed
3358 thread switches
1791 classes in the system (including system classes)
37695 dynamic objects allocated (2415020 bytes)
144 garbage collections (2133624 bytes collected)If I try to run the application again (with a ~/j2mewtk/ folder), this exception is cast:
Running with storage root ~/j2mewtk/2.5.2/appdb/DefaultColorPhone
Running with locale: LC_CTYPE=nb_NO.UTF-8;LC_NUMERIC=nb_NO.UTF-8;LC_TIME=nb_NO.UTF-8;LC_COLLATE=nb_NO.UTF-8;LC_MONETARY=nb_NO.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=nb_NO.UTF-8;LC_NAME=nb_NO.UTF-8;LC_ADDRESS=nb_NO.UTF-8;LC_TELEPHONE=nb_NO.UTF-8;LC_MEASUREMENT=nb_NO.UTF-
8;LC_IDENTIFICATION=nb_NO.UTF-8
Running in the manufacturer security domain
java.lang.RuntimeException: IOException reading reader invalid byte 11100110
     at com.sun.cldc.i18n.Helper.byteToCharArray(+228)
     at com.sun.cldc.i18n.Helper.byteToCharArray(+9)
     at java.lang.String.<init>(+7)
     at java.lang.Class.runCustomCode(+0)
     at com.sun.midp.midlet.MIDletState.createMIDlet(+34)
     at com.sun.midp.midlet.Scheduler.schedule(+52)
     at com.sun.midp.main.Main.runLocalClass(+28)
     at com.sun.midp.main.Main.main(+80)
Execution completed.
3739336 bytecodes executed
51 thread switches
1774 classes in the system (including system classes)
27329 dynamic objects allocated (1267964 bytes)
91 garbage collections (1149916 bytes collected)I use Sun Java Wireless Toolkit 2.5.2, MyEclipse 6.0.1 and jdk1.6.0_06. The source files are originally created in XP and Vista.
Any tips?

I found the error. Some of the source files or configuration files were Cp1252 encoded. When setting the jvm to use Cp1252 encoding both on server and client side, everything worked just fine.

Similar Messages

  • SSE AppInputStream.avaible() returns 0 until first byte has been read

    Hi!
    I am new to JSSE and have tried to enable an existing application
    for SSE connections.
    In some sample applications everything worked fine, but in the
    existing application nothing happened.
    I found out that my existing application uses InputStream.available()
    to check if the input stream has already some bytes available
    and does nothing if there are not any bytes available.
    The problem is that the com.sun.net.ssl.internal.ssl.AppInputStream
    which is returned by SSLSocket.getInputStream() returns 0 if I call
    available() until a first byte has been read. This behaviour
    blocks my application because it does not start to read before
    some bytes are available.
    Is this a bug or desired behaviour?
    If this is a bug, is there any workaround or fix for this?
    I looked already for existing posts or bug fixes but I only
    found a post containing the same problem without any answer.
    Thanx in advance for your help!
    Bye,
    Michael.

    My workaround is to wrap the inputstream by a BufferedStream. As only a real "read" can determine if there is any data exist, you must do so. However, you do not want the read to be blocking, so the only way is to perform a pseudo read, timeout the read asap and reset the stream for your original program.
    Example code:
    public int available() throws IOException {
    int avail = 0;
    int oneByte = -1;
    int timeout = 0;
    if (mSocket != null && mSocket instanceof SSLSocket) {
         try {
              timeout = mSocket.getSoTimeout();
              mSocket.setSoTimeout(2);
              in.mark(256);
              oneByte = in.read();
              in.reset();
              avail = in.available();
         } catch (SocketTimeoutException e) {
              avail = 0;
         } finally {
              mSocket.setSoTimeout(timeout);
    } else {
         avail = in.available();

  • Read the first string in the line, skipping the whitespace ---Possible???

    I am parsing through the following file:
          * AOCSOnLupda.h
          *  Created on: 20.07.2010
          *      Author: perv_na
    #ifndef AOCSONLUPDA_H_
    #define AOCSONLUPDA_H_
    // holds the value of on_lupda
    namespace AOCS {
         class AOCSOnLupda{
              private:
                    /* public part
              public:
    #endif /* AOCSONLUPDA_H_ */My main task is to, go inside this file, check if the namespace and class name provided by the user matches the one's inside this file. And then write a boolean initialization (e.g. boolean checked = 1).
    The problems I am facing is that, when I read through each line I want to make sure that there is no Block Comment signs or // sign in the beginning of the line. So that I am sure that I am not writing the initialization inside a comment line or something.
    My problem is I am not at all being able to read the first word of a line (without the whitespace).
    Can someone please tell me how you can skip the first whitespaces in a newly read line, and retrieve the first chars/String? Like in the line:
                   /* public part
              public:there is white space before the start and end of the block comment. And also in front of the word "public:"
    How do I get my hands on the start and end of block comment character and also "public:" by skipping the white spaces in front?
    Thank you
    newbie
    Edited by: JFC_newbie on Jul 27, 2010 8:46 AM

    Hi,
    thank you for the link ... but I am actually trying to do by myself.
    BufferedReader in;
              String lineInFile;
              try {
                   in = new BufferedReader(
                             new FileReader(
                                       "C:/Users/jui/Eclipse/eclipse-java-helios-win32-x86_64/javaWorkspace/FilePathSearchCreateTest/aocsFiles/AOCSOnLupda.h"));// open
                   while ((lineInFile = in.readLine()) != null) {
                        if((lineInFile.trim().length())!=0){   //If not a Blank Line then...
                        *     //Read the first non-whitespace char in the read line                         *                     
                             String [] tempLine = lineInFile.split("\\s");
                             System.out.println(tempLine[0]);
                   in.close();// safely close the BufferedReader after use
              } catch (IOException e) {
                   System.out.println("There was a problem:" + e);
              }But it's not working. I need my code to read the first char/String in a newly read line, by skipping the first whitespaces.
    Would really really appreciate some tips. thank you.

  • Read the first word of each line in a text file

    i need to read the first word of each line of a text file.
    i know of line.split() but not actually sure how i would go about using it
    Any help most appreciated
    Many Thanks
    Ben

    Hi thanks for the reply!
    this is what i tried... and it still doesn't get me the first word of each line!
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.io.*;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.util.Calendar;
    import java.util.Scanner;
    import java.util.Vector;
    import java.text.SimpleDateFormat;
    import java.net.InetAddress;
    import java.net.UnknownHostException;
    import java.io.BufferedReader;
    public class testing {
         Vector progs=new Vector();
         Vector rand=new Vector();
         String[] tmp = new String [2];
         String str;
         String str2="ewerwer";
         String str3;
         public void programTest()
                   try
                             BufferedReader in = new BufferedReader(new FileReader("progList.log"));
                             while ((str = in.readLine()) != null)
                                  progs.add(str);
                        catch(IOException e)
                             System.out.println("cannot read file");
         //////THE ISSUES IS HERE....I WANT TO GET THE FIRST WORD FROM EACH LINE OF THE FILE!!!     
              try
                             BufferedReader in2 = new BufferedReader(new FileReader("eventLog.log"));
                             while ((str = in2.readLine()) != null)
                                  tmp = str.split(" ");
                                  System.out.println(tmp[0]);
                        catch(IOException e)
                             System.out.println("cannot read file");
    public static void main(String[] args)
                 testing B = new testing();
                 B.programTest();
               //  B.fileToVector();
                 //B.LoginWindow();
               //B.anomDetect();
    }//end class

  • Reading file in bytes using FileReader...

    Hi,
    I am trying to read out bytes value from a .bmp file then i try to change the byte values that i read out to hexadecimal value.
    I open the .bmp in Win Hex (a software) but the hexadecimal value does not tally....
    public void readByteFile (String path)
    Vector in = new Vector ();
    try
    FileReader reader = new FileReader (path);
    int c;
    while ((c = reader.read ()) != -1)
    String hex = Integer.toHexString (c);
    reader.close ();
    } catch (FileNotFoundException e) {System.err.println(e);}
    catch (IOException e) {System.err.println(e);}
              return in;
         }

    If you want to read the actual bytes from the file then do not use a Reader. That will convert the bytes to characters as if they were text. Use an InputStream instead.

  • Adobe Reader invalid plug_ins Folder

    Adobe tech Department or anybody that may know the answer.
    I am having more and more PC's coming up with the Adobe Reader Invalid Plug_ins when using adobe reader.
    Now I know the fix for this, rename the folder, repair adobe, blah blah yes it works.
    But my question is why, what is causing this issue?
    is this a faulty install of the adobe Reader, faulty updates being pushed, etc???
    I would like any information regarding this to permentantly resolve this issue, rather that keep patching each,
    and every day for users.
    Thank you

    Probably - something is getting into the plug_ins folder:
    C:\Program Files\Adobe\Reader 9.0\Reader\plug_ins
    - One thing you can try when you have a system with the problem is to create a copy of this folder.
    - Repair/Fix the problem
    - Compare the plug_ins folder of the fixed machine with the folder that you saved in the first step.

  • Reading file containing byte data

    I am trying to read a file containing data that is in byte format. I can't look at the file and have no idea what is in there. For my first pass I would just like to see what the format is of the data in characters. Is there an easy way to do this? This is what I have done so far:
    //file is read from another method and is passed in here.
    try {
    BufferedReader f = new BufferedReader(new FileReader(file));
    String t;
    while ((t = f.readLine()) != null) {
    byte b[] = t.getBytes();
    System.out.println("bytes " + b[0]);
    System.out.println("chars " + (char)b[0]);
    catch(Exception e) {
    e.printStackTrace();
    The output is looking like this:
    bytes 72
    chars H
    bytes 74
    chars J
    bytes 81
    chars Q
    bytes -56
    chars ?
    Which one is the character value of the bytes? I am assuming the char one, but it sure seems like funny values. Also, I want to read the whole line and then get the whole line converted, not just the first byte. Isn't getBytes just getting the first byte? How can I convert the whole line after it is read (f.readLine())?
    Thanks.
    Allyson

    Well, I tried that and it still gives me just the binary or byte data (I have no idea what kind it is - I know I can't read it when I try to open it with notepad). There is a current application that uses this file and opens it and provides the data when it is opened. I am trying to look thru that code to find out what it does, but it is very confusing. It is written in c.
    Any other ideas out there as to how to open and display the correct data in a file like this? When I did the binary data open this is the kind of data I got:
    char in new loop Q
    char in new loop
    char in new loop @
    char in new loop
    char in new loop @
    char in new loop @
    char in new loop
    char in new loop
    char in new loop @
    char in new loop L
    char in new loop `
    char in new loop :
    char in new loop @
    I know that data is mostly numbers and maybe a few names, but nothing like that.
    Thanks.
    Allyson

  • How to download(read) n th byte of a URL?

    Hi!
    I wrote a program in Java which downloads a URL file. I also want to add resuming functionality to it(Like GetRight) which makes it possible to start downloading from for ex. 1000000. byte.
    I tried to use InputStream class' skip(long n) function. But It first starts to download the file from beginning, then skips the bytes which is not resuming.
    Is there a solution to this problem??
    How can I solve this?
    Thanks.

    You need to add a "Range" header in the HTTP request.
    For instance, say that you want to download 1000 bytes starting from the 1000000th byte: (the first byte is "1"):
    String sStart = "1000000";
    String sEnd = "1000999";
    String hdr = "Range: bytes=" + sStart + "-" + sEnd + "\r\n";
    Add the header to the request to the URL. I don't know what API are you using, so I simply give yo the syntax of the header.
    If you simply want to start from the 1000000th byte and go to the end, set sEnd to "".

  • If you're NOT running Aperture 3.6 and want to update to 10.10.3 - read this FIRST.

    If you’re NOT running Aperture 3.6 and want to update to 10.10.3 - read this FIRST.
    In this personal scenario, I used a Mavericks (10.9) test hard drive to see what would happen if I updated to 10.10.3. No photos were harmed in the making of this post. I have full redundant back-ups of everything as should you before attempting ANY OS update. There simply is no excuse not to back up and keep your personal data protected in this day and age.
    Now that’s out of the way… 
    If you’re not running Aperture 3.6 (which I believe is only available if running 10.10.2), updating to 10.10.3 will disable any version of Aperture below that and it CANNOT be updated or found on the App Store, or downloaded from anywhere else. Both the Aperture and iPhotos icons in the dock will have a white circle with a line going through it.
    If you click to open Aperture, the computer will prompt you to update to the latest version because the current version is not compatible with Yosemite. After you acknowledge that, it sends you the the App Store where you will be met with a message that states “Item not available”. It also no longer appears in your purchase history so you can’t update it from there either!
    You’re now forced to use the new Photos app.
    Upon it’s it’s first launch, the Photos app will create a new library for itself and migrate/duplicate all Aperture photos into it. Effectively doubling the disc space used by your pictures...
    This behavior apparently does not happen going from 10.10.2 to 10.10.3. In this latter scenario, Photos still uses the Aperture library and creates a smaller Photos library migrating only the metadata it seems. The actual photos are still referenced from the Aperture library and you can continue to use Aperture (3.6) if you choose. The libraries are NOT unified though. Changes made in one will NOT be reflected in the other.
    In other words, you cannot leap-frog update if you want to continue using Aperture.
    The 10.10.2 Combo Update “may” solve this problem but I have not tested it. Here is a link if you’re feeling brave. https://support.apple.com/kb/DL1786?locale=en_US
    Here are some screen-shots.

    I had been trying to download 7.0.1 with Firefox 3.6. Just would NOT download. Well, I opened another browser, Safari, went to the download page, and the download worked. Who knew?
    All is well now.
    Thanks for the reply.

  • Error SOAP: call failed: java.io.IOException: Read timed out; HTTP 200 OK

    Hi PI gurus,
      Need some suggestions on one issue below -
      Scenario - proxy (SAP) to SOAP (Web based system)
      In the RWB Communication Channel Monitirong we are receiving the below error
      " Error SOAP: call failed: java.io.IOException: Read timed out; HTTP 200 OK"
    the request from XI system is going to target system and printing the lables (as per the functionality) with no issues but the comminication channel is giving the above error and this is causing the repeated sending the same request to target sytem and the data is printing repeateadly. This issues is occuring in Quality environment.
    Strangley the same Interface with the same connectivity details is working fine in Development environment. But not working in Quality environment. Checked the firewalls settings on both in XI and Target system side and confirmed that everything is fine.
    Below are the Logs both from Quality and developement are as follows
    Quality ( Failure Case) 
    17.03.2011 07:19:59 Success SOAP: request message entering the adapter with user J2EE_GUEST
    17.03.2011 07:25:03 Error SOAP: call failed: java.io.IOException: Read timed out; HTTP 200 OK
    Development     (Success ful)
    17.03.2011 07:27:55 Success SOAP: request message entering the adapter with user J2EE_GUEST
    17.03.2011 07:27:58 Success SOAP: completed the processing
    When we checked with basis team on user id J2EE_GUEST,  they confirmed that they are same in Development and Quality.
    I repeat,, that the same target url and everthing is same in XI Configuration
    Thanks in Advance. Points would be rewared for the best solution.
    Thanks,
    Jitender

    HI Jitender,
          If your scenariois working in DEV and if it is not working in QAS.Could you please check if both the systems are at same patch levels..
    Please refer below notes :1551161,817894,952402.
    Cheers!!!
    Naveen.

  • Read array of bytes

    using what do i read array of bytes that is on a stream...
    i send an array of bytes to the invoking stream using void write(byte buffer[])....
    how do i read it from the other side....
    uzair

    Attempts to read up to buffer.length bytes into
    buffer, returning the number of bytes that were
    sucessfully read. -1 is returned when the end of the
    file is encountered.I wasn't asking you to post what the API says it does. We know what it does. Now, do you understand how it reads the bytes into the buffer that you pass to it?

  • Read the first line of the table.

    Hi,
    Can you pls let me know as to how I read the first line of the table.
    Thx.

    hi check this.
    data: begin of itab occurs 0,
            matnr like mara-matnr ,
            meins like mara-meins,
            end of itab.
    select-options: s_matnr for mara-matnr .
    select matnr
             meins
             from mara
             into table itab
             where matnr in s_matnr .
    read table itab index 1 .
    loop at itab .
    write:/ itab-matnr .
    endloop .
    regards,
    venkat.

  • My itunes card has read invalid and I no longer have the serial number

    What can I do to redeem my itunes giftcard if the code number is reading invalid and I already threw away the actual card, so I do not have the serial number anymore?

    You could ask Apple to provide you with a new one assuming you still have proof of purchase  .  .  .  though don't hold out too much hope.
    Also if you click on the FCE icon in the menubar and select "About FCE" you should see a serial, though if your FCE is an upgrade it most likely won't work.

  • Read Here First

       Read Here First
              Forum Rules
              Purpose of the Forum
              Suggestions on Posting and Getting Better Answers
              How to Contact MSI Tech Support
              MSI Locations WorldWide
              Back to Sticky Index

    What a horrible thing to say. Just because you are inconvenienced, people shouldn't ask questions? What if they can't get it to display on a tv? What if they aren't sure if their PC is 1.1 or 2.0 USB? What would they benefit by using the 5R's? A lot of people are getting ipods and a lot of people need help. Telling them to reset it as a blanket statement is, quite frankly, one of the single most irresponsible pieces of advice I have heard yet. Just because you have read it 87 times doesn't mean that person has. How about teaching them how to use the search function? Hopefully, you'll take the time to learn that not everyone is as blessed as you in the ipod knowledge department. If it is bothering you so much that you are seeing the same posts over and over again, here's a suggestion- quit reading the forums for a few days. Better yet- use the 5R's. That might help with the problem you are having.

  • Recently bought 4S, it keeps searching for network, reads invalid SIM, keeps searching for network, have switched the handset on and off several times, have tried 2 new micro chips, re set the network too ! nothing seems to be working !!! Iam in Delhi

    recently bought 4S, it keeps searching for network, reads invalid SIM, keeps searching for network, have switched the handset on and off several times, have tried 2 new micro chips, re set the network too ! nothing seems to be working !!! Iam in Delhi

    Obvious question... where did you buy your 4S and is factory unlocked?

Maybe you are looking for