HT1819 'Byte-Range' request error, but no problems using Advanced menu

On Windows Vista PC, latest iTunes update:
No trouble subscribing to podcast feed using Advanced menu. iTunes will even update/load new episodes, but I receive 'byte-range' request error when submitting podcast feed to the directory.
Is it normal to be able to use the advanced menu option, but not be able to submit the same feed to the podcast directory?
PS: No trouble subscribing to same feed with Banshee media player using ubuntu Natty Narwhal. All podcast artwork and information intact.

I'm afraid you've fallen over a requirement that Apple has recently introduced. The iPhone plays podcasts by using 'byte-range requests', which means calling for part of the file at a time rather than the whole thing. Unfortunately some servers don't support this, and there were an increasing number of complaints that podcasts which worked elsewhwere weren't working on an iPhone.
So Apple are now making the ability to handle this a condition of submission. Evidently your server doesn't support this, so all you can do is to ask them whether they can implement it. If not, you will have to find another hosting service - ask about this before committing yourself, and if they say no, or don't know what it is, find another host.

Similar Messages

  • Unable to submit podcast due "Enable byte range requests" error

    Hi, I'm trying to submit a podcast feed but the "enable byte range requests" error shows, I'm in the full control of the server so I've tested from another server and the header seems to be correct:
    HTTP/1.1 206 Partial Content
    Date: Mon, 22 Apr 2013 18:40:58 GMT
    Server: Apache/2.2.15 (CentOS)
    Last-Modified: Tue, 02 Oct 2012 20:59:21 GMT
    ETag: "e0adb-546b70-4cb19cbd1fc40"
    Accept-Ranges: bytes
    Content-Length: 101
    Content-Range: bytes 200-300/5532528
    Connection: close
    Any ideas why iTuns keeps showing me that error?
    Thanks in advance

    To anyone who may be interested:
    Now iTunes accepted my podcast submition, the previous feed had near 100 chapters, so I deleted most of them keeping just 4 chapters.

  • Byte-Range Requests error

    I keep on getting the the error that my server does not support byte-range requests. I cant seem to find the problem and I think that I am hitting the ceiling of my knowledge of configuring Apache.
    here is my feed location http://feeds.feedburner.com/REDPOINTPodcast
    I am running Apache2 on Ubuntu 11:10

    Backing up what Roger is saying - Apple has publicly stated you must be on a byte-range supported server.
    http://www.apple.com/itunes/podcasts/specs.html
    Item 2 below is from Apple.
    Submission and Feedback Processes
    Podcasting on iTunes requires several steps:
    Creating your first episode, which can be an audio recording, video, or even a text document. Supported file formats include .m4a, .mp3, .mov, .mp4, .m4v, .pdf and .epub.
    Posting your episode file(s) on a server with byte-range support enabled and a publicly accessible URL. Byte-range support allows users to stream your episodes.
    Creating an RSS feed (an XML file) that:
    conforms to the RSS 2.0 specification
    includes the recommended iTunes RSS tags,
    contains pointers to your episode.
    Posting the RSS file on a server.
    Submit the URL for your RSS feed to iTunes.
    Regards,
    Rob Walch
    libsyn

  • TS1424 error when submitting a podcast rss: byte-range requests

    Hi when I submit rss feeds now I'm getting an error message that we need to enable byte-range requests.
    I saw this article:
    http://theaudacitytopodcast.com/itunes-changes-podcast-specs-and-features/
    saying that " iTunes now requires all hosting servers to enable Byte Range Requests"
    my podcast mp3 is hosted in CDN that, as I've checked, supports range requests.
    but my rss feed contains urls that first return a redirect, to the real url (where range requests are supported)
    could this be a problem? are redirects on episode urls supported (they were until now)? should I modify the redirect response somehow to indicate that range requests are supported on the target server (I thought that shouldn't be necessary)?
    take this as a feed example: http://www.blogtalkradio.com/djsqwyd.rss
    Thanks in advance,

    URL:
    https://www.seven-thoughts.com/rss/rss.xml

  • Error message when uploading: my server does not support byte-range requests

    Hi I am trying to get a pocast up on itunes - I am first just sending a test mp3 - ebenezer.bruceclark.eu/podcast.xml. I have validated the xml keeping it to a minimum and constantly get the message saying my server does not support byte-range requests. Once I got some meassage about "White spaces are required between publicId and systemId". It all seems so random I am using Drupal 7 cms with views_rss module + itunes elements. It's been my 3rd night into the early morning and I need to sort this out for my client.
    Thanks to anyone who can help
    Bruce

    Your feed does not contain an 'enclosure tag' which would contain the URL of your mp3 file, so at the moment it basically has no content and would be of no use to iTunes. You may find it helpful to read this page which gives you basic information on making a podcast:
    http://rfwilmut.net/pc
    Note that when you do get it working and submitting, the iTunes Store won't accept a podcast which is merely a technical test: they need to see at least one proper episode so that they can check that your podcast does not contain unsuitable material.

  • Byte Range Requests

    Hi,
    Any help on this topic would be much appreciated.
    The following feed was recently working on iTunes, but seems to have stopped working.
    http://www.backpagelead.com.au/podcasts?format=feed&type=rss
    I understand the issue with byte-range requests and am trying to get an answer from a hosting company.
    In the meantime, is there anything in particular in my RSS feed that I should look out for that could be causing a problem?
    Cheers,
    Brendan

    The page you link to shows the link as text rather than a link:
    The Geoffery Podcast Episode 13: The One With The Balance Pt. II: The Sequel of the Sexes.
    <a href=”http://dl.dropbox.com/u/63074747/the%20geoffery%20podcast%2013.mp3”></a> 
    Lissa, Bre and Dexter made a podcast
    This link therefore doesn't work, though the one on the word 'podcast' does and the file plays OK. Your feed still has no 'enclosure' tags in it so no media files will appear in iTunes. This is something you will have to sort out with Tumblr: there will be a way of making it work since other people have Tumblr based podcasts.

  • Does anyone know how to enable byte-range requests on Mac OS X Server 10.5?

    I need to be able to host my podcast episodes on the server and iTunes is giving me the error that my episodes are on a server that does not support byte-rnage requests when I try to submnit the podcast feed the iTunes directory. Any help is greatly appreciated! Thanks

    I'm afraid you've fallen over a requirement that Apple has recently introduced. The iPhone plays podcasts by using 'byte-range requests', which means calling for part of the file at a time rather than the whole thing. Unfortunately some servers don't support this, and there were an increasing number of complaints that podcasts which worked elsewhwere weren't working on an iPhone.
    So Apple are now making the ability to handle this a condition of submission. Evidently your server doesn't support this, so all you can do is to ask them whether they can implement it. If not, you will have to find another hosting service - ask about this before committing yourself, and if they say no, or don't know what it is, find another host. Note that if, as some people do, you are hosting the feed and the episodes on different servers, it is the server hosting the episodeswhich is in question.
    If you would like to post the URL of one of your media files it may be possible to check your server - there is a test though I'm not sure it's 100% accurate.

  • Does anyone know how to enable byte-range requests on Mac OS X Server 10.6?

    I need to be able to host my podcast episodes on the server and iTunes is giving me the error that my episodes are on a server that does not support byte-range requests when I try to submit the podcast feed to the iTunes directory. Any help is greatly appreciated! Thanks

    I'm afraid you've fallen over a requirement that Apple has recently introduced. The iPhone plays podcasts by using 'byte-range requests', which means calling for part of the file at a time rather than the whole thing. Unfortunately some servers don't support this, and there were an increasing number of complaints that podcasts which worked elsewhwere weren't working on an iPhone.
    So Apple are now making the ability to handle this a condition of submission. Evidently your server doesn't support this, so all you can do is to ask them whether they can implement it. If not, you will have to find another hosting service - ask about this before committing yourself, and if they say no, or don't know what it is, find another host. Note that if, as some people do, you are hosting the feed and the episodes on different servers, it is the server hosting the episodeswhich is in question.
    If you would like to post the URL of one of your media files it may be possible to check your server - there is a test though I'm not sure it's 100% accurate.

  • Byte-range request issue when trying to submit - hosted on Tindeck, is this the issue?

    Hi there,
    I'm trying to submit a podcast, but having a few issues. It's the first time I've tried to do this and I'm geting a little confused with all the jargon - and there was me thinking I was pretty tech-savvy!
    I've set up a Wordpress.com blog (http://every80smovie.wordpress.com/) and then set up a feed on Feedburner (http://feeds.feedburner.com/every80smovie) from that. My audio mp3s are hosted on Tindeck - the first episode can be found at http://tindeck.com/listen/xryo, but I used the Wordpress audio code to place an embedded player on the blog page that links to the Tindeck download link.
    From what I can see there are a number of podcasts that seem to host on Tindeck and are listed on iTunes - however, whenever I try to submit my podcast I'm told that the episodes are on a server which doesn't support byte-range requests. I'm guessing Tindeck does because of the other podcasts on there, but I'm now getting really bemused.
    I can subscribe to my podcast using the Advanced tab on iTunes, so I know that side works. Can anybody help at all? Does anybody have any experience with Tindeck?
    Thanks in advance,
    Ben

    When your episode URL is entered in the address bar of a browser it downloads the file; although this works OK in the iTunes application when subscribing, downloading sometimes works in the Store and sometimes doesn't. Really you should provide a direct link to the file which when enter it in a browser, plays in the browser. I don't know whether Tindeck offers this as an alternative.
    Testing for byte-range requests doesn't suggest this is handled - as it's downloading it probably wouldn't in any case. Byte range requests, which consists of requesting parts of the file at a time rather than the whole thing, is the method used by the iPhone and Apple have made it mandatory for new podcasts; if they detect that your server doesn't handle it they will reject your submission. (Other podcasts using Tindeck may have been up before this came into force, or perhaps they've found a way to get Tindeck to serve the files properly.)

  • Byte Range request issue on drupal site where files are linked to as nodes.  Can anyone tell me how to get this feed into itunes?

    I have an audio feed created on my Drupal website and it does not pass muster on the Itunes podcast submission.  Says byte range requests not supported but I talk with my provider and they indicated that byte range requests are supported.  My feed is www.theoasisoflight.org/audio/feed
    Thanks,
    Ken

    I tested your top media file in Terminal and it does not indicate that the server accepts byte range requests:
    curl -I -r 200-300 http://www.theoasisoflight.org/audio/download/305/Wendell+Par+2014-02-23.mp3
    HTTP/1.1 200 OK
    Date: Thu, 27 Feb 2014 15:59:52 GMT
    Server: Apache
    X-Powered-By: PHP/4.4.9
    Expires: Sun, 19 Nov 1978 05:00:00 GMT
    Cache-Control: store, no-cache, must-revalidate, post-check=0, pre-check=0
    Content-Disposition: attachment; filename="Wendell Par 2014-02-23.mp3"
    Set-Cookie: SESS0623d57eba2dab838f39d7d97a4c2411=6bfcf91b3afc32c6ccd97d33dcb520d3; expires=Sat, 22 Mar 2014 19:33:12 GMT; path=/; domain=.theoasisoflight.org
    Last-Modified: Thu, 27 Feb 2014 15:59:52 GMT
    Content-Length: 62962251
    Content-Type: audio/mp3
    If it did, 'Content-Length' would have been 201. I can't promise that this test is 100% authoratitave, but it rather looks as if Drupal are wrong. If this is the case you will, I'm afraid, have to find another server because without byte range requests podcasts don't work properly in iPhones, so Apple have made it mandatory.

  • Get ORA-01031: insufficient privileges error, but only when using dbstart.

    I am getting ORA-01031: insufficient privileges error, but only when using dbstart. the listener starts but not the database. How come I can start it from SQL prompt but not from dbstart scripts as the oracle user?
    [oracle@mallard bin]$ ./dbstart
    Processing Database instance "gf44": log file /prod/oracle/10/startup.log
    [oracle@mallard bin]$
    Log file:
    Wed Aug 20 10:15:02 CDT 2008
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 20 10:15:02 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> ERROR:
    ORA-01031: insufficient privileges
    SQL> ORA-01031: insufficient privileges
    SQL>
    /prod/oracle/10/bin/dbstart: Database instance "gf44" warm started.
    >
    oratab file:
    gf44:/prod/oracle/10:Y
    dbstart file section:
    # See if it is a V6 or V7 database
    VERSION=undef
    if [ -f $ORACLE_HOME/bin/sqldba ] ; then
    SQLDBA=svrmgrl
    VERSION=`$ORACLE_HOME/bin/sqldba command=exit | awk '
    /SQL\*DBA: (Release|Version)/ {split($3, V, ".") ;
          print V[1]}'`
    case $VERSION in
    "6") ;;
    *) VERSION="internal" ;;
    esac
    else
    if [ -f $ORACLE_HOME/bin/svrmgrl ] ; then
    SQLDBA=svrmgrl
    VERSION="internal"
    else
    SQLDBA="sqlplus /nolog"
    fi
    fi
    Permissions of file:
    [oracle@mallard bin]$ ls -la dbstart
    -rwxrwxr-x 1 oracle oinstall 10407 Aug 19 12:27 dbstart
    [oracle@mallard bin]$
    User permissions:
    [root@mallard 10]# id oracle
    uid=503(oracle) gid=503(oinstall) groups=503(oinstall),504(dba)
    [root@mallard 10]#
    I can start the listener manually using "./lsnrctl start" and start the database manually from sql prompt using "SQL>startup" (as sysdba) with no problems. this only happens when using dbstart file. I am logged in as oracle user and all environment variables are set
    Thank you for any help you could provide.

    I have the same problem, but i don't want insert this string
    Connect sys/{password} as sysdbaI have deployed an Oracle 10g with os SunOS
    $ uname -a
    SunOS DB02 5.10 Generic_141444-09 sun4v sparc SUNW,Sun-Blade-T6320
    I can connect with sys/password, but I can't login with
    $ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 7 15:19:50 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> connect / as sysdba
    ERROR:
    ORA-01031: insufficient privilegesthe the startup and dbshut don't work.
    Someone maybe help me?
    Thanks,
    Regards.
    Lain

  • No compilation error but have problems when running.

    Hello all,
    After implementing the examples given from the TextComponentJavaDemo in Java Tutorials I tried to get the fonts to change text in the JEditorPane but to no avail.
    The problem I am having now is some java.lang.Null.PointerException .
    The errors are shown as follows:
    Exception in thread "main" java.lang.NullPointerException
    at guiClient.createActionTable<guiClient.java :191>
    at guiClient.<init> <guiClient.java:52>
    at guiClient.main <guiClient.java:308>
    Here is the whole code for the syntax but it cannot be compiled:
    /* * My GUI Client */
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;
    //for HTML Headers
    import javax.swing.text.StyledEditorKit.*;
    import javax.swing.text.html.HTMLEditorKit.*;
    import javax.swing.text.html.*;
    import javax.swing.event.HyperlinkListener;
    import javax.swing.event.HyperlinkEvent;
    import javax.swing.event.HyperlinkEvent.EventType;
    import javax.swing.text.html.HTMLFrameHyperlinkEvent;
    import javax.swing.text.*;
    //for layout managers
    import java.awt.event.*;
    //for action and window events
    import java.io.*;
    import java.net.*;
    import java.awt.GraphicsEnvironment;
    import java.util.HashMap;
    public class guiClient extends JFrame implements ActionListener {
    protected static final String textFieldString = "JTextField";
    protected static final String loadgraphicString = "LoadGraphic";
    protected static final String connectString = "Connect";
    static JEditorPane editorPane;
    static JPanel layoutPanel = new JPanel(new BorderLayout());
    static JPanel controlPanel = new JPanel(new BorderLayout());
    static PrintStream out;
    static DrawPanel dPanel;
    static DrawControls dControls;
    static AnimationButtons aControls;
    static String userString;
    static JTextField userName = new JTextField();
    public static JMenuBar menuBar;
    private static JButton connectbutton = new JButton("Connect");
    static boolean CONNECTFLAG = false;
    AbstractDocument doc;
    HashMap actions;
    //create the gui interface
    public guiClient() {
         super("My Client");
    //Create a regular text field.
         JTextField textField = new JTextField(10);
         textField.setActionCommand(textFieldString);
         textField.addActionListener(this);
    //Create an editor pane.
        createActionTable(editorPane); //From TextComponentDemo
        editorPane = new JEditorPane();
         editorPane.setContentType("text");
         editorPane.setEditable(true);
    //set up HTML editor kit
         HTMLDocument m_doc = new HTMLDocument();
         editorPane.setDocument(m_doc);
         HTMLEditorKit hkit = new HTMLEditorKit();
         editorPane.setEditorKit( hkit );
         editorPane.addHyperlinkListener(new HyperListener());
    //Create whiteboard
            dPanel = new DrawPanel();
            dControls = new DrawControls(dPanel);
            aControls = new AnimationButtons (dPanel);
            JPanel whiteboard = new JPanel();
            whiteboard.setLayout(new BorderLayout());
            whiteboard.setPreferredSize(new Dimension(300,300));
            whiteboard.add("Center",dPanel);
            whiteboard.add("South",dControls);
           // whiteboard.add("North",aControls);
         JScrollPane editorScrollPane = new JScrollPane(editorPane);
         editorScrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
         editorScrollPane.setPreferredSize(new Dimension(250, 145));
         editorScrollPane.setMinimumSize(new Dimension(50, 50));
    //     StyledDocument styledDoc = editorPane.getStyledDocument();
    //put everything in a panel
         JPanel contentPane = new JPanel();
         contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
    //add whiteboard
         contentPane.add(whiteboard);
    //add editor box
         contentPane.add(editorScrollPane);
    //add spacer
         contentPane.add(Box.createRigidArea(new Dimension(0,5)));
    //add textfield
         contentPane.add(textField);
    //set up layout pane
         layoutPanel.add(BorderLayout.WEST,new Label("Name: ")); //add a label
         layoutPanel.add(BorderLayout.CENTER, userName ); //add textfield for user names
         layoutPanel.add(BorderLayout.SOUTH, connectbutton);//add dropdown box for fonts
         contentPane.add(layoutPanel);
         contentPane.add(controlPanel);
         contentPane.add(aControls);
    //Create the menu bar.
            menuBar = new JMenuBar();
            setJMenuBar(menuBar);
    //Build the first menu.
         JMenu menu = new JMenu("File");
         JMenu styleMenu = createStyleMenu();
         menu.setMnemonic(KeyEvent.VK_F);
         menuBar.add(menu);
         menuBar.add(styleMenu);
    //a group of JMenuItems
         JMenuItem menuItem = new JMenuItem("Load Graphic", KeyEvent.VK_L);
         menu.add(menuItem);
            menuItem.setActionCommand(loadgraphicString);
         menuItem.addActionListener(this);
            connectbutton.setActionCommand(connectString);
            connectbutton.addActionListener(this);
         setContentPane(contentPane);
    protected JMenu createStyleMenu() {
            JMenu menu = new JMenu("Style");
            Action action = new StyledEditorKit.BoldAction();
            action.putValue(Action.NAME, "Bold");
            menu.add(action);
            action = new StyledEditorKit.ItalicAction();
            action.putValue(Action.NAME, "Italic");
            menu.add(action);
            action = new StyledEditorKit.UnderlineAction();
            action.putValue(Action.NAME, "Underline");
            menu.add(action);
            menu.addSeparator();
            menu.add(new StyledEditorKit.FontSizeAction("12", 12));
            menu.add(new StyledEditorKit.FontSizeAction("14", 14));
            menu.add(new StyledEditorKit.FontSizeAction("18", 18));
            menu.addSeparator();
            menu.add(new StyledEditorKit.FontFamilyAction("Serif",
                                                          "Serif"));
            menu.add(new StyledEditorKit.FontFamilyAction("SansSerif",
                                                          "SansSerif"));
            menu.addSeparator();
            menu.add(new StyledEditorKit.ForegroundAction("Red",
                                                          Color.red));
            menu.add(new StyledEditorKit.ForegroundAction("Green",
                                                          Color.green));
            menu.add(new StyledEditorKit.ForegroundAction("Blue",
                                                          Color.blue));
            menu.add(new StyledEditorKit.ForegroundAction("Black",
                                                          Color.black));
            return menu;
         protected SimpleAttributeSet[] initAttributes(int length) {
            //Hard-code some attributes.
            SimpleAttributeSet[] attrs = new SimpleAttributeSet[length];
            attrs[0] = new SimpleAttributeSet();
            StyleConstants.setFontFamily(attrs[0], "SansSerif");
            StyleConstants.setFontSize(attrs[0], 16);
            attrs[1] = new SimpleAttributeSet(attrs[0]);
            StyleConstants.setBold(attrs[1], true);
            attrs[2] = new SimpleAttributeSet(attrs[0]);
            StyleConstants.setItalic(attrs[2], true);
            attrs[3] = new SimpleAttributeSet(attrs[0]);
            StyleConstants.setFontSize(attrs[3], 20);
            attrs[4] = new SimpleAttributeSet(attrs[0]);
            StyleConstants.setFontSize(attrs[4], 12);
            attrs[5] = new SimpleAttributeSet(attrs[0]);
            StyleConstants.setForeground(attrs[5], Color.red);
            return attrs;
        private void createActionTable(JTextComponent textComponent) {
            actions = new HashMap();
            Action[] actionsArray = textComponent.getActions();
            for (int i = 0; i < actionsArray.length; i++) {
                Action a = actionsArray;
    actions.put(a.getValue(Action.NAME), a);
    private Action getActionByName(String name) {
    return (Action)(actions.get(name));
    static private void insertTheHTML(JEditorPane editor, String html, int location) throws IOException {
         HTMLEditorKit kit = (HTMLEditorKit) editor.getEditorKit();
         Document doc = editor.getDocument();
         StringReader reader = new StringReader(html);
         try {
              kit.read(reader, doc, location);
         } catch (BadLocationException e) {}
    //listen for actions being performed and process them
    public void actionPerformed(ActionEvent e) {
    //if the action is from the textfield (e.g. user hits enter)
         if (e.getActionCommand().equals(textFieldString)) {
              JTextField fromUser = (JTextField)e.getSource();
         if (fromUser != null){
    //place user text in editor pane
    //send message to server
                   if (userName.getText() != null) {
                        userString = userName.getText().trim();
                   out.println(userString + ": " + fromUser.getText());
              fromUser.setText("");
         } else if(e.getActionCommand().equals(connectString)) {
              CONNECTFLAG = true;
    } else if (e.getActionCommand().equals(loadgraphicString) ) {
              final JFileChooser fc = new JFileChooser();
              int returnVal = fc.showOpenDialog(this);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   File file = fc.getSelectedFile();
                   dPanel.loadImage(file.getAbsolutePath());
                   sendImage(file);
    //append text to the editor pane and put it at the bottom
    public static void appendText(String text) {
         if (text.startsWith("ID ") ) {
              userString = text.substring(3);
         } else if (text.startsWith("DRAW ") ) {
              if (text.regionMatches(5,"LINE",0,4)) {
    dPanel.processLine(text);
         }else if (text.regionMatches(5,"POINTS",0,5)) {
         dPanel.processPoint(text);
         } else if (text.startsWith("IMAGE ") ) {
    int len = (new Integer( text.substring(6, text.indexOf(",")))).intValue();
    //get x and y coordinates
         byte[] data = new byte[ (int)len ];
         int read = 0;
    try {
         while (read < len) {
         data = text.getBytes( text.substring(0, len) );
    } catch (Exception e) {}
         Image theImage = null;
         theImage = dPanel.getToolkit().createImage(data);
         dPanel.getToolkit().prepareImage(theImage, -1, -1, dPanel);
         while ((dPanel.getToolkit().checkImage(theImage, -1, -1, dPanel) & dPanel.ALLBITS) == 0) {}
              dPanel.drawPicture(0, 0, theImage);
    } else {
    //set current position in editorPane to the end
              editorPane.setCaretPosition(editorPane.getDocument().getLength());
    //put text into the editorPane
              try {
                   insertTheHTML(editorPane, text, editorPane.getDocument().getLength());
              } catch (IOException e) {}
    } //end of appendText(String)
    public void sendImage(File file) {
    //find length of file
         long len = file.length();
    //read file into byte array
         byte[] byteArray = new byte[(int)len];
         try {
              FileInputStream fstream = new FileInputStream(file);
              if (fstream.read(byteArray) < len) {
    //error could not load file
              } else {
              out.println("IMAGE " + len + ",");
                   out.write(byteArray, 0, (int)len); //write file to stream
         } catch(Exception e){}
    //run the client
    private static void createAndShowGUI() {
    //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    final guiClient frame = new guiClient();
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
         String ipAddr=null, portNr=null;
              if (args.length != 2) {
                   System.out.println("USAGE: java guiClient IP_Address port_number");
                   System.exit(0);
              } else {
         ipAddr = args[0];
              portNr = args[1];
              JFrame frame = new guiClient();
              frame.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) { System.exit(0); }
              frame.pack();
              frame.setVisible(true);
              while(CONNECTFLAG == false){}
    //sames as previous client,
    //set up connection and then listen for messages from the Server
              String socketIP = ipAddr;
              int port = Integer.parseInt(portNr);
    //the IP address of the machine where the server is running
              Socket theSocket = null;
    //communication line to the server
              out = null;
    //for message sending
              BufferedReader in = null;
    //for message receiving
              try {
              theSocket = new Socket(socketIP, port );
    //try to connect
              out = new PrintStream(theSocket.getOutputStream());
                   dPanel.out = out;
    //for client to send messages
              in = new BufferedReader(new InputStreamReader(theSocket.getInputStream()));
                   BufferedReader userIn = new BufferedReader(new InputStreamReader(System.in));
                   String fromServer;
                   while ((fromServer = in.readLine()) != null) {
                   appendText(fromServer);
                   if (fromServer.equals("BYE")) {
                        appendText("Connection Closed");
                        break;
              out.close();
    //close all streams
              in.close();
              theSocket.close();
    //close the socket
         } catch (UnknownHostException e) {
    //if the socket cannot be openned
              System.err.println("Cannot find " + socketIP);
              System.exit(1);
              } catch (IOException e) { //if the socket cannot be read or written
              System.err.println("Could not make I/O connection with " + socketIP);
              System.exit(1);
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    Can someone tell me what's the problem with the syntax?

    For your nullPointerException, you have to create your textPane before calling createActionTable          editorPane = new JEditorPane();
              createActionTable(editorPane); //From TextComponentDemoAlso, I would like to point out the following :
    - you're creating your guiClient twice in the main method : at the beginning and at the end through the createAndShowGUI.
    - for no apparent reason, all your member fields are declared static.
    - naming conventions : class names must start with a capital letter.

  • 4MOT/1/40000003: HDD-1344 Error, but no problems!

    Hi, I got the infamous 4MOT/1/40000003: HDD-1344 error while doing my hardware check, however, I do not seem to have any problems with my mac, the fan speed is around 1300RPM, and 38 celsius. It is not loud, and it is working, and everything seems fine.
    I know they say 'if it's not broke, don't fix it', but it is annoying me, and I'd hate anything to mess up...
    Google seems to think it is a fan issue, but I really am not having any problems with it, and have not noticed any change.
    I recently replaced the stock HD with a Crucial M4 SSD, and have had a few 30-second freezes, but haven't for a while, and have just updated the firmware that is meant to stop it.
    If anyone has any idea how to stop this error, it would be greatly appreciated. Preferably something where I do not have to open it up!
    Thanks!
    Jonny

    I wanted to finish the test to see if anything else was up.
    I let the computer cool down and left it off for a bit, and the test eventually worked on the quick test, but had the error on the full test, must have heated up too much. But everything seems fine, so problem solved! Thanks!

  • Error in row problem using rs.deleteRow()

    I am new to JCDB and can not figure out why this code does not work. Can somebody please help?
    import java.applet.*;
    import java.lang.*;
    import java.applet.Applet;
    import java.util.Date;
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class p1 {
    public static void main(String args[]) {
    Connection con=null;
    Statement stmt=null;
    ResultSet rs=null;
    String url;
    try {
    String filename = "U:/profile.cu/Desktop/Java Book_DB/db1.mdb";
    url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    url+= filename.trim() + ";DriverID=22;READONLY=true}";
    String user = "";
    String pwd = "";
    // Using the direct way to connect to the database
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    con = DriverManager.getConnection( url, user, pwd );
    stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE );
    String Password, Date, Email ;
    rs = stmt.executeQuery("SELECT * FROM Users");
    while ( rs.next() ) {
    Date = rs.getString("date_last_used");
    Password = rs.getString("password");
    Email = rs.getString("email_address");
    System.out.println( Password+ " " + Date + " " + Email + " ");
         //int rowNumber = rs.getRow();
    //rs.absolute(rowNumber);
    rs.deleteRow(); //THIS IS WHERE PROBLEM IS!
    //con.commit ();
         //rs.updateRow();
    }// while
    /* rs = stmt.executeQuery("SELECT Date FROM Users");
    rs.absolute(1);
    rs.deleteRow(); // THIS ALSO DOES NOT WORK
    rs.updateRow();
    // Close the statement
    stmt.close();
    // Close the connection
    con.close();
    System.out.println("Finished");
    } //try
    catch ( ClassNotFoundException cnfex ) {
    cnfex.printStackTrace();
    catch ( SQLException sqlex ) {
    sqlex.printStackTrace();
    catch ( Exception ex ) {
    ex.printStackTrace();
    } // main
    } // p1
    This is the error that I get:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Error in row
    at sun.jdbc.odbc.JdbcOdbcResultSet.setPos(JdbcOdbcResultSet.java:5275)
    at sun.jdbc.odbc.JdbcOdbcResultSet.deleteRow(JdbcOdbcResultSet.java:4204
    What in the world is wrong. I tried everything and read a lot and could not solve the problem.

    Hi
    Why don't you use the DSN in Windows to create the url to the db. Go to ODBC Data Source Administrator (in win2000 its in Control Panel) then create a DSN name (e.g. yourdb), select the Microsoft Access driver, give it a name & point it to the database file.
    Then you connect using the code below
    String url = "jdbc:odbc:yourdb";
    Connection con = DriverManager.getConnection(url);
    Staement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE );
    This should work when deleting, good luck
    ps. perhaps the reason it doesn't work before is coz you set READONLY=true when you create the url :)

  • COMBO BOXES AND SOME PAGES ARE NOT SHOWN CORRECTLY IN SOME WEBSITES LIKE SBICAPSEC AND MAXNEWYORK LIFE. BUT NO PROBLEM USING WITH IEXPLORER

    I am not able to login to maxnewyork life insurance site while using firefox. I am using firefox 3.6.10 now. Combo boxes are not shown in the some trading websites. I uses noscript2.0.3.3, javaconsol6.0.21, javascript option 1.2.6 and WOT20100908. It creates feeling of inferiority in using Firefox due to these problems.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

Maybe you are looking for