What happened to java.net.SocketTimeoutException?

Discussion in 'Java' started by jdege@jdege.visi.com, Sep 2, 2005.

  1. Guest

    This morning, Sun's auto-update installed a new JRE on my machine -
    1.5.0_04.

    Now all of my Java apps that use sockets are failing with:

    Exception in thread "main" java.lang.NoClassDefFoundError:
    java/net/SocketTimeoutException

    The code still compiles, so the SocketTimeoutException class has to be
    visible to the compiler, but it won't run, so it clearly isn't visible
    to the run-time.

    What gives?
     
    , Sep 2, 2005
    #1
    1. Advertising

  2. Oliver Wong Guest

    <> wrote in message
    news:...
    > This morning, Sun's auto-update installed a new JRE on my machine -
    > 1.5.0_04.
    >
    > Now all of my Java apps that use sockets are failing with:
    >
    > Exception in thread "main" java.lang.NoClassDefFoundError:
    > java/net/SocketTimeoutException
    >
    > The code still compiles, so the SocketTimeoutException class has to be
    > visible to the compiler, but it won't run, so it clearly isn't visible
    > to the run-time.
    >
    > What gives?


    When you run the program, is the classpath set appropriately?

    - Oliver
     
    Oliver Wong, Sep 2, 2005
    #2
    1. Advertising

  3. jan V Guest

    > This morning, Sun's auto-update installed a new JRE on my machine -
    > 1.5.0_04.
    >
    > Now all of my Java apps that use sockets are failing with:
    >
    > Exception in thread "main" java.lang.NoClassDefFoundError:
    > java/net/SocketTimeoutException
    >
    > The code still compiles, so the SocketTimeoutException class has to be
    > visible to the compiler, but it won't run, so it clearly isn't visible
    > to the run-time.
    >
    > What gives?


    The new JRE doesn't have the class, whereas your JDK or other development
    environment has ? Have a look in the RT.JAR and see if you can find
    SocketTimeoutException.class.
     
    jan V, Sep 2, 2005
    #3
  4. wrote:
    > This morning, Sun's auto-update installed a new JRE on my machine -
    > 1.5.0_04.
    >
    > Now all of my Java apps that use sockets are failing with:
    >
    > Exception in thread "main" java.lang.NoClassDefFoundError:
    > java/net/SocketTimeoutException
    >
    > The code still compiles, so the SocketTimeoutException class has to be
    > visible to the compiler, but it won't run, so it clearly isn't visible
    > to the run-time.


    Your JRE is updated, but that doesn't include the compiler. Use
    -Xbootclasspath to point javac at your JRE's rt.jar.

    I guess the update could have messed up. Try a "jar tf rt.jar | grep
    SocketT", or equivalent. Might be worth switching Class Data Sharing off
    with, IIRC, -Xshare:eek:ff (or -server if it is present). I hope it isn't a
    Windows on-line installer problem.

    Tom Hawtin
    --
    Unemployed English Java programmer
    http://jroller.com/page/tackline/
     
    Thomas Hawtin, Sep 2, 2005
    #4
  5. Jeff Dege Guest

    On Fri, 02 Sep 2005 19:59:28 +0100, Thomas Hawtin wrote:

    > wrote:
    >> This morning, Sun's auto-update installed a new JRE on my machine -
    >> 1.5.0_04.
    >>
    >> Now all of my Java apps that use sockets are failing with:
    >>
    >> Exception in thread "main" java.lang.NoClassDefFoundError:
    >> java/net/SocketTimeoutException
    >>
    >> The code still compiles, so the SocketTimeoutException class has to be
    >> visible to the compiler, but it won't run, so it clearly isn't visible
    >> to the run-time.

    >
    > Your JRE is updated, but that doesn't include the compiler. Use
    > -Xbootclasspath to point javac at your JRE's rt.jar.
    >
    > I guess the update could have messed up. Try a "jar tf rt.jar | grep
    > SocketT", or equivalent. Might be worth switching Class Data Sharing off
    > with, IIRC, -Xshare:eek:ff (or -server if it is present). I hope it isn't a
    > Windows on-line installer problem.


    I installed the new JDK, did some searches and found all the various JRE's
    that different vendors had installed, and cleaned up my paths and
    classpaths, and the problem went away.

    --
    Of all the dogs I have known the terrier has the best memory for friends.
    Even casual friends are not forgotten if once accepted. As for the
    master, what can exceed the patience and fidelity of the terrier if
    once his heart is given; and if he is a little jealous and exclusive,
    after all that is not peculiar to dogs.
    -T.F. Dale
     
    Jeff Dege, Sep 2, 2005
    #5
  6. jan V Guest

    > I installed the new JDK, did some searches and found all the various JRE's
    > that different vendors had installed, and cleaned up my paths and
    > classpaths, and the problem went away.


    Problems that "go away" aren't very helpful when it comes to understanding
    causes.. you had a worrying, interesting problem, and now you've wiped the
    evidence. Did you at least follow Thom's, Oliver's and my advice to diagnose
    the problem ?
     
    jan V, Sep 3, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sven abels

    Strange SocketTimeoutException

    sven abels, Dec 1, 2003, in forum: Java
    Replies:
    0
    Views:
    471
    sven abels
    Dec 1, 2003
  2. Andre Raue
    Replies:
    2
    Views:
    7,817
    Nigel Wade
    Apr 14, 2004
  3. Replies:
    4
    Views:
    22,490
    anupam
    Nov 1, 2012
  4. laredotornado
    Replies:
    2
    Views:
    4,572
  5. Smithery

    What happened to reference.cs in VS.NET 2005/.NET 2.0?

    Smithery, Nov 26, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    127
    Smithery
    Nov 26, 2005
Loading...

Share This Page