stream not in blackberry installation state

HttpConnection httpConn = null;
DataOutputStream dataOS = null;
System.out.println ("strModuleName.Trim ()": "")
+ strModuleName.trim ());

ChangeOfDividendUrl = ChangeOfDividendUrl + '; deviceside = false;
httpConn = (HttpConnection), Connector.open (ChangeOfDividendUrl);
httpConn.setRequestProperty ("User-Agent",
(' Profile / MIDP - 1.0 Configuration/CLDC - 1.0 ");

httpConn.setRequestProperty ("Connection", "Keep-Alive");
httpConn.setRequestProperty ("Content-Language", "en-US");
httpConn.setRequestMethod (HttpConnection.POST);

If (strModuleName! = null &!("".)) Equals (strModuleName)))
{
If ("NFCOD".equals (strModuleName.trim ()) ")
{

dataOS = httpConn.openDataOutputStream () (DataOutputStream);
dataOS.writeUTF (folio);
dataOS.writeUTF (pin);
dataOS.writeUTF (scheme);
dataOS.writeUTF (reinvest);
dataOS.writeUTF (folio);

System.out.println ("after writing to the output stream");
}

}

dataOS.flush ();
dataOS.close ();

DataInputStream option = httpConn (DataInputStream)
. openDataInputStream();
int ch;
SB = new StringBuffer();
System.out.println ("% me here 4 sb is:" + sb.toString ());
While ((ch = dataIS.read ())! = - 1).
{
SB. Append ((Char) ch);
}

Respeonse
// -------------------------------------------------------------
System.out.println ("SB. ("ToString():" + sb.toString ());
ResponseData = sb.toString () string;
dataIS.close ();
httpConn.close ();

I'm using the code above, but I get "stream not in a game of the State".

Is there a problem with DataOutputStream object?

I agree with itendrasharma.  The server you connect to seems to expect something else, header or data.

As you send messages on the server, the header very probably you don't have correct is the length of the content.  You generally set this number of bytes you transfer.  You don't know that, because you use a DataOutputStream, so if you want to continue using this output stream, you need to write this in a byte array and then count the number of bytes created, that allows you to set the length of the content and then the output bytes.

As itendrasharma, using DataOutputStream suggests in the way you need is quite unusual - I would check that it corresponds to file server.

When the server dislikes what you send, he usually responds with a bad return code.  Your code does not check this and should be.  I suggest you ask (getResponseCode()) http response code before you start trying to read the data. If the response code is not good (200), then you will have a better idea what is the problem with your request.

I've seen code like this before, I think it's a poor sample.  Can you tell me where you got the code you have formed the basis for the treatment of this network?  I want to correct.

Tags: BlackBerry Developers

Similar Questions

  • security update for Windows XP (KB2686509) do not proceed with installation

    Hello

    Despite repeated attempts, this update is not complete the installation in my system. Anyone has any suggestions, please?

    HI Giri,

    1 are you facing this problem with this particular update?

    2. you receive an error message or error code when you try to install the update?

    3. have you made changes to your computer recently?

    I suggest you to follow the steps and check if it helps.

    Method 1: Perform a clean boot, and then check if it helps.

    How to configure Windows XP to start in a "clean boot" State

    Note: Make sure you perform the steps in How to configure Windows to use a Normal startup stateto start your computer normally.

    Method 2: Follow the link and run Microsoft Fix - it, and then check if it helps.

    Diagnose and automatically fix common problems with Windows Update

    Method 3: Install manually updates, then check if it helps.

    To install updates manually by following the steps mentioned below.

    (a) go to http://www.microsoft.com/download/en/default.aspx

    (b) research updates using the KB number for the update.

    (c) download and install it.

    Method 4: Reset Windows update components, and then check if it helps.

    How to reset the Windows Update components?

    To do: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 (http://support.microsoft.com/kb/322756/ )

    How to back up and restore the registry in Windows

  • How do you address Null Session streaming returned via blackberry bold 9000

    Can Hi anyone help me solve the following exception in blackberry bold 9000:

    «net.rim.device.internal.media.RimMediaException: Null session streaming returned '.»»

    I want to create an application audio streaming online for blackberry devices. I wrote the code using 'API of Java ME' and then focused on the app for blackberry.

    The code does not work in S60 Simulator, as well as on nokia devices, but when I try to load the same app in the blackberry device I get the exception above, after that the song plays for 30 seconds.

    Can someone tell me how to solve this problem. Thanks in advance.

    Thanks for your response, but my problem is resolved 2 days back.

  • I try to install the Kodak ESP C310 printer, but it is said that a firewall is not blocking the installation. Can you help me?

    I try to install the Kodak ESP C310 printer, but it is said that a firewall is not blocking the installation. Can you help me? I use windows XP. I tried port 5353 and this is what allows to Hello.

    You can check this article, but it's about Firefox itself do not have access.

    http://KB.mozillazine.org/firewalls

    Could you give the exact wording and punctuation of the message and try Googling yourself - when google you do not without importance and punctuation, words of group who are always together as original in quotation marks or hyphens message that google will look for these words together in that order.

  • I've updated my macbookpro (2010) snow leopard at elcapitan but when I restart it does not complete the installation then is no longer able to use it. Help?

    I've updated my macbookpro (2010) snow leopard at elcapitan but when I restart it does not complete the installation then is no longer able to use it.

    I tried the following:

    1 start with the R command and using disk utility that did say he had problems but then appear all ok after completing.

    2 tried the Verbose mode and did not work

    3. I tried command mode S did not.

    4. tried to zap the pram was not working.

    5 a couple other things that I had read, but nothing helped.

    It starts up and the line begins to show the computer made his 'thing', but gets stuck about 3/4 quarters of and goes no further. Would appreciate any suggestions.

    PS: also tried boot from the original disks as well, but no luck.

    You said "PS: also starting from the original disks tried both but no luck."

    Exactly what happened when you tried?

    Have you tried formatting the HD?

    Have you started the installation of SL?

  • Satellite U200: The file 'setupdiu.exe' is not marked for installation of BT

    When I tried to install the last stack of BT on my Satellite U200 installation stops with this message:
    The file 'setupdiu.exe' is not marked for installation.
    How to handle this problem?

    Hello

    you say the last won´t of BT-stack install? Which version is on your system installed? Sometimes an installation program needs a specific previous version to be able install
    the next higher version.
    So where you downloaded the package?

    Would be recognizing some comments, can we get a resolution.
    Welcome them

  • Windows 7 does not recognize the installation discs

    Hello

    I have a problem, and I don't know if there is a solution, but here goes.

    My laptop is a HP DV6-7029WM Windows 7, 64 bit.

    The hard drive was dead, and he was replaced last month.  I sent it to HP.  C is the hard drive, and was originally the recovery on D. Removable media were on E, and when I connected a USB stick or memory card reader it would on F.

    When I came back, hard drive was on C as it was originally, and there was no recovery drive D. D is now my removable media drive. When I put in a USB stick or a memory card reader, which is now on the E drive.

    After I bought this, I put the recovery on a USB key, but I've accidentally thrown out. (My mistake) So I ordered the installation diskettes after that I return my HP PC.  I had 2 DVD system recovery disks and an Application and a recovery DVD Drivery.

    I want to reinstall Windows back to the default settings. I put disc 1 (System Recovery DVD) and close.  I reboot and it goes directly to the office. I hear the whirring disc, but nothing happens.

    I go to the control panel > Recovery > advanced retrieval methods. I click on restart, and it loads files and then says DVD set, which I do. He told me that he does not recognize the installation disc.

    I googled this problem and found a poster on CNET that had the same problem as I do. Also, I can't do a system restore.  My problem is the same as this poster on CNET.  I can read DVDs and CDs.  Those that work very well.

    http://forums.CNET.com/7723-19411_102-568059/Windows-7-installation-disc-not-recognized/

    The files are on the DVD, because I see them.

    I don't know what to do. Should I send my PC back? Can I do to solve this problem?

    Thanks in advance.

    pen

    Hello:

    With recovery disc 1 into the DVD drive, restart the computer and at the beginning of the HP welcome screen, press the ESC key to display a menu of options.

    Select the F9 boot menu option.

    Select the DVD drive on the list of bootable devices, and press the Enter key.

    Watch the screen for additional instructions.

  • Can not build an installer, because it seems to have deleted the files required

    LabVIEW does not locate the Installer source of a component necessary to build this installer. LabVIEW finally found the missing element in the following distribution:

    The distribution name: NOR-DAQmx 8.6, disc 1
    Last known installation path: C:\National Instruments Downloads\NI-DAQmx\8.6\NIDAQ860-1

    Search source for NOR-DAQmx 8.6, disc 1 Setup and build your installer again.

    Visit ni.com/ask support request page to learn more about the resolution of this problem. Use the following as a reference:

    CDK_Build_Invoke.VI.ProxyCaller > CDK_Build_Invoke.vi > CDK_Engine_Main.vi > CDK_Engine_Build.vi > CDK_Engine_PromptForMissingDist.vi

    Loading information of product deployment
    Loading information of product deployment
    Adding files to install
    Makes adding files
    Preparing to build the deployment
    Copy of the products of distributions
    Copy distribution "OR-DAQmx 8.6, disc 2" of: C:\National Instruments Downloads\NI-DAQmx\8.6\NIDAQ860-2\ to: C:\LabVIEW\DAQ\Pentium4_Loggers\builds\Installers\Data worm 23a\ P4 Logger ".
    Deployment of the completed building

    I think I must have deleted the files required from my C drive.

    (Updated)

    This is now fixed.

    I managed to resolve this, by a combination of download OR-DAQmx 8.6.1 from the Web site of NOR and NOR-DAQmx 8.8 disc installation.

  • Error 1000 vi is not in a consistent state

    There is a lot of info on it, but I can't seem to find the solution to my specific problem.

    I'm calling from 4 different vi in sub-panels. All 4 are set up exactly the same way in the properties. When I open and run the live by the reference method in the first level vi everything works fine. However, when I exit the application of higher level, then try to restart it I get the "Error 1000" posts... VI is not in a consistent state. "for 2 of the 4 subvis because they always in the background. I have to use a "third party" abort vi for the 2 to stop so I can run the app again without errors. It drives me crazy. They are all set up the same properties. Is there something that I am missing? Thanks in advance.

    All the sub-panels you've called do not stop when you leave the top-level application.  Some are still running in the background, even if they no longer appear on your application of level superior sub-panels. When you open the sub-panels screws, after the exit, you will see that they are still running. When you run the application again, it tries to run the sub-panels, some work already and that is why the message. You must bind the output on the application of high level to the other secondary live you can use a simple Boolean variable global or shared to complete the sub-panels.

  • When I tried to installHoyelpuzzle and Board of Directors, it was installed but that it would not complete the installation

    I installed several card games again and had no problems.  But when I tried to installHoyelpuzzle and Board of Directors, it was installed but that it would not complete the installation. I have

    Windows Explorer and uninstalled until I reinstalled it.  I've done 4 times.  He went all way through the process, than to see a message that Setup could not be resumed.  Given that the other two disks of Hoyle have been correctly installed, why do I have problems with the drive of Hoyle puzzle and board? I contacted Hoyle and does everything that they told me to do.  But without success.  What could I do it wrong?

    Hello

    (1) what is the operating system that you use on the computer?
    (2) you get error codes?
    If you use Windows 7, Hoyle Board Games is not compatible with Windows 7.
    You try to install the game in compatibility mode.
    Click on the below link to check the compatibility of the game.
     
    You can check the link below:
    Make older programs in this version of Windows
    You can check with the manufacturer of game for patches to run the game on Windows 7.
    http://support.Encore.com/
    I hope this helps!
  • I have an IBM PC camera, but do not have the installation CD. How do I install it without the CD

    I have an IBM PC camera, but do not have the installation CD. How do I install it without the CD

    Hello

    What is a model supported by your version of Windows? You could just plug it in and see if Windows recognizes
    and they get the drivers off of the internet. Although it is recognized that you should always check the manufacturer's website
    new drivers and control software.

    Check with the site of the manufacturer of the camera brand and model you should be able to download the necessary software.

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Try to activate Windows XP, but it does not generate an installation ID to activate it?

    Hello
    I'm trying to legitimately re - install XP pro on a build machine that is free because of various programs such as IE and AVG works don't not after a period not being don't not under tension.
    I deleted the partition via the disc to install and re-installed, but then the activation it would not go online so I'll have to do the option "Activate Windows by phone".
    Unfortunately, it does not generate an installation ID and so I can't enter a confirmation ID.
    Of course the help line have been extremely useful and intuitive, and so I wore the recommended feeding cycle, but nothing helped.
    I also tried to change the product key but it's the same. Just a space where the installation ID should be.
    Any ideas would be most appreciated.
    Thank you
    John

    original title: no installation id

    Here are the appropriate measures on how to solve this problem:

    (1) download windows xp service pack 3 from a work computer and save it on a USB flash drive

    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&ID=24

    (2) start the computer xp in "SafeMode only.

    (3) install the SP3 that you saved on the usb to the computer flash drive

    (4) restart the computer in "normal mode" and now you have an installation ID

  • I'm trying to upgrade to service pack 3 for xp and I get an error message and it will not complete the installation. What should I do?

    I'm trying to upgrade to service pack 3 for xp and I get an error message and it will not complete the installation.  What should I do?

    Hi BartlettNYC,

    Please see the links below, to solve the problems with Window XP SP3.

    Steps to take before you install Windows XP SP3.

    http://support.Microsoft.com/kb/950717

    How to troubleshoot a windows XP SP3 Installation failure.

    http://support.Microsoft.com/kb/950718

    Good luck.

  • I'm having a problem reinstalling Windows XP. After formatting the disk and create partitions, it will not complete the installation.

    Problem reinstalling Windows XP

    I'm having a problem reinstalling Windows XP.  After formatting the disk and create partitions, it will not complete the installation.  He goes back and reinstall Windows again.  I go through the installation of 39 minutes, the computer restarts to complete and it loops back and start the installation again. Why it does this and what I can do to move beyond this?

    Go into the BIOS and make sure that you your hard drive is not set to off, and that is the first priority boot CD and your second HD.

    Don't push when it restarts anything just to let him do what he does and report back if anything I'm sorry I have no idea.

  • Microsoft LifeCam does not work after installation

    Software will not launch after installation.  Running Version 3.6 on XP SP3 OS.

    Hello

    ·         Have you been able to use the cam of life on the system before?

    ·         Where you installed the software and the drivers from?

    ·         Do you have an error message when you try to run the software?

    If you try to install the drivers on the CD/DVD and then, I would you suggest to uninstall the drivers and the software that is present on the system and then download the drivers and software on the Microsoft site and then install on the system and check if the problem is solved or not.

    For Windows XP 32 bit:

    http://www.Microsoft.com/hardware/download/DownloadResult.aspx?category=ice&type=LifeCam&name=RKA-00001&OS=XPSP2x64&lang=en

    I suggest you to return the items mentioned below.

    Troubleshoot failures to find the new LifeCam hardware

    http://support.Microsoft.com/kb/929087

    Troubleshoot failures to find the new LifeCam hardware

    http://support.Microsoft.com/kb/929087

    Set the empty preview, "initialization error" or 'no camera not connected' error in the LifeCam software

    http://support.Microsoft.com/kb/933311

Maybe you are looking for