Data Driven Test doesn't work in coded UI

Hi,
I have written my first coded ui data driven test (Visual Studio 2012).  Although the test ran and was marked passed. I don't think it actually did anything.  
I have 2 fields (Input and Output) on my csv file.
n my app,  I want to enter the input field in a field called GoTo which is an UITbedit field, hit enter.  This should open another window where I want to validate the window title = to my Output 
Here is my code
        [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Data/MainData.csv", "MainData#csv", DataAccessMethod.Sequential), DeploymentItem("MainData.csv"), TestMethod]
        public void DataDrivenTest()
            //string paramVal = TestContext.DataRow["Input"];
            this.UIMap.EnterGoToValueMainParams.TextInputEditText =
                TestContext.DataRow["Input"].ToString();
    this.UIMap.EnterGoToValueMain();
            this.UIMap.PressEnter();
            this.UIMap.AssertWindowTitleExpectedValues.TextOutputEditText =
                TestContext.DataRow["Output"].ToString();
During playback, it appeared that the coded ui test had looped through the csv file, but it didn't actually write anything to the edit field that I was testing.

It still doesn't work,
I modified my code as follows:
            this.UIMap.EnterGoToValueMainParams.TextInputEditText =
                   TestContext.DataRow["Input"].ToString();
            this.UIMap.EnterGoToValueMain();
            this.UIMap.PressEnter();
            this.UIMap.AssertWindowTitleExpectedValues.TextOutputEditText =
                   TestContext.DataRow["Output"].ToString();
            this.UIMap.AssertWindowTitle();
The application appears to loop through the file, but it is placing my original entered test "1" in the edit field during both iterations.  The playback is slow enough that I can see what is being entered. It doesn't seem to be replacing the
"1" with a "5" from my input file.

Similar Messages

  • Data-Driven test : Compilation should be avoided while running tests in batch when .csv file inputs changed to use them in script

    Hi,
    I am running Data-Driven  test on different machines with different  input values in .CSV file in batch mode.we are facing following problem:
     Test not considering modified values in  .CSV file until we recompile the test.
    Is there any way to avoid this dependency of compilation after updating .CSV file???
    Regards,
    Nagasree.

    Assuming the CSV is part of the Visual Studio solution. Open the properties panel for the CSV file from solution explorer. Set "Copy to output directory" to "Copy if newer" or to "Copy always". Some documents recommend
    "Copy if newer" but I prefer "Copy always" as occasionally a file was not copied as I expected. The difference between the two copy methods is a little disk space and a little time, but disks are normally big and the time to copy is normally
    small. Any savings are, in my opinion, far outweighed by being sure that the file will be copied correctly.
    See also
    http://stackoverflow.com/questions/23469100/how-to-run-a-test-many-times-with-data-read-from-csv-file-data-driving/25742114#25742114
    Regards
    Adrian

  • My MTM version is not allowing Data Driven Test Case UI to be created???

    From in MTM I am able to use the UI Builder to create (R&P) a test case (standard login case) but when I then try to use the same process to create a Data Driven test case for login the screens to allow that feature are not showing up.  I am using
    the Ultimate package but is there something else I should be doing?

    Hi,
    What do you mean the screens to allow that feature are not showing up?
    In MTM, we could add parameters to a manual test case to run multiple times with different data.
    More information, please refer to:
    # Add Parameters to a Manual Test Case To Run Multiple Times with Different Data
    https://msdn.microsoft.com/en-us/library/vstudio/dd997832(v=vs.110).aspx
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Bought a new Mac, migrated data, now CS4 doesn't work. Why?

    I bought a new Mac, had the Apple guys migrate my data and apps to it. Now CS4 doesn't work.
    I researched a bit and found that I SHOULD have deactivated and uninstalled CS4 from my old Mac. I've now done that.
    But do I have to uninstall CS4 files from my new Mac now--and reinstall? Will that work?

    Hi,
    I have a question related to one you answered above: "bought a new Mac, migrated data, now CS4 doesn't work."
    My situation is a little different. I am hoping you can help me with it. I hope I am not violating any protocols by asking you specifically?  A year ago I reinstalled my Mac's operating system. My CS4 is on my computer under "Previous System." I am unable to open it from there and I do not want to attempt migrating it for reasons noted above. I did try to reinstall it as you suggested to hbrady67 by dowloading from CS4 products with my serial number but I got this message: "Upgrade Check  We looked in the default location for qualifying products installed on the machine, but none were found. You may verify upgrade eligibility now by completing the fields to the right. 1) Select a product you already own. 2) Enter a serial number for this product.  CS4 wasn't in the list of selections. The protocol suggested won't work for me since I am not doing an upgrade but trying to reinstall what I already have. Can you direct me on where to go/what to do?  Thank you very much.      Bergi.
    I found the solution to this problem. I was able to download the trial version of what I have and enter the serial number from there. However, it still asked for a serial number from previous software: "your setup is for an upgrade version of Adobe Creative Suite 4." (I entered the serial number that I have for CS2. And it was accepted.  Thank you.  Bergi

  • The connection string for coded UI Data driven test using excel data source is not working

    Hello,
    I am using the visual studio 2012 coded UI test, i added the following connection strings to connect to an excel data source:
    [DataSource("System.Data.Odbc", "Dsn=Excel Files;Driver={Microsoft Excel Driver (*.xls)};dbq=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;defaultdir=.;driverid=790;maxbuffersize=2048;pagetimeout=5;readonly=true",
    "Sheet1$", DataAccessMethod.Sequential), TestMethod]
    [DataSource("System.Data.Odbc", "Dsn=Excel Files;dbq=|DataDirectory|\\Automation data file.xls;defaultdir=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;driverid=1046;maxbuffersize=2048;pagetimeout=5",
    "Sheet1$", DataAccessMethod.Sequential), TestMethod]
    But i get the following error:
    "The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.
    Error details: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
    Thanks,
    Shaza

    Thanks for Adrian's help.
    Hi shaza,
    From the error message, I suggest you can refer the Adrian's suggestion to check the date source connection string correctly.
    In addition, you can refer the following about how to Create a Data-Driven Coded UI Test to check your issue:
    http://msdn.microsoft.com/en-us/library/ee624082.aspx
    Or you can also try to use a Configuration File to Define a Data Source for coded UI test.
    For example:
    <?xml
    version="1.0"
    encoding="utf-8"
    ?>
    <configuration>
    <configSections>
    <section
    name="microsoft.visualstudio.testtools"
    type="Microsoft.VisualStudio.TestTools.UnitTesting.TestConfigurationSection,
    Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </configSections>
    <connectionStrings>
    <add
    name="ExcelConn"
    connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\add.xlsx;defaultdir=.;
    driverid=790; maxbuffersize=2048; pagetimeout=60;"
    providerName="System.Data.Odbc"/>
    <add
    name="ExcelConn1"
    connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\sum.xlsx;defaultdir=.;
    driverid=790;maxbuffersize=2048;pagetimeout=60"
    providerName="System.Data.Odbc"/>
    </connectionStrings>
    <microsoft.visualstudio.testtools>
    <dataSources>
    <add
    name="ExcelDS_Addition"
    connectionString="ExcelConn"
    dataTableName="Addition$"
    dataAccessMethod="Sequential"/>
    <add
    name="ExcelDS_Multiply"
    connectionString="ExcelConn1"
    dataTableName="Multiply$"
    dataAccessMethod="Sequential"/>
    </dataSources>
    </microsoft.visualstudio.testtools>
    </configuration>
    For more information, please see:https://msdn.microsoft.com/en-us/library/ms243192.aspx
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • "Move Current Track Automation Data to Region" doesn't work for all

    I have been using the 'Move Current Track Automation Data to Region' and while it works fine for some types of automation data like channel volume, pan and some plugin parameters, it doesn't work for all of them.
    I haven't done exhaustive research into which parameters work and which don't, but most of the parameters for individual voices within Ultrabeat don't - which is annoying as that is what I was trying to use it for.
    Any ideas about this, or workarounds?

    OK, well an update on this in case anyone's interested.
    With some further experimentation I have discovered that this problem did not exist in Logic 7 - ie you can move current track automation data for individual Ultrabeat voices to the region.
    It's also possible to move automation data for individual Ultrabeat voices using 'Move All Track Automation Data to Region,' so I suppose this is a kind of workaround, though it can be annoying if you don't want to move all track automation data.
    I'm now assuming this is a bug in Logic 8; is there any way to convert a Logic 8 project to work in Logic 7, as this along with the touch tracks bug is making working in Logic 8 very frustrating?

  • Receiveing data over RTP doesn't work

    First of all , excuse my english.....it really sucks
    Second of all , this is my problem:
    I modified the JMStudio source to suit my needs.....leaving just what i needed.The application works......it sends data just fine but it does't receives it.I tried to rewrite the function thousand of times in different modes but it doesn't work.
    This is my source code :
              private void openRtp () {
    OpenRtpDialog dlgOpenRtp;
    String strAction;
    String strAddress;
    String strPort;
    String strTtl;
    RTPManager           receptie=RTPManager.newInstance();
    InetAddress      adresaip=null;
    int                    port,ttl;
    ReceiveStreamListener receptiestr = null;
    ReceiveStreamEvent     x = null;
    dlgOpenRtp = new OpenRtpDialog ( this, cfgJMApps );
         dlgOpenRtp.isVisible ();
    strAction = dlgOpenRtp.getAction ();
    if ( !strAction.equals(JMDialog.ACTION_OPEN) )
    return;
    strAddress = dlgOpenRtp.getAddress();
    strPort = dlgOpenRtp.getPort ();
    strTtl = dlgOpenRtp.getTtl ();
                   try {
                        adresaip=InetAddress.getByName(strAddress);
                   } catch (UnknownHostException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
    port=Integer.valueOf(strPort).intValue();
    ttl=Integer.valueOf(strTtl).intValue();
    SessionAddress adresa=new SessionAddress(adresaip,port,ttl);
         try {
                        receptie.initialize(adresa);
                   } catch (InvalidSessionAddressException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
    if ( receptie == null ) {
    MessageDialog.createErrorDialog ( this, JMFI18N.getResource("jmstudio.error.sessionmngr.create") );
    return;
    receptie.addReceiveStreamListener(receptiestr);
    receptiestr.update(x);
    update(x);
    // the rest will be done when we get NewReceiveStreamEvent
    updateMenu ();
    pls tell me what i do wrong cause it's driving me insane......the function from the JMStudio works in the original but doesn't work in my version so it makes me think that the problem is from somewhere else.
    For further assistance i'll be watching this thread closely.
    Thank you for your help.
    Yours gratefully,
    Sorin

    I'm just going to point you in the direction of some sample code...
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html]
    Go look at their "initialize" function and figure out what the sample code is doing that you aren't...
    And remember, it could simply be a matter of doing something wrong with IP address... You can't use 127.0.0.1 for RTP transmissions, and you can't broadcast to the same computer if your transmit code is binding the destination port as the transmission port. IE, if you tell it to broadcast to the remote computer on port 2600, and it uses the local port 2600 to broadcast on...then you won't be able to read from port 2600 on the local computer.

  • How to trigger a MouseEvent from TLF, my test doesn't work

      Hi,
          I run into a problem while using the Listener of TLF,
          Inside  the  TextFlow,  I have several Paragraphs.
          What I wish to accomplish is to trigger a mouse Event, like ROLL_OVER, ROLL_OUT event , when  my mouse is over a on one of the Paragraphs.
          I used to experiment a while , but never seem to work, just the examples below
          _textFlow.addEventListener(FlowElementMouseEvent.ROLL_OUT,onMouseHandler);
          _textFlow.addEventListener(FlowElementMouseEvent.ROLL_OVER,onMouseHandler);
           ///   which doesn't work.         i need the event response ,so i can manipulate the paragraph
    private function onMouseHandler(e:FlowElementMouseEvent):void
         trace("onMouseHandler" +  e.type  );
         var para:ParagraphElement = e.flowElement.getParagraph();
         trace(para.textLength);
    Thanks  in   advance!!!

       this is the code
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="http://www.adobe.com/2006/mxml"
       creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.events.*;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.InlineGraphicElement;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.elements.FlowElement;
    import flashx.textLayout.tlf_internal;
    private var _textFlow:TextFlow;
    private var textSprite:Sprite;
    private var backgroundSprite:Sprite;
    var source:XML = <TextFlow xmlns="http://ns.adobe.com/textLayout/2008">
    <div></div>
    <p>
    <img source="air.png"/>
    <span>Flex is a highly productive, free open source framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops, and operating systems. While Flex applications can be built using only the free Flex SDK, developers can use Adobe® Flex® Builder™ 3 software to dramatically accelerate development. Try Flex Builder 3 free for 60 days. Try ILOG Elixir to enhance data display in your Flex applications.</span>
    <br/>
    </p>
    <div></div>
    <p>
    <span>Adobe® Flex® 3 是用于构建和维护在所有主要浏览器、桌面和操作系统一致地部署的极具表现力的 Web 应用程序的高效率的开放源码框架。 可以使用免费的 Flex SDK 构建 Flex 应用程序, 开发人员可以使用 Adobe Flex Builder™ 3 软件来显著促进开发。 60 天内免费试用 Flex Builder 3</span>
    <br/>
    </p>
    <div></div>
    </TextFlow>;
    private function init():void
    backgroundSprite = new Sprite();
    canvas.rawChildren.addChild(backgroundSprite);
    textSprite = new Sprite();
    canvas.rawChildren.addChild(textSprite);
        _textFlow = TextConverter.importToFlow(source, TextConverter.TEXT_LAYOUT_FORMAT);
    _textFlow.fontFamily = "Georgia, Times";
    _textFlow.fontSize = 16;
    _textFlow.columnCount = 2;
    _textFlow.columnGap = 30;
    _textFlow.columnWidth = 320;
    setListenerOnParagraph(_textFlow);
    _textFlow.flowComposer.addController(new ContainerController(textSprite,canvas.width,canvas.height));
    _textFlow.flowComposer.updateAllControllers();
    import flashx.textLayout.tlf_internal;
    private function setListenerOnParagraph(textFlow:TextFlow):void
    use namespace  tlf_internal;
    for(var i:int =0;i < textFlow.numChildren;i++)
        var para2:FlowElement = textFlow.getChildAt(i);
       if(para2 is  ParagraphElement)
         para2 = para2 as ParagraphElement
         trace("paragraph:"+para2.textLength);
         para2.tlf_internal::getEventMirror().addEventListener(MouseEvent.CLICK, regionClickHandler);      //  wrong here
    public function regionClickHandler(evt:MouseEvent):void {
    trace("click");
    ]]>
    </mx:Script>
    <mx:Canvas width="614" height="321" x="30" backgroundColor="#FDFBFB" id="canvas">
    </mx:Canvas>
    </mx:WindowedApplication> 

  • Format date with "yyww" doesn't work

    Format a date to the format "yyww" doesn't work correctly for the first week of some years. It seams to be weeks that start in December that doesn't work.
    DateFormat df = new SimpleDateFormat("yyww", Locale.FRANCE);
    String in = "0801";
    // Gives: Mon Dec 31 00:00:00 CET 2007
    Date d = (Date) df.parseObject(in);
    System.out.println(d);
    // !? Gives: 0701
    String out = df.format(d);
    System.out.println(out);Any help appreciated!

    You're right. ISO 8601 Whichever year contains Thursday determines which year the week belongs to.
    The U.S. locale plays by different rules though. At least according to GergorianCalendar, if even one day falls in the new year, it is week 01. This little program displays this:
    import java.io.UnsupportedEncodingException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    import java.util.Locale;
    import java.util.TimeZone;
    import java.text.MessageFormat;
    import javax.swing.JOptionPane;
    public class CalendarTest {
         public static void main(String args[]) throws UnsupportedEncodingException {
              try {
                  if (args.length != 0) {
                       doYear(new Integer(args[0]).intValue());
                       return;
              } catch (NumberFormatException nfe) {
              doYear(2005);
              doYear(1998);
              doYear(1993);
          * Method main
          * @param args
         public static void doYear(int year) throws UnsupportedEncodingException {
              System.out.println();
              System.out.println(year);
              GregorianCalendar a = new GregorianCalendar(TimeZone.getTimeZone("GMT-8"), Locale.US);
              GregorianCalendar b = new GregorianCalendar(TimeZone.getTimeZone("GMT+1"), Locale.GERMANY);
              a.set(Calendar.YEAR, year);
              a.set(Calendar.MONTH, Calendar.JANUARY);
              a.set(Calendar.DAY_OF_MONTH, 1);
              b.set(Calendar.YEAR, year);
              b.set(Calendar.MONTH, Calendar.JANUARY);
              b.set(Calendar.DAY_OF_MONTH, 1);
              while (a.get(Calendar.DAY_OF_WEEK) != a.getFirstDayOfWeek()) {
                   a.add(Calendar.DAY_OF_MONTH, -1);
              while (b.get(Calendar.DAY_OF_WEEK) != b.getFirstDayOfWeek()) {
                   b.add(Calendar.DAY_OF_MONTH, -1);
              do {
                   System.out.println("US:  " + a.getTime() + " " + a.get(Calendar.WEEK_OF_YEAR));
                   a.add(Calendar.DAY_OF_MONTH, 1);
              } while (a.get(Calendar.DAY_OF_MONTH) != 8);
              System.out.println();
              do {
                   System.out.println("DE:  " + b.getTime() + " " + b.get(Calendar.WEEK_OF_YEAR));
                   b.add(Calendar.DAY_OF_MONTH, 1);
              } while (b.get(Calendar.DAY_OF_MONTH) != 8);
    }

  • Exporting 3D Camera data into C4D doesn't work properly.

    When I export from AE into C4D, the resulting file data doesnt seem to work properly. I have weird rotations where there shouldn't be and the camera shakes all of the place.
    I have installed the C4D Importer Plug in from Maxon but just using the CIneware Exporter plug in that comes with AE CC 14.
    Any thoughts why it doesn't seem to be working correctly.
    C

    same problem here, with a camera linked to a null object, which is actually moving, not the camera.
    In C4D (R14 studio) the movement goes wild, i's not what it's like in AE CC2014
    Anyone please ???

  • Javascript , date Field change doesn't work

    I want to display the expiration date automatically as soon as I selected a date of issue but it does not work..
    <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader"><nobr>StartDate</nobr></H3>
    </td>
    <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="StartDate" __designer:bind="
    {ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@StartDate')}"/>
    <Sha
    rePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="StartDate" ControlMode="New"/>
    </td>
    </tr>
    <tr>
    <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader"><nobr>EndDate</nobr></H3>
    </td>
    <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="New" FieldName="EndDate" __designer:bind="
    {ddwrt:DataBind('i',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@EndDate')}"/>
    <SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="EndDate" ControlMode="New"/>
    </td>
    </tr>
    <script type="text/javascript" src="../../JQuery/jquery.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    alert (&quot;Test&quot;);
       $(&apos;#ff2&apos;).change(function(){
       alert (&quot;Test&quot;);
           var startVal = $(this).val();
    var month = startVal.getMonth();
    var day = startVal.getDate();
    var year = startVal.getFullYear();
    year = year  + 1;
    endVal= day+&apos;/&apos;+&apos;month&apos;+&apos;/&apos;+&apos;Year&apos;;
           $(&apos;#ff3&apos;).val(endVal);
    </script>

    Hi,
    Please add the following code into the new form page. You can also add a content editor web part into the new form page and add the code into the web part.
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    $("input[title='Start Date']").blur(function () {
    var startVal = $(this).val();
    var startDate = new Date(startVal);
    var month = startDate.getMonth() + 1;
    var day = startDate.getDate();
    var year = startDate.getFullYear() + 1;
    $("input[title='End Date']").val(month + "/" + day + "/" + year);
    </script>
    Or here is a thread talk about the similar issue for your reference:
    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27765240.html
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Swf test doesn't work

    I've created an image carousel and tested it in Flash and all
    is fine, but when i try and view it as an swf it doesn't playback?
    Is there are coding i need or is there something I'm
    missing?

    I've created an image carousel and tested it in Flash and all
    is fine, but when i try and view it as an swf it doesn't playback?
    Is there are coding i need or is there something I'm
    missing?

  • Sending data to xport doesn't work correctly

    Dear programmers,
    For my thesis I have to send data from a computer to a microcontroller trough TCP/IP. So I've written a program in java dat sends the data, but it goes wrong. This is my code:
    import java.io.*;
    import java.net.*;
    public class Connection {
         private Socket socket = null;
        private PrintWriter output = null;
        private BufferedReader input = null;
        private BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));;
         public boolean createConnection(String ip, int port) {
            boolean connect = false;
            try {
                socket = new Socket(ip, port);                                                            // Maakt socket aan naar gegeven poort en ip
                output = new PrintWriter(socket.getOutputStream(), true);                         // Output naar de server
                input = new BufferedReader(new InputStreamReader(socket.getInputStream()));     // Ontvangen gegevens van server
                connect = true;
            } catch (UnknownHostException e) {
                connect = false;
                 System.err.println("Kan geen verbinding maken naar ip-adres: " + ip);
                System.exit(1);
            } catch (IOException e) {
                 connect = false;
                System.err.println("Kan geen input/output verkrijgen van ip-adres: " + ip);
                System.exit(1);
            return connect;
         public boolean sendMessage(String message) {          
              output.println(message);
              output.println("\r\n")
              return true;
         public String receiveMessage() {
              String message = null;
              try {
                   message = input.readLine();
              } catch (IOException e) {
                   e.printStackTrace();
              if(message.equalsIgnoreCase("HTTP/1.1 0 ERROR")) {
                   message = "#ERROR#";
              return message;
         public boolean getStatus() {
              if(socket.isConnected()) {
                   return true;
              else {
                   return false;
         public void closeConnection() {
              try {
                   output.close();
                   input.close();
                   stdIn.close();
                   socket.close();
              } catch (IOException e) {
                   e.printStackTrace();
    }The first time I send something it goes correctly, but when I try to send the second data it goes wrong.
    So as example I send 100 times the number 512 to the xport.
    1st time: 512
    2nd time: 5
    3th time: 52
    4th time: 5125
    So only the first time it sends the data correctly. It's my program and not the xport because trough hyperterminal the data is sended correctly. I hope you guys can help me.

    Okay, thanks for your reaction. Now I changed my Connection.java code into:
    import java.io.*;
    import java.net.*;
    public class Connection {
         private Socket socket = null; 
        private BufferedOutputStream ostream = null;
        private BufferedInputStream istream = null;
         public boolean createConnection(String ip, int port) {
            boolean connect = false;
            try {
                socket = new Socket(ip, port);
                ostream = new BufferedOutputStream(socket.getOutputStream());
                istream = new BufferedInputStream(socket.getInputStream());
                connect = true;
            } catch (UnknownHostException e) {
                connect = false;
                 System.err.println("Kan geen verbinding maken naar ip-adres: " + ip);
                System.exit(1);
            } catch (IOException e) {
                 connect = false;
                System.err.println("Kan geen input/output verkrijgen van ip-adres: " + ip);
                System.exit(1);
            return connect;
         public boolean sendMessage(String message) {
              byte[] buffer = new byte[10];
              try {
                   buffer = message.getBytes();
                   ostream.write(buffer, 0, message.length());
                   ostream.flush();
              catch(Exception e) {
                   e.printStackTrace();
              return true;
         public String receiveMessage() {
              String message = null;
              byte[] readBuffer = new byte[40];
              try {
                   int message_int = istream.read(readBuffer, 0, 40);
                 message = new String(readBuffer, 0, message_int);
              } catch (IOException e) {
                   e.printStackTrace();
              if(message.equalsIgnoreCase("HTTP/1.1 0 ERROR")) {
                   message = "#ERROR#";
              return message;
         public boolean getStatus() {
              if(socket.isConnected()) {
                   return true;
              else {
                   return false;
         public void closeConnection() {
              try {
                   ostream.close();
                   istream.close();
                   socket.close();
              } catch (IOException e) {
                   e.printStackTrace();
    }Do you think this was the problem? Maybe it was. Let's hope so. I will let you know something when I tested it tomorrow in school.

  • WebUtil Demo OLE test doesn't work

    Hi
    I have downloaded the WebUtil demo and all tabs/functionalities in the form WU_TEST_105 works except the OLE test. When I click on the button "Write to Word" the form just hangs/freezes adn nothing happens. I added the lines
    webutillogging=console
    and
    webutilloggingdetail=detailed
    to my formsweb.cfg and here are part of the java console output:
    .Exception occurred during event dispatching:
    java.lang.NoClassDefFoundError
    at oracle.forms.webutil.ole.OleFunctions.create_obj(OleFunctions.java:398)
    at oracle.forms.webutil.ole.OleFunctions.getProperty(OleFunctions.java:189)
    at oracle.forms.handler.UICommon.onGet(Unknown Source)
    at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
    at oracle.forms.engine.Runform.processMessage(Unknown Source)
    at oracle.forms.engine.Runform.processSet(Unknown Source)
    What does this mean? What shall I do?
    regards // Frederic

    My webutil is downloaded already.
    Loading http://appsrv1.sarar.com.tr:7778/forms/java/frmall_jinit.jar from JAR cache
    Loading http://appsrv1.sarar.com.tr:7778/forms/java/icons.jar from JAR cache
    Loading http://appsrv1.sarar.com.tr:7778/forms/java/frmwebutil.jar from JAR cache
    Loading http://appsrv1.sarar.com.tr:7778/forms/java/jacob.jar from JAR cache
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.0
    Exception occurred during event dispatching:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.jacob)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkLink(Unknown Source)
         at java.lang.Runtime.loadLibrary0(Unknown Source)
         at java.lang.System.loadLibrary(Unknown Source)
         at com.jacob.com.Dispatch.<clinit>(Dispatch.java)
         at oracle.forms.webutil.ole.OleFunctions.create_obj(Unknown Source)
         at oracle.forms.webutil.ole.OleFunctions.getProperty(Unknown Source)
         at oracle.forms.handler.UICommon.onGet(Unknown Source)
         at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.0
    Exception occurred during event dispatching:
    java.lang.NoClassDefFoundError
         at oracle.forms.webutil.ole.OleFunctions.create_obj(Unknown Source)
         at oracle.forms.webutil.ole.OleFunctions.getProperty(Unknown Source)
         at oracle.forms.handler.UICommon.onGet(Unknown Source)
         at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    I have this, what can I do to fix this?

  • "Message Driven Bean" doesn't work with Sun App Server

    Hello all,
    i have a little bit problems, running a simple "Message Driven Bean" under the Sun App Server. The deployment of it works fine, but after starting the SUN App Server i get the following error message:
    An error occurred during the message-driven beancontainer initialization at runtime. The most common cause for this is that the physical resource(e.g. Queue) from which the message-driven bean is consuming either does not exist or has been configured incorrectly. Another common error is that the message-driven bean implementation class does not correctly implement the required javax.ejb.MessageBean or MessageListener interfaces.
    Has anybody a workaround for this problem?
    The queue seems to be correctly installed. A simple client programm from the Sun Tutorial (Consumer & Producer) works fine without any Errors or Exceptions.
    I am a little bit confused, because the queue seems to work with the client programms but not with a MDB running on the SUN App Server.
    Thanks for you help!
    Greetings
    Manuel

    Hello Mr Manuel!
    could you plz help me with the steps for creating a message driven bean using netbeans ver 5.0(with Sun Java� System Application Server Platform Edition 8.2 )
    I just know how to work with Session beans & Entity Bean, and am try to learn to work on Message Driven Beans too. there are no proper tutorials where i can find steps for creating these..
    I need the steps from the scratch.,like creating QueueConnection Factory & Destination etc..
    It will be gr8 if you can help me with this at the earliest .
    Thank you
    Bye

Maybe you are looking for

  • My iPod touch 4th generation isn't turing on

    My iPod Touch 4th generation isn't turing on, and when I plug it into the computer it still isn't turing on. iTunes dosen't even recognize it and I have the latest iTunes for it!! My iPOd hasn't had any damage done to it, it just won't work!!! PLEASE

  • Will the Iphone 5 support the Hava Player

    Will the Iphone 5 support the Mobile Hava player

  • Report based on Material group

    Dear all, Actually our Business wants a report based on the material group and G/L account. For each material group what are the accounting documents generated and the G/L account triggered with amount. Example : mat.grp         G/L account(121001) 

  • Band Wipe Crossing effect preset on an JPEG image not working

    I am trying to use Band Wipe Crossing effect preset on an JPEG image (JPEG Image already imported in library & placed in composition). This effect is just working on small section in the centre of the image. Not on complete image. This effect works f

  • Can 10g OAS run 10g Report server and 6i reports together?

    Re-posted from the OAS thread: Can 10g OAS run 10g Report server and 6i reports together? We have need to run 6i and 10g reports from the same physical server running OAS 10g. Are there issues / conflicts? There are hundreds of 6i reports called from