classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: [Jamvm-general] Problem with sockets on JamVM version 1.3.3 and Cl


From: Robert Schuster
Subject: [Fwd: [Jamvm-general] Problem with sockets on JamVM version 1.3.3 and Classpath 0.18]
Date: Sun, 18 Sep 2005 16:04:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.11) Gecko/20050916

Hi,
I forward this to the GNU Classpath discussion mailing because I think this
can be better solved there.

cu
Robert
--- Begin Message --- Subject: [Jamvm-general] Problem with sockets on JamVM version 1.3.3 and Classpath 0.18 Date: Sat, 17 Sep 2005 20:11:19 -0400
Hi JamVM users, I am testing a lightweight servlet engine called
Winstone (winstone.sourceforge.net), which works fine with Sun and IBM
JVMs (1.4.2), but when tested with JamVM (latest release), I got this
exception while starting:

[Winstone 2005/09/16 18:47:09] - Error during HTTP listener init or shutdown
java.io.IOException: Internal error: _javanet_accept():
   at gnu.java.net.PlainSocketImpl.accept (Native Method)
   at java.net.ServerSocket.implAccept (ServerSocket.java:370)
   at java.net.ServerSocket.accept (ServerSocket.java:325)
   at winstone.HttpListener.run (HttpListener.java:135)
   at java.lang.Thread.run (Thread.java:673)

I am running on SuSE 9.3 Pro:

Linux version 2.6.11.4-20a-default (address@hidden) (gcc version
3.3.5 20050117 (prerelease) (SUSE Linux)) #1 Wed Mar 23 21:52:37 UTC
2005

The code that triggers the Exception looks pretty simple, it is the
"accept()" line:

    /**
     * The main run method. This continually listens for incoming connections,
     * and allocates any that it finds to a request handler thread, before going
     * back to listen again.
     */
    public void run() {
        try {
            ServerSocket ss = getServerSocket();
            ss.setSoTimeout(LISTENER_TIMEOUT);
            Logger.log(Logger.INFO, resources, "HttpListener.StartupOK",
                    new String[] { getConnectorName().toUpperCase(),
                            this.listenPort + "" });

            // Enter the main loop
            while (!interrupted) {
                // Get the listener
                Socket s = null;
                try {
                    **** s = ss.accept(); **** 
                } catch (java.io.InterruptedIOException err) {
                    s = null;
                }

                // if we actually got a socket, process it. Otherwise go around
                // again
                if (s != null)
                    this.objectPool.handleRequest(s, this);
            }

            // Close server socket
            ss.close();
        } catch (Throwable err) {
            Logger.log(Logger.ERROR, resources, "HttpListener.ShutdownError",
                    getConnectorName().toUpperCase(), err);
        }

        Logger.log(Logger.INFO, resources, "HttpListener.ShutdownOK",
                getConnectorName().toUpperCase());
    }


Any help will be very appreciated.

Best regards,
Martin
-- 
Dinamica - Open source J2EE framework
Free, easy and powerful
http://www.martincordova.com


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Jamvm-general mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/jamvm-general



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]