Sharepoint 2013, fill field from cascading Message sending data to the server

When i try fill a dropdown with another dropdown this message placed on the screen. i have other forms with the same function and i have no problema.  please i need resolve this.

 fill a dropdown with another dropdown this message placed on the screen
Hi,
From your description, I cannot understand your issue clearly. Could you provide some detailed information or screenshot about your description?
Best Regards,
Vincent Han
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format

    Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format. Siebel wants to send the data as xml to BI but not sure of the BI capabilities on giving WSDL embedded with XSD (input is a hierarchical)

    Hi All,
    I am able to fulfil above requirement. Now I am stuck at below point. Need your help!
    Is there any way to UPDATE the XML file attached to a Data Definition (XML Publisher > Data Definition) using a standard package or procedure call or may be an API from backend? I am creating an XML dynamically and I want to attach it to its Data Definition programmatically using SQL.
    Please let me know if there is any oracle functionality to do this.
    If not, please let me know the standard directories on application/database server where the XML files attached to Data Definitions are stored.
    For eg, /$APPL_TOP/ar/1.0/sql or something.
    Regards,
    Swapnil K.

  • Anyone know why since May 18th I get this when checking my POP3 mail from Mail? 'The server returned the error: The attempt to send data to the server "(null)" failed.' Looked at all the debates on here, nothing works. APPLE?!

    <rant>I have seen many people complaining about this. I've seen lots of suggestions; change your POP3 SSL number, twist your knee backwards whilst standing on just your little finger. Nothing works. I'd like to not have to migrate to a new Mail software.
    </rant>
    I thank you.
    <Edited by Host>

    MY SOLUTION REPOSTED FROM ANOTHER THREAD:
    I've just solved a similar issue.
    I have a dedicated server running Plesk 9.5 and when I upgraded to iLife 11 and Snow Leopard this error appeared. I could quickly click "get mail" and I'd get all my mail, but only 3-4 of my 9 mail accounts would connect. Theo others would have the error:
    "The server error encountered was: The attempt to read data from the server..."
    I found solutions for those using IMAP mail:
    modify the /etc/courier-imap/imapd configuration file and change MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40. This allows all the machines behind my home firewall to connect to multiple accounts on the e-mail server with mailbox caching enabled.
    I'd made this change on my server but it didn't seem to have any effect. It dawned on me that I'm using POP, not IMAP. So I found in /etc/courier-imap/pop3d the same settings. I changed the MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40 and voila, all my connections concurrently worked.
    This has taken me more than two days to fix and I hope posting this helps someone else with the same issue.

  • [Forum FAQ] SharePoint 2013: Extracting values from a multi-value enabled lookup column and merge values to a multi-value enabled column

    For some business requirements, users want to extract values from a multi-value enabled lookup column
    and add items to another list based on each separate value. In contrast, others want to find duplicate values in the list and merge associated values to a multi-value enabled column and then
    add items to another list based on the merged value. All of these can be achieved using SharePoint Designer 2013 Workflow.
    How to extract values from a multi-value enabled lookup column and add items to another list based
    on each separate value using SharePoint Designer 2013.
    Important actions: Loop Shape; Utility Actions
    Three scenarios
    Things to note
    Steps to create Workflow
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013.
    Important actions: Call HTTP Web Service; Build Dictionary
    Things to note
    Steps to create Workflow
    How to
    extract values from a multi-value enabled lookup column and
    add items to another list based on each separate value using SharePoint Designer 2013.
    For example, they have three lists as below. They want to
    extract values from the Destinations column
    in Lookup2 and add items to Lookup3 based on each country and set Title to current item: ID.
    Lookup1:
    Title (Single line of text)
    Lookup2:
    Title (Single line of text), Destinations (Lookup; Get information from: Lookup1 in Title column).\
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Important action
    1. Loop Shape: SharePoint Designer 2013 support two types of loops: loop n times and loop with condition.
    Loops must also conform to the following rules:
    Loops must be within a stage, and stages cannot be within a loop.
    Steps may be within a loop.
    Loops may have only one entry and one exit point.
    2. Utility Actions: It contains many actions, such as ‘Extract Substring from Index of String’ and ‘Find substring in String’.
    Three scenarios
    We need to loop through the string returned from the look up column and look for commas. There are three
    scenarios:
    1.  No comma but string is non-empty so there is only one country.
    2.  At least one comma so there is at least two or more countries to loop.
    3.  In the loop we have consumed all the commas so we have found the last country. 
    Things to note
    There are two things to note:
    1. "Find string in string (output to Variable:index)"  will return -1 if doesn't find
    the searched for string.
    2. In the opening statement "Set Variable: Countries to Current Item:Destinations" set the return
    field as  "Lookup Values, Comma Delimited".
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Destinations (Lookup; Get information from: Lookup1 in Title column).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup2.
    Add conditions and actions:
    Start the workflow automatically when an item is created.
    Add item to Lookup2, then workflow will be started automatically and create multiple items to lookup3.
    See the below in workflow History List:
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013
    For example, they have three lists as below. They want to find duplicate values in the Title column in
    Lookup3 and merge country column to a multi-value enabled column and then add item to lookup2 and set the Title to Current Item: Title.
    Lookup1:
    Title (Single line of text)
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Lookup2:
    Title (Single line of text), Test (Single line of text).
    Important actions
    "Call HTTP Web Service"
    action: In SharePoint 2013 workflows, we can call a web service using a new action introduced in SharePoint 2013 named Call HTTP Web Service. This action
    is flexible and allows you to make simple calls to a web service easily, or, if needed, you can create more complex calls using HTTP verbs as well as allowing you to add HTTP headers.
    “Build Dictionary"
    action:
    The Dictionary variable type is a new variable type in the SharePoint 2013 Workflow.
    The following are the three actions specifically designed for the Dictionary variable type: Build Dictionary, Count Items in a Dictionary and Get an Item from a Dictionary.
    The "Call HTTP Web Service" workflow action would be useless without the new "Dictionary" workflow action.
    Things to note
    The
    HTTP URI is set to https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be sort by Id in descending order.
    Use Get
    d/results(0)/Id form
    Variable: ResponseContent (Output to
    Variable: maxid) to get the Max ID.
    Use Set
    Variable: minid to Current List:ID to get the Min ID.
    Use Copy from
    Variable: destianation , starting at
    1 (Output to
    Variable: destianation) to remove the space.
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Test (Single line of text).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup3.
    Add a new "Build Dictionary" action
    to define the http request header:
    Add a Call HTTP Web Serviceaction, click on
    this and paste your http request.
    To associate the
    RequestHeader variable, select the Call action property,
    set the
    RequestHeaders property to
    RequestHeader:
    In the Call action, click on
    response and associate the response to a new
    variable: ResponseContent (of type Dictionary).
    After the Call action add Get item from Dictionary action to get the Max ID.
    Add Set Workflow Variable action to get the Min ID.
    Add Loop Shape (Loop with Condition) to get all the duplicate titles and integrate them to a string.
    Create item in Lookup2.
    The final Stage should look like this:
    Start the workflow automatically when an item is created.
    Add item to Lookup3, then workflow will be started automatically and create item to lookup2.
    See the below in workflow History List:
    References
    SharePoint Designer 2013 - Extracting values from a multi-value enabled lookup column into a dictionary as separate items:
    http://social.technet.microsoft.com/Forums/en-US/97d34468-1b53-4741-88b0-958472f8ca9a/sharepoint-designer-2013-extracting-values-from-a-multivalue-enabled-lookup-column-into-a
    Workflow actions quick reference (SharePoint 2013 Workflow platform):
    http://msdn.microsoft.com/en-us/library/jj164026.aspx
    Understanding Dictionary actions in SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/jj554504.aspx
    Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/dn567558.aspx
    Calling the SharePoint 2013 Rest API from a SharePoint Designer Workflow:
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/

    GREAT info, but it may be helpful to note that when replacing a portion of the variable "Countries" with a whitespace character, you may cause the workflow to fail in a few specific cases (certain lookup fields will not accept this and will automatically
    cancel).  I only found this out when recreating your workflow on a similar, but much more complex list set.  
    To resolve this issue, I used another utility action (Extract Substring from Index of List) to clear out the whitespace.  I configured it as "Copy from
    Variable: Countries, starting at
    1 (Output to Variable: Countries), which takes care of this issue in those few cases.
    Otherwise, WOW!  AWESOME JOB!  Thanks!  :)

  • I am trying to email pictures from my ipad to my email address on my computer and I have been going along nice but now I get a message that says "cannot send mail the message was rejected by the server"  can't see to figure out why it stopped sending now.

    I have been emailing pictures from my ipad to my computer and have been going along nicely and now when I went to send 5 pictures to my computer from my ipad I am getting a message that says " cannot send mail The message was rejected by the server"  cannot understand why this is happening and have not been able to fix.  Now when I try to send pictues even to another email address I am getting the same message.
    Help.

    Email may not be the best way to move pictures.
    There are lots of ways of moving files.
    A simple and popular way to copy files and share files among your devices.
    https://www.dropbox.com/
    "Box lets you store all of your content online, so you can access, manage and share it from anywhere. Integrate Box with Google Apps and Salesforce and access Box on mobile devices" Rated the most secure cloud storage by SkyHigh Networks.
    https://www.box.com/
    Using iTunes to transfer files:
    http://support.apple.com/kb/HT4094?viewlocale=en_US&locale=en_US
    Files Connect -- "Cloud Storage services like Dropbox, MobileMe iDisk, Google Docs/Picasa, Facebook photos, FTP, SFTP, WebDAV ... AFS (Apple File Shares) SMB (Windows shares)  protocols"
    https://itunes.apple.com/us/app/files-connect/id404324302?mt=8
    Windows File server
    http://itunes.apple.com/us/app/filebrowser-access-files-on/id364738545?mt=8
    "The kiteworks mobile file sharing solution provides secure creation, viewing, and sharing of enterprise content on smartphones and tablets while providing IT and security teams the administrative controls to manage user privileges and access rights necessary to ensure enterprise security and compliance."  " Includes choice of private cloud on-premise."
    http://www.accellion.com/solutions/mobile-enablement/mobile-file-sharing
    "Dukto is a simple application that allows you to share files between devices connected to the same (wireless) LAN network."
    http://www.tidal.it/?page_id=309&lang=en
    http://www.msec.it/blog/?page_id=11

  • Delete everything in Sharepoint 2013 and start from a begining

    How do you delete all the settings, databases in Sharepoint 2013 and start from a begining.
    We have some problems that PictureURL is wrong and some other thing ain't working right. Because Sharepoint 2013 is in our test environment we would like to delete all settings, databases including PictureURL info, which I don't know which SQL database holds
    that information?
    bostjanc

    The pictureURL parameter is either going to be in the specific site collection in the User Information List, or it is going to be in the User Profile Synchronization Service Application, which is what syncs over to the User Information List. You will need
    to identify exactly what you are trying to clear out. If you are not using User Profile Synchronization in your test environment then the following will help you find and delete the appropriate Site Collection or content database.
    Any content is going to be Site Collection specific, so if you are setting the pictureURL for a user in http://portal.domain.com/sites/somesitecollection then that Site Collection will be in a specific database which may also contain other Site Collections.
    To find out which database a Site Collection is in go to Central Administration -> Application Management -> Site Collections -> View All Site Collections. Here you can find the Site Collection you are browsing to. When you select it you will see
    what content database it is in. You can also just delete the Site Collection here without the need to delete the entire content database. Instead of clicking View All Site Collections in the steps above click Delete a Site Collection. That is probably the
    better route to go.
    If you are using the User Profile Synchronization and this is where the picture URL is set then you will want to go to Central Administration -> Application Management -> Service Applications -> Manage Service Applications -> Click your User
    Profile Service App and then view the user profiles. Find the user you want to remove the pictureURL for and edit that user profile to remove the picture.
    Hope that helps!
    -Corey

  • Since upgrade to iOS 7 Email error on over 100KB emails "Cannot Send Mail  The message was rejected by the server because it is too large." Connecting to Exchange via Activesync

    Hi,
    Following the upgrade to iOS 7.0.3 on all our iPhone and iPad devices, it has been identified that when sending emails around 100KB in size and over an error message appears on the device stating “Cannot Send Mail  The message was rejected by the server because it is too large.” See error message below. The send/receive limit is over 10MB so this is not the issue.
    We are in an Exchange Environment using Microsoft Activesync. This issue is not evident in iOS 6. This has been tested on an iPhone 3GS running version iOS 6.1.3. We have been unable to repeat the issues seen on iOS 7 on the older OS. It is not possible to roll back to the older operating system as Apple are no longer signing the software.
    We use Microsoft Active Sync to connect to our Exchange servers through a TMG. The issue is very inconsistent, some identical emails go through, some fail. This is not an issue with the send/receive limit as this is over 10MB. The error message when it fails on the TMG is Status: 413 Request Entity Too Large, which we believe is from IIS on the CAS server.
    Does anyone have any suggest course of actions to take?
    Many Thanks

    This resolution have to attend at the server not with the ios device. My employer's mail administrator reject me to correct it from the server. As his concern is, if ither ios devices works why don't mine? So I am helpless than changing my iphone. It works fine for early versions of ios and with androids. And also one of my friends iphone4 with ios 7 (similar as mine) works too. So I guess it's something wrong with my iPhones settings. But basic question I cannot understand is it works in my phone before this ios7 upgrading. And currently working with my yahoo account too. Favourable reply expected.

  • My Mail program has gone south on Leopard on my 27-month old Macbook. I can't send, even though the server details are correct. I tried reinstalling from the install DVD - but no go: no longer compatible, evidently.. What to do?

    My Mail program has gone south on Leopard on my 27-month old Macbook. I can't send, even though the server details are correct. I tried reinstalling the Mail program from the install DVD, but no go; apparently that two-year old Mail is no longer compatible with my up-to-date Leopard. I tried deleting the account (hotmail) from Mail and setting up a different account (Yahoo). After loading all the inbox two things happened: first, I still couldn't send, and second, when I closed the Mail window the whole inbox then disappeared and doesn't come back. Although I couldn't reinstall the Mail program from the install DVD, would it still be possible to reinstall the whole system from that DVD? If I do, will I lose files or will there be another problem since that DVD is now over two years old?
    Thanks for any suggestions; they will be much appreciated.
    P.S. I've just noticed that now I can't change the desktop picture: I go through the motions in Preferences, but the new picture doesn't appear on the desktop. Is there a systemic problem?

    You are waiting for an apology to something that happened over a year ago? Really? This is why there is a manager in the store. You have a problem with an employee you speak to the manager. Just like you did on the phone. You would have gotten your apology in July 2013.
    Here is the information about your upgrade fee.
    Upgrade Fee
    It is because when you have a problem you (customers) go running to the store and want to take up the time of the reps to fix it. Other carriers have third parties that deal with technical support and those locations are few and far between. VZW provides this directly through their stores. Also, when you subsidize a $650 and pay $200 VZW has to pay $400. Your monthly service fee doesn't begin to scratch the surface of paying that back. Not with all the money that is put into the network and its improvements.
    Then over a year later you get someone on the phone who apologized and offered to waive the fee on your phone and you didn't take it? That offer won't come down the pike again.
    One thing you should know is that all these employees are people and as such they sometimes come off cross. I doubt that you speak to everyone so sweetly all the time. Cut them a little slack and put this whole thing behind you after 15 months. Either upgrade with VZW or move on.

  • I have suddenly got the following message An (SMTP) error occurred while sending mail. The server responded: Requested action aborted: This mail account has se

    Having been on Thunderbird for some years I have suddenly got the following message when trying to send mail.
    An (SMTP) error occurred while sending mail. The server responded: Requested action aborted: This mail account has sent too many messages in a short amount of time. Please try later..
    I have checked the SMTP server settings in tools, account settings and they are as they have always been. Is there something I have missed?

    Sending through web mail is totally irrelevant to using an SMTP server. The message even says it is from the server. Why do you think this is a Thunderbird problem.
    The provider has put in place measures to keep people from spamming other email recipients using thier SMTP server. You have seen the result of those measures.

  • Cannot send email from my iPhone or iPad. The server rejects a recepient for no apparent reason.  The recipient is not new.  This issue happens on reply or reply to all or froward; not a new email. What is happening?

    Cannot send email from my iPhone or iPad. The server rejects a recepient for no apparent reason.  The recipient is not new.  This issue happens on reply or reply to all or froward; not a new email to the same recepient. What is happening?

    I talked with a tech today and he said I cloud is having problems which should be resolved shortly.
    In the mean time I used the .me smtp server settings which allowed me to send mail.

  • FF will not load PDFs on my MacBook Pro. I get a message sending me to the Apple Quicktime plugin download site but not told which one I need if any. I need to be able to download PDFs.

    I upgraded to FF4 and have not been able to download a single PDF file. I get a message sending me to the Apple Quicktime site for additional plug ins but no information on what I am to upload. Next time it happens I will copy the exact statement. This is very frustrating as I need to be able to download PDFs to get some required files.

    Jlmeraz wrote:
    my pc I used adobe acrobat pro
    So keeping using Adobe Acrobat Pro. Check this feature table
    <http://www.adobe.com/products/acrobatpro/buying-guide.html>
    If the features you need are not marked "Microsoft® Windows® only", then they will be available in the Mac OS X version of Acrobat Pro.
    it does not let me print only certain pages of a file
    Nonsense. First, what pages are printed does not depend on the printer driver, but on the application. The driver prints whatever the application sends to it. Second, Mac OS X's bundled PDF viewer, Preview (there are others) even has a dedicated command for this function -- File > Print Selected Pages…, or ⌥⌘P.

  • Proc_getObject with nolock causes "read operation on a large object failed while sending data to the client"

    SharePoint 2013 code for the SharePoint Config database stored procedure dbo.proc_getObject has been changed from SharePoint 2010 with the difference of select with nolock.
    I am seeing numerous Error 7886, Severity-20 errors nightly:
    "A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated."
    Here I have commented out "with (nolock)" to 'fix' the error and to align the store proc with SharePoint 2010 code : 
    ALTER PROCEDURE [dbo].[proc_getObject]
    @Id uniqueidentifier,
    @RequestGuid uniqueidentifier = NULL OUTPUT
    AS
    SET NOCOUNT ON
    SELECT
    Id,
    ParentId,
    ClassId,
    Name,
    Status,
    Version,
    Properties
    FROM
    Objects --with (nolock)
    WHERE
    Id = @Id
    RETURN 0
    How is this stored procedure called and for what use?
    Why did Microsoft make this change to SharePoint 2013 - some performance gain through dirty reads at the cost of stability? Or what could be a reason for this to happen that can be fixed?

    GetObject retrieves any farm object that is selected (by ID). Changing this is obviously not supported, and NoLock was used to (help) prevent locks when performing a select query.
    I've never seen this issue, and would guess it is unique to your environment given this is such a core piece of the SharePoint infrastructure.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Object can't be send over to the server.

    Hi to everyone,
    I'm doing a connection between client and server. The client will send image from the platform to the server. The server will then create an folder in the server-side to store the images.
    Thank you for reading. Hope to hear from you soon. Anytime you need clarifation, you could ask. I'll be more willingly to feel you in in more details.
    IMclient.java -- file
    import java.awt.geom.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    // ========================== START OF IMAGECLIENT ===========================
    public class IMclient extends JFrame implements ActionListener,ChangeListener
    private JMenuBar mainMenu;
    private JMenuItem open, save, exit, scale;
    private JMenu fileMenu, editMenu;
    private JPanel mainPane, butPane;
    private JFileChooser imagesFile;
    private JButton butSend;
    private JLabel imageLabel; //A display area for a short text string or an image, or both
    JPanel imagePanel;
    JLabel imgPanel = new JLabel();
    BufferedImage buffImage=null;
    BufferedImage bimage;
    ImageStorage dImage=null;
    // JSlider variable
    final int MIN = 0;
    final int MAX = 255;
    final int INIT = MAX/2;
    JSlider redSlider, greenSlider, blueSlider;
    // BufferedImage bimage;
    int r,g,b;
    int w,h;
    int pixels[];
    Image img;
    String fname= "babymin05.gif";
    // Declare all the Input/Output object variables.
    Socket toHost = null;
    //PrintWriter out = null;
    ObjectInputStream in = null;
    ObjectOutputStream objectOut = null;
    Container cpane;
    // ================================ Constructor ===============================
    public IMclient(String host, int port){
    initGUI();
    initSocket(host, port);
    dImage = new ImageStorage(fname);
    updateImage();
    public void updateImage()
    buffImage = dImage.getImage(); //return buffered image
    // img = (Image)bimage; //cast buffered image as images
    displayImage(buffImage); //display the images
    //added from rgbslider
    //JSlider RedSlider,BlueSlider,GreenSlider;
    public void displayImage(BufferedImage buffImage)
    //to create and display an image
    //BufferedImage bimage = rgb.getColor();
    ImageIcon icon = new ImageIcon(buffImage);
    System.out.println(icon);
    imgPanel.setIcon(icon);//to set image visible
    imgPanel.repaint();
    public void stateChanged(ChangeEvent e)
    //return buffered image from ImageStorage class.
    bimage = getColor();
    // displayImage(bimage);
    public BufferedImage getColor()
    //to get the array of pixels of the buffered image
    pixels = new int[dImage.getWidth()*dImage.getHeight()];
    //return the pixels value of bufferedImage
    pixels = dImage.getPixelsArray();
    int [] rgb = new int[3];
    int pix=0;
    for (int i=0 ; i<pixels.length ; i++)
    //to get the r,g,b value from the array
    rgb = dImage.getRGB(pixels);
    r = redSlider.getValue();
    g = greenSlider.getValue();
    b = blueSlider.getValue();
    //to set the pixels to the final value
    pixels = dImage.setRGB(r,g,b);
    dImage.setPixels(pixels);
    //to set the pixels array value and the RGB value
    dImage.setImage(pixels);
    bimage = dImage.getImage();
    //to return the buffered image
    return bimage;
    public JPanel sliderGUI()
    JPanel slidePanel = new JPanel();
    slidePanel.setLayout(new GridLayout(3,2));
    setSlider();
    JLabel redLabel = new JLabel("Red");
    JLabel blueLabel = new JLabel("Blue");
    JLabel greenLabel = new JLabel("Green");
    slidePanel.add(redLabel);
    slidePanel.add(redSlider);
    slidePanel.add(blueLabel);
    slidePanel.add(blueSlider);
    slidePanel.add(greenLabel);
    slidePanel.add(greenSlider);
    return slidePanel;
    // setSlider() consists of the three silders (r,g and b).
    private void setSlider(){
    blueSlider = new JSlider(JSlider.HORIZONTAL, MIN, MAX, INIT);
    blueSlider.setMajorTickSpacing(MAX);
    blueSlider.setMinorTickSpacing(MIN);
    blueSlider.setPaintLabels(true);
    redSlider = new JSlider(JSlider.HORIZONTAL, MIN, MAX, INIT);
    redSlider.setMajorTickSpacing(MAX);
    redSlider.setMinorTickSpacing(MIN);
    redSlider.setPaintLabels(true);
    greenSlider = new JSlider(JSlider.HORIZONTAL, MIN, MAX, INIT);
    greenSlider.setMajorTickSpacing(MAX);
    greenSlider.setMinorTickSpacing(MIN);
    greenSlider.setPaintLabels(true);
    blueSlider.addChangeListener(this);
    redSlider.addChangeListener(this);
    greenSlider.addChangeListener(this);
    public BufferedImage getBufferedImage()
    return bimage;
    // ================================ initGUI() =================================
    public void initGUI()
    cpane = getContentPane();
    cpane.setBackground(Color.white);
    cpane.setLayout(null);
    //to set the close menu on the menubar
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    //Open the menu in order to img from any folder
    imagesFile = new JFileChooser();
    imagesFile.addActionListener(this);
    //create an intermedia panel to hold panel and button
    mainMenu = new JMenuBar();
    setJMenuBar(mainMenu);
    setContentPane(cpane);
    fileMenu = new JMenu("File");
    mainMenu.add(fileMenu);
    editMenu = new JMenu("Features");
    mainMenu.add(editMenu);
    /* == JMenuItem(open, save, exit) to be added into the JMenu(fileMenu) == */
    open = new JMenuItem("Open...");
    save = new JMenuItem("Save...");
    exit = new JMenuItem("Exit...");
    scale = new JMenuItem("Scale");
    fileMenu.add(open);
    fileMenu.add(save);
    fileMenu.add(exit);
    editMenu.add(scale);
    /* =================== End of adding JMenuItem() ======================== */
    //add events to the JMenuItem(open, save, exit)
    open.addActionListener(this);
    save.addActionListener(this);
    exit.addActionListener(this);
    scale.addActionListener(this);
    /* =============== Create a button =======================*/
    butSend = new JButton("Send");
    butSend.addActionListener(this);
    JPanel butPane = new JPanel();
    butPane.setLayout(new BorderLayout());
    butPane.add(butSend);
    /* =============== End Create button =======================*/
    /* =============== Create a Image Panel =======================*/
    imgPanel = new JLabel();
    imagePanel= new JPanel(new BorderLayout());
    //imgPanel.setBorder(BorderFactory.createRaisedBevelBorder());
    imagePanel.setBorder(BorderFactory.createRaisedBevelBorder());
    //imageLabel = new JLabel();
    imagePanel.add(imgPanel);
    /* =============== End of Image Panel =======================*/
    // creates a new Panel
    JPanel rgb=sliderGUI();
    cpane.add(rgb);
    cpane.add(imagePanel);
    cpane.add(butPane);
    Insets insets = cpane.getInsets();
    imagePanel.setBounds(50 + insets.left, 20 + insets.top, 300, 236);
    butPane.setBounds(400 + insets.left, 220 + insets.top, 90, 40);
    rgb.setBounds(50 + insets.left, 300 + insets.top, 400, 250);
    //to set the size of the frame
    setSize(1024,768);
    //to set the main pane visible to the user
    setVisible(true);
    // =========================== actionPerformed() ==============================
    public void actionPerformed(ActionEvent e)
    if(e.getSource()==(open))
    imagesFile.showOpenDialog(this); //to have the OPEN dialog box
    if(e.getSource() == imagesFile)
    //to get the file from the exact folder that the user clicks on
    fname = imagesFile.getSelectedFile().getAbsolutePath();
    updateImage();
    if(e.getSource() == (exit))
    System.exit(0); //exit the program
    if(e.getSource() == butSend)
    sendImage(img);
    /* ========================== initSocket ================================
    * Set up the socket connection to the server.
    * 1: connect to the server at <host>, <port>.
    * 2: getOutputStream() will return an output stream for our socket (ie
    the stream is FROM the client TO the server. Since we want to send
    Image objects to the server, we need to create a stream which can
    send object, ie. an ObjectInputStream.
    3: getInputStream will return an input stream for our socket (ie. stream
    is FROM the server TO the client. We use this to create a stream that
    can transmit formatted characters.
    protected void initSocket(String host, int port)
    try{
    toHost = new Socket(host, port); //1
    //always do OUT then do IN
    objectOut = new ObjectOutputStream(toHost.getOutputStream()); //2
    in = new ObjectInputStream(toHost.getInputStream()); //3
    sendObject(bimage);//here got problem ba
    Object input = null;
    try{
    while((input = in.readObject()) != null) //test whether object is null
    Image img = (Image)input;
    sendImage(img);
    }catch (Exception e){}
    toHost.close();
    catch (UnknownHostException e)
    System.err.println("Unknown host in initSocket()");
    catch (IOException e)
    System.err.println("IO error in initSocket()");
    /* =========================== sendObject() ==============================
    * objectOut is the ObjectOutputStream. To send an object across the stream,
    * use the writeObject() method of ObjectOutputStream. The flush() method
    * ensures that data is sent.
    protected void sendObject(Object obj)
    try{
    objectOut.writeObject(obj);
    objectOut.flush();
    }catch(IOException e){
    System.out.println("Sending failed");
    System.exit(1);
    /* =========================== sendImage() ==============================
    * sendImage() creates the requested Image Object, then calls sendObject() to
    * send the image's width, height, and raw data to the server. The server uses
    * these to reconstruct the image, we could use the ImageIO class to read the
    * image file.
    * The getImage() method return immediately, even if the image data has been
    * fully loaded. Once the data is locked, the width and height, values using the
    * getWIdth() and getHeight() methods.
    protected void sendImage(Image img)
    int w,h;
    //get the image from the imagePanel and return the buffered image
    img = dImage.getImage();
    while ((w = img.getWidth(null)) == -1){}
    //System.out.println("Width of image: "+ w);
    while ((h = img.getHeight(null)) == -1){}
    int[] buffer = new int[w * h];
    /* The PixelGrabber class implements an ImageConsumer which can be
    * attached to an Image or ImageProducer object to retrieve a subset
    * of the pixels in that image.
    PixelGrabber px = new PixelGrabber (img,0,0,w,h,buffer,0,w);
    try{
    px.grabPixels();
    }catch (InterruptedException ie){
    System.err.println("Pixels grab failed");
    sendObject(new Integer(w));
    sendObject(new Integer(h));
    sendObject(buffer); //buffer contains all the bytes for the image
    public static void main(String [] args)
    if(args.length != 2)
    System.err.println("Requirement Paramenters: <host>,<port number>");
    System.exit(0);
    String host = args[0];
    int port = Integer.parseInt(args[1]);
    IMclient is = new IMclient(host,port);
    IMserver.java-- file
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class IMserver
    Image images;
    public IMserver()
    try
    start();
    }catch (IOException ioe){
    System.err.println("Start Failed:"+ioe);
    private void start() throws IOException
    ServerSocket ss = new ServerSocket(22222);
    while(true)
    new ImageServerConnection(ss.accept(), images).start();
    public static void main(String[] args)
    IMserver im = new IMserver();
    class ImageServerConnection extends Thread
    //Declare the Input/Output object variable
    Socket clientSocket = null;
    ObjectOutputStream objectOut = null;
    ObjectInputStream inObject = null;
    Image img;
    /* ====================== ImageServerConnection ================================
    *ImageSeverConnection is a subclass of Thread. ImageServerConnection handles a
    * connection with a client. It has methods for initialzing a connection and for
    * receieving objects to clients.
    public ImageServerConnection(Socket client, Image img)
    clientSocket = client;
    this.img = img;
    /* ========================= run() ===========================
    * run() is overrriden from Thread. In this case, we call the
    * newSocket method to initialize the socket and perform initial
    * tasks.
    public void run()
    try{
    newSocket();
    }catch(IOException ioe){
    System.err.println("Socket failed: " + ioe);
    /* ========================= newSocket() ===========================
    * This is where we do all the client connection work
    private void newSocket() throws IOException
    inObject = new ObjectInputStream(clientSocket.getInputStream());
    //objectOut = new ObjectOutputStream(clientSocket.getOutputStream());
    getImage();
    clientSocket.close();
    /* =============================== getImage() =================================
    * getImage() assumes that a connection already exists to the server.
    * First, getImage transmits the image we want to get.
    * Then, we wait to read the 3 objects sent by the server's ObjectOutputStream:
    -- an Integer object, representing the width of the image
    -- an Imteger object, representing the height of the image
    -- an Image object
    * The first two are Integer objects, NOT primitive int types. This
    * is because the ObjectOutputStream can only transmit objects, not primitive
    * types (to transmit primitive types, use a DataOutputStream).
    * 1: Read the three objects sent by the server. Note each object must be cast to
    its appropriate type, since readObject() returns an Object. To get the value
    of an Integer object, we use its intValue() method, which returns the primitve
    int value of the Integer.
    * 2: The buffer object is an array of integers, which represents the image
    data. In other words, buffer is an array of integers in memory which is
    the source of the raw image data. Java has a special MemoryImageSource
    class which is used to construct Images from raw data in memory. So, in
    step 3, we create a MemoryImageSource object using the width, height, and
    buffer objects.
    * 3: We want to create an Image object using the MemoryImageSource object we
    created in step 3. To do this, we use the createImage() method of the
    Component class. Since this client class extends Frame, and Frame is a
    subclass of Component, we can call createImage() directly.
    * 4: Once the Image is created, it will be passed into the folder for storage
    private void getImage()
    Component c=null;
    try{
    objectOut.writeObject(img);
    objectOut.flush();
    int w = ((Integer)inObject.readObject()).intValue();
    int h = ((Integer)inObject.readObject()).intValue();//1
    int [] buffer = (int[])inObject.readObject(); //2
    Image img = c.createImage(new MemoryImageSource(w, h, buffer, 0, w)); //3
    //create an new folder to store those sent images
    File f = new File ("C:\\Sweet_Memory");
    //you can also check whether such folder exists or not.
    if (!f.exists ()){
    f.mkdir ();
    //how to store image into the file????
    }catch(Exception e){
    System.out.println("Server-side: "+ img);
    System.err.println("Receiving failed: "+ e);
    }

    The codes below have error message showing "IO error in initSocket() " which is in the initSocket method and "Sending failed" which is in sendObject method. HOwever i can't figure out why this error message is shown. Can anyone kindly help me out? Did i declare the wrong thing?
    Please clarify with me if i'm not clear, thank a lot. Any help will be appreaciated.
    IMclient.java
    public class IMclient extends JFrame implements ActionListener,ChangeListener
         // Declare all the Input/Output object variables.
        Socket toHost = null;
        ObjectInputStream in = null;
        ObjectOutputStream objectOut = null;
        public void actionPerformed(ActionEvent e)
          if(e.getSource() == butSend)
                sendImage(img);
        protected void initSocket(String host, int port)
            try{
         toHost = new Socket(host, port); //1
         //always do OUT then do IN
         objectOut = new ObjectOutputStream(toHost.getOutputStream()); //2
         in = new ObjectInputStream(toHost.getInputStream()); //3
         sendObject(bimage);
          Object input = null;
          try{
          while((input = in.readObject()) != null) //test whether object is null
                    Image img = (Image)input;
                   sendImage(img);
                  }catch (Exception e){}
         toHost.close();
                  catch (UnknownHostException e)
         System.err.println("Unknown host in initSocket()");
                  catch (IOException e)
         System.err.println("IO error in initSocket()");
    protected void sendObject(Object obj)
             try{
         objectOut.writeObject(obj);
         objectOut.flush();
             }catch(IOException e){
         System.out.println("Sending failed");
                         System.exit(1);
    protected void sendImage(Image img)
             int w,h;
             //get the image from the imagePanel and return the buffered image
             img = dImage.getImage();
              while ((w = img.getWidth(null)) == -1){}
              while ((h = img.getHeight(null)) == -1){}
              int[] buffer = new int[w * h];
               PixelGrabber px = new PixelGrabber (img,0,0,w,h,buffer,0,w);
               try{
                     px.grabPixels();
                }catch (InterruptedException ie){
                      System.err.println("Pixels grab failed");
                sendObject(new Integer(w));
                sendObject(new Integer(h));
                sendObject(buffer); //buffer contains all the bytes for the image
    public static void main(String [] args)
                if(args.length != 2)
                   System.err.println("Requirement Paramenters: <host>,<port number>");
                  System.exit(0);
                String host = args[0];
                int port = Integer.parseInt(args[1]);
                IMclient is = new IMclient(host,port);
    IMserver.java
    public class IMserver
         Image images;
         public IMserver()
               try
         start();
               }catch (IOException ioe){
         System.err.println("Start Failed:"+ioe);
          private void start() throws IOException
                  ServerSocket ss = new ServerSocket(22222);
                  while(true)
         new ImageServerConnection(ss.accept(), images).start();
           public static void main(String[] args)
         IMserver im = new IMserver();
    class ImageServerConnection extends Thread
             //Declare the Input/Output object variable
            Socket clientSocket = null;
            ObjectOutputStream objectOut = null;
            ObjectInputStream inObject = null;
             Image img;
             public ImageServerConnection(Socket client, Image img)
         clientSocket = client;
         this.img = img;
             public void run()
         try{
                newSocket();
         }catch(IOException ioe){
             System.err.println("Socket failed: " + ioe);
              private void newSocket() throws IOException
                     inObject = new ObjectInputStream(clientSocket.getInputStream());
                     getImage();
                      clientSocket.close();
               private void getImage()
                        Component c=null;
         try{
                  objectOut.writeObject(img);
                   objectOut.flush();
                     int w = ((Integer)inObject.readObject()).intValue();
                     int h = ((Integer)inObject.readObject()).intValue();//1
                     int [] buffer = (int[])inObject.readObject(); //2
                     Image img = c.createImage(new MemoryImageSource(w, h, buffer, 0, w)); //3
         }catch(Exception e){
                                System.err.println("Receiving failed: "+ e);
    }

  • Can I close the connection after sending immediately on the server?

    I have a C/S program. On the server side, the process as following:
    1. accept (blocking)
    2. //a connection is established
    using a new socket to receive request data from client
    3. business processing ... (maybe several seconds)
    4. send response data to client
    5. close socket immediately
    6. listening continuely again
    The server side is running on linux and writed by Java, and client is running on windows and writed by C++ Builder.
    My problem is:
    1. if the server is running on windows, everything is OK.
    2. if the server is running on linux (that is exprcted), the client can not receive the response data from server, the client program said the connection is unavailable when he read from socket blockingly.
    3. if I add some delay, e.g. 500ms, between sending response and close the connection, the client can receive response normally.
    why above?
    thanks for help.
    Jack

    Sorry, long time to go away.
    package test.server;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class EchoServer {
         private int port; // listened port
         private ServerSocket ssock; // the server's ip
         public EchoServer(String host, int port) {
              this.port = port;
              // Create a ServerSocket
              try {
                   ssock = new ServerSocket(port);
                   SocketAddress addr = new InetSocketAddress(host, port);
                   ssock.bind(addr);
              } catch (Exception ex) {
                   ex.printStackTrace();
              new HandleThread().start();
         public class HandleThread extends Thread {
              public int ntohl(byte[] bytes, int offset) {
                   int length1 = ((((int) bytes[offset + 0]) << 24) & 0xff000000);
                   int length2 = ((((int) bytes[offset + 1]) << 16) & 0x00ff0000);
                   int length3 = ((((int) bytes[offset + 2]) << 8) & 0x0000ff00);
                   int length4 = ((((int) bytes[offset + 3]) << 0) & 0x000000ff);
                   return length1 + length2 + length3 + length4;
              public void run() {
                   InputStream in = null;
                   OutputStream out = null;
                   try {
                        while (true) {
                             System.out.println("Start Listening...  [" + port + "]");
                             Socket clisock = ssock.accept();
                             //clisock.setSoLinger(true, 1);
                             System.out.println( "SOLinger:" + clisock.getSoLinger());
                             try {
                                  System.out.println("Accepted Client Socket...  [" + clisock + "]");
                                  in = clisock.getInputStream();
                                  out = clisock.getOutputStream();
                                  // receive four bytes length
                                  byte[] lenbuff = new byte[4];
                                  in.read(lenbuff, 0, 4);
                                  int len = ntohl(lenbuff, 0);
                                  byte[] buff = new byte[len];
                                  in.read(buff, 0, len);
                                  System.out.println("Received length&#65306;" + len + "  " + new String(buff));
                                  Thread.sleep(1000);
                                  out.write(lenbuff);
                                  out.write(buff);
                                  out.flush();
                                  //Thread.sleep(500);
                                  System.out.println("Send finished&#12290;");
                             } catch (Exception ex) {
                                  ex.printStackTrace();
                             } finally {
                                  if (in != null) {
                                       try {
                                            in.close();
                                       } catch (Exception ex) {
                                  if (out != null) {
                                       try {
                                            out.close();
                                       } catch (Exception ex) {
                                  if (clisock != null) {
                                       try {
                                            long time00 = System.currentTimeMillis();
                                            clisock.close();
                                            System.out.println( "close socket&#65306;[" + (System.currentTimeMillis() - time00) + "]");
                                       } catch (Exception ex) {
                   } catch (Exception ex) {
                        ex.printStackTrace();
         public static void main(String[] args) throws Exception {
              if( args.length == 2 ) {
                   new EchoServer(args[0], Integer.parseInt(args[1]));
              } else if( args.length == 2 ) {
                   new EchoServer("127.0.0.1", Integer.parseInt(args[0]));
              } else {
                   new EchoServer("127.0.0.1", 16000);
    }In my application, the package is following:
    length(4bytes) + data
    I have a simple WinSocket Client, send data to this server and receive the response,the sending is OK, Server can receive all messages.But when client is ready to receive data, the winsock call return WSAECONNRESET(10054).
    If I uncomment "Thread.sleep(500);", it means wait some time before close socket, the client can receive all response data.
    why?

  • The message was rejected by the server

    My hotmail account gives the message was rejected by the server, even when I send a new one just testing the account.
    After that, I receive an email from Outlook.com asking me to sign in to Outlook and verify my account.
    Please help with this?
    I have the latest version of iOS 7, with iPhone 5.
    Thanks!

    Have a read at this thread https://discussions.apple.com/message/16741595#16741595

Maybe you are looking for