Problem reading input stream of urlconnection within portal

Hi,
This may be a generic server issue rather than portal but since it's my portal app that's displaying the problem I'll post it here.
Part of my Portal attempts to POST to a remote server to retrieve some search results.
In environments A & B (both standalone instances) this works fine.
In environment C this works on the managed instances in the cluster but not the admin instance.
In environment D (again standalone) it fails, but if I add a managed instance it works from the managed instance.
The problem I'm seeing is that I get a stuck thread and the thread dump shows it is blocked attempting to read the resulting input from a urlconnection. (Using a buffered input stream).
I've copied the code to a standalone class that runs fine from the same server(s). I've pasted this code below, the contents of the test() method were copied directly from my webapp (urls changed here for clarity).
Does anyone know of any securitymanager issues that may cause this?
Or anything else for that matter?
Code sample:
package src.samples;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
public class POSTTest {
     public static boolean test()
     URL url = null;
     try {
     url = new URL
("http://hostx:80/myapp/search.html");
     catch (MalformedURLException e)
     e.printStackTrace();
     return false;
     URLConnection urlConn;
     DataOutputStream printout;
     BufferedReader input;
     urlConn = null;
     try {
     urlConn = url.openConnection();
     catch (IOException e)
     e.printStackTrace();
     return false;
     // Let the run-time system (RTS) know that we want input.
     urlConn.setDoInput (true);
     // Let the RTS know that we want to do output.
     urlConn.setDoOutput (true);
     // No caching, we want the real thing.
     urlConn.setUseCaches (false);
     // Specify the content type.
     urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
     // Send POST output (this is a POST because we write then read as per the JDK Javadoc)
     printout = null;
     String body = "";
     try {
     System.out.println("url=" + url.toString());
     printout = new DataOutputStream (urlConn.getOutputStream ());
     String content = "param1=A&param2=B&param3=C&param4=D&param5=E";
     System.out.println("urlParams= " + content);
     printout.writeBytes (content);
     System.out.println("written parameters");
     printout.flush ();
     System.out.println("flushed parameters");
     printout.close ();
     System.out.println("closed parameter stream");
     // <b>Get response data - this is where it blocks indefinitely</b>
     input = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
     System.out.println("got input");
     String str;
     while (null != ((str = input.readLine()))) {
     body = body + str + "\n";
     System.out.println("read input:");
     System.out.println(body);
     input.close ();
     System.out.println("closed input stream");
     catch (IOException e) {
     System.out.println("IOException caught: read failed");
     e.printStackTrace();
     return false;
     return true;
     * @param args
     public static void main(String[] args) {
          System.out.println("Test result= " + test());

In your recuperar() method, read the FTP input stream into a byte array. (You can do that by copying it to a ByteArrayOutputStream and then getting the byte array from that object.) Then, return a ByteArrayInputStream based on those bytes. After you call completePendingCommand(), of course.
That's one way.
PC&#178;

Similar Messages

  • When using URLConnection read input stream error

    hi,
    In my applet I build a URLConnection, it connect a jsp file. In my jsp file I refer to a javaBean. I send two objects of request and response in jsp to javaBean. In javabean return output stream to URLConnect. At that time a error happened.WHY???(Applet-JSP-JAVABean)
    Thanks.
    My main code:
    APPLET:(TestApplet)
    URL url = new URL("http://210.0.8.120/jsp/test.jsp";
    URLConnection con;
    con = url .openConnection();
    con = servlet.openConnection();
    con.setDoInput( true );
    con.setDoOutput( true );
    con.setUseCaches( false );
    con.setRequestProperty( "Content-Type","text/plain" );
    con.setAllowUserInteraction(false);
    ObjectOutputStream out;
    out = new ObjectOutputStream(con.getOutputStream());
    Serializable[] data ={"test"};
    out.writeObject( data );
    out.flush();
    out.close();
    //until here are all rigth
    ObjectInputStream in = new ObjectInputStream( con.getInputStream() );//happened error
    JSP:
    TestBean testBean = new TestBean ();
    testBean .execute(request, response);
    JAVABEAN:
    public void execute( HttpServletRequest request,
    HttpServletResponse response )
    ObjectInputStream in = new ObjectInputStream( request.getInputStream() );
    String direct = (String) in.readObject();
    System.out.prinltn("direct");
    ObjectOutputStream out = new ObjectOutputStream( response.getOutputStream() );
    SerializableSerializable[] data ={"answer"};
    out.writeObject( data );
    out.flush();
    out.close();
    Error detail:
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:729)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:251)
         at TestApplet.postObjects(TestApplet.java:172)

    you have to pay attention to the sequence of opening the streams.
    The following example is: client sends a string to server, and servlet sends a response string back.
    client side:
             URL url = new URL( "http://152.8.113.149:8080/conn/servlet/test" );
             URLConnection conn = url.openConnection();   
             System.out.println( "conn: " + conn );
             conn.setDoOutput( true );
             conn.setDoInput( true );
             conn.setUseCaches( false );
             conn.setDefaultUseCaches (false);
             // send out a string
             OutputStream out = conn.getOutputStream();
             ObjectOutputStream oOut = new ObjectOutputStream( out );
             oOut.writeObject( strSrc ); 
             // receive a string
             InputStream in = conn.getInputStream();     
             ObjectInputStream oIn = new ObjectInputStream( in );
             String strDes = (String)oIn.readObject();server side
             // open output stream
             OutputStream out = res.getOutputStream();  
             ObjectOutputStream oOut = new ObjectOutputStream( out );
             // open input stream and read from client
             InputStream in  = req.getInputStream();
             ObjectInputStream oIn = new ObjectInputStream( in );
             String s = (String)oIn.readObject();
             System.out.println( s );
             // write to client
             oOut.writeObject( s + " back" ); I have the complete example at http://152.8.113.149/samples/app_servlet.html
    don't forget to give me the duke dollars.

  • Reading input stream over the tcp socket in unix

    I have a program that reads data from input stream from the socket. If the data is over 1500 bytes it is sent in multiple TCP packets. Whats weird is, if I run the program in windows environment it waits till it receives all the packets but when I run the same program in unix environment it only reads the first packet and go further without waiting for all the TCP packets!!
    The line that reads from input stream is
    datalen = inStr.read(byteBuffer);is there anyway I can make it wait till it receives all the packets on unix system? I do not understand why it works fine for windows in this case but not for unix.
    I'll appreciate any help..
    Thanks

    When the network is busy there can be any amount of dleay between packets. If this is ever 100 ms , then this will break.
    If you send more than one packet per 100 ms you will get two packets at once which will look like one longer packet. Unless you check for this the second packet may get ignored.
    The safe way is to send the packet size before sending the packet. Then on the client read the packet to the correct length. Otherwise you will have a program which just happens to work rather than one which will always work.

  • Read input stream

    My function tried to parse a inputstream(xml format) but I keep getting exception: Exception org.xml.sax.SAXParseException: The root element is required in a well-formed document. I checked my XML format, it looks correct. Is there a way I can print out the input stream but still be able to parse it later with the sam input stream? Thanks.
    public static final Document getDOMTree(InputStream input) throws Exception
    try
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         DocumentBuilder builder = factory.newDocumentBuilder();
         Document doc = builder.parse(input);
    return doc;
    } catch(DOMException de) {
    System.out.println("parse error " +de);
         throw new Exception(de.toString());
    } catch(Exception e)
    System.out.println("Exception " +e);
         throw new Exception(e.toString());
    }

    Here's a class that I use for viewing outputstreams in a similar way - you can either adjust it to work as an input stream, or do a quick web search on TeeInputStream - I suspect you'll find some code.
    Cheers,
    - K
    * Copyright (c) 2001 Matthew Feldt. All rights reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided the copyright notice above is
    * retained.
    * THIS SOFTWARE IS PROVIDED ''AS IS'' AND WITHOUT ANY EXPRESSED OR
    * IMPLIED WARRANTIES.
    * TeeOutputStream.java
    * Java Examples In A Nutshell Copyright (c) 2000 David Flanagan
    * Exercise 3-7:
    * Write a subclass of OutputStream named TeeOutputStream that acts like a T
    * joint in a pipe; the stream sends its output to two different output streams,
    * specified when the TeeOutputStream is created. Write a simple test program
    * that uses two TeeOutputStream objects to send text read from System.in to
    * System.out and to two different test files.
    * @author Matthew Feldt <[email protected]>
    * @version 1.0, 02/12/2001 08:23
    import java.io.*;
    public class TeeOutputStream extends OutputStream {
        OutputStream ostream1, ostream2;
        /** sole TeeOutputStream constructor */
        public TeeOutputStream(OutputStream o1, OutputStream o2) throws IOException {
            ostream1 = o1;
            ostream2 = o2;
        public void close() throws IOException {
            ostream1.close();
            ostream2.close();
        public void flush() throws IOException {
            ostream1.flush();
            ostream2.flush();
        public void write(int b) throws IOException {
            byte[] buf = new byte[1];
            buf[0] = (byte)b;
            write(buf, 0, 1);
        public void write(byte[] b, int off, int len) throws IOException {
            ostream1.write(b, off, len);
            ostream2.write(b, off, len);
        /** test class */
        static class Test {
            public static void main (String args[]) {
                final String f1 = "tee1.out", f2 = "tee2.out";
                int ch;
                try {
                    // create a TeeOutputStream with System.out and a file
                    // as output streams
                    TeeOutputStream t1 = new TeeOutputStream(
                        System.out, new FileOutputStream(f1));
                    // create a TeeOutputStream with t1 and a second file as
                    // output streams
                    TeeOutputStream tee = new TeeOutputStream(
                        t1,    new FileOutputStream(f2));
                    // read characters from System.in and write to the tee
                    while ((ch = System.in.read()) != -1) {
                        tee.write(ch);
                    tee.close(); // close the tee
                } catch(FileNotFoundException e) {
                    System.err.println(e.getMessage());
                } catch(IOException e) {
                    System.err.println(e.getMessage());
    }

  • Problem using Input stream reader - unable to read values in variables

    Hi,
    I have a program that need to input an access code. If the code is correct a message appears "Valid access code". Till this part, the codes works fine.
    The problem is here:
    If not correct a prompt is displayed asking the user whether he want to input another code. Whether Y/N, the program always ask for the input. Can anyone tell me what's the problem in the code??
    import     java.io.*;
    public     class     testwhile
         public static void main(String args[])
              //initialisation for input
              InputStreamReader stdin =
                        new InputStreamReader(System.in);
              BufferedReader console =
                        new BufferedReader(stdin);
              //array to store copier access codes and associated max number of copies
              int[][] arr_copier = new int[3][2];
              int     i = 0;
              String c_code;
              int p_validrow; //use to input copier access code
              String     p_reply,p_tryagain, p_found;
              int copier_code;
              //assigning values to array
              arr_copier[0][0] = 450101;
              arr_copier[1][0] = 450202;
              arr_copier[2][0] = 430303;
              arr_copier[0][1] = 500;
              arr_copier[1][1] = 2000;
              arr_copier[2][1] = 100;
              p_tryagain ="N";
              p_found = "N";
              p_validrow = 0;
              c_code = "0";
              try
              do
                        System.out.print("Input code: ");
                        c_code = console.readLine();
                        copier_code = Integer.parseInt(c_code);
                        for (int r=0;r<=2;r++)
                             // System.out.println(r + " = " + arr_copier[r][0]);
                             if (copier_code == arr_copier[r][0])
                                  System.out.println("Value found");
                                  p_found = "Y";
                                  p_validrow = r;
                                  break; // to know row number so as to pick the number of copies for the selected access code
                             else
                                  System.out.println("NOT found");
                                  p_found = "N";
                        if (p_found == "N")
                             System.out.println("Invalid access code");
                             System.out.print("Do you want to try another code?");
                             p_tryagain = console.readLine();
                        else     
                             System.out.println("VALID access code");
                             p_tryagain = "N";
                   p_tryagain = p_tryagain;
                   System.out.println("try again" + p_tryagain);
              while (p_tryagain != "N");
              catch(IOException ioex)
                        System.out.println("Error Exception" + ioex);
    }

    Never compare Strings using Object equality or inequality ("==" resp. "!=").
    Use [url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#equals(java.lang.Object)]String#equals (or [url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#indexOf(java.lang.String)]String#indexOf or [url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#matches(java.lang.String)]String#matches).
    Please use code tags when posting code. This means wrapping your text between [code[/b]][[/b]code] tags. See the [url http://forum.java.sun.com/help.jspa?sec=formatting]Formatting tips.

  • Hi problem in Input stream - Junk character

    Hi
    We are developing a application in which a java servlet reads a request from a xls file
    The request is sent from a macro written in excel file.
    The request sends a xml file content in byte form.
    This we read in the servlet as a datainputstream.
    While printing we encounter a problem
    After every valid character a junk character is also getting printed(it is in form of a square).
    example
    < (junk) x (junk) m (junk).............
    Can somebody help how to solve this
    Thanks
    Ottran
    Message was edited by:
    Ottran

    Sounds to me like the XML is being encoded in some version of UTF-16, but you're ignoring that and acting as if it's in some single-byte encoding. I would certainly question the use of DataInputStream to read it, as that class has assumptions built into it which you could easily misuse.
    And "printing" is a term that could use a whole lot of clarification, especially in the context of a Web application.

  • Strange problem creating input stream in Java 1.4

    I need to create an InputStream from a file that is in the same directory as the class App. But this code (in App)
    File file = new File(App.class.getResource("filename").getFile());
    InputStream is = new InputStream(file);
    throws this exception:
    java.io.FileNotFoundException: c:\my%20programs\filename (The system can not find the file specified)
    The exception is only thrown in jdk1.4. In jdk1.3 everything works perfectly(as it should). What seems to happen is that the space in the directory name "my programs" is turned into "%20". This problem doesn't arise if directory names in the file path don't contain spaces or if I use the File(String) constructor.
    Can someone, please, explain this anomaly or, at least, how I can get an InputStream in this situation without using the Class.getResource().getFile() call.

    Did you try
    InputStream is = new InputStream(file.getCanonicalPath ());
    instead of
    InputStream is = new InputStream(file);
    It might work.

  • Problem reading image from input Stream

    I'm having a problem reading an image through an input stream. It gives me the error
    Premature end of JPEG file
    sun.awt.image.ImageFormatException: JPEG datastream contains no imageand my code looks like
    public Image getImage(String name, String command){
              if(command.equals(pCode)){
                   Image image=null;
                   System.out.println(name);
                   InputStream is = getClass().getResourceAsStream(name);
                   BufferedInputStream bis = new BufferedInputStream(is);
                    byte[] byBuf =new byte[10000];
                     try {
                        int byteRead = bis.read(byBuf,0,10000);
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                     image = Toolkit.getDefaultToolkit().createImage(byBuf);
                   return image;
              return null;
         }And the string name looks when printed is: usr/images/PRLogo.jpg

    If the image is bigger than 10K, this code will break.
    You can pass an InputStream to javax.imageio.ImageIO.read. That's probably an easier option than trying to do the buffering yourself.

  • SocketException during reads - JVM_recv in socket input stream read

    I am getting a SocketException when a Java applet talks to our
    WebLogic 7.0 server. The catch is that it only occurs at one site
    (that has very high T1 utilization, although latency is only ~60 ms)
    Our setup is such that the calls hit an Alteon load balancer, which
    then sends the request out to one of 4 IIS clustered servers, where it
    then is sent to one of 2 WL clustered servers. I figured latency
    would be the cause, but on IIS and on WL, the timeouts are set to
    several hundred seconds, so I am not quite seeing where the connection
    is being reset. To be honest, I really don't know if it is WL that is
    killing the connection, as nothing abnormal shows up in the WL log. I
    have seen similar problems in this group, though, although the stack
    traces never follow the same path mine does. I do have the following
    call stack from the Java plug-in console, though. Any ideas would be
    greatly appreciated.
    java.net.SocketException: Connection reset by peer: JVM_recv in socket
    input stream read
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(Unknown Source)
         at java.io.BufferedInputStream.fill(Unknown Source)
         at java.io.BufferedInputStream.read1(Unknown Source)
         at java.io.BufferedInputStream.read(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
         at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
         at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(Unknown
    Source)
         at sun.plugin.net.protocol.http.HttpURLConnection.checkCookieHeader(Unknown
    Source)
         at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
         at org.xxxx.abstracts.Controller.sendRequest(Controller.java:39)
         at org.xxxx.data.DataMediator.getDataNode(DataMediator.java:46)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Also, here is my code, although I can't see anything on the client
    side that seems off:
    public Object sendRequest( Object request, URL receiver ) throws
    Exception{
    Object response = null;
    URLConnection con = null;
    ObjectOutputStream out = null;
    ObjectInputStream in = null;
    try {
    con = receiver.openConnection();
    con.setDoInput(true);
    con.setDoOutput(true);
    con.setUseCaches(false);
    con.setDefaultUseCaches(false);
    con.setAllowUserInteraction(false);
    out = new ObjectOutputStream(con.getOutputStream());
    out.writeObject(request);
    out.flush();
    out.close();
    in = new ObjectInputStream(con.getInputStream());
    response = in.readObject();
    in.close();
    } catch (ClassCastException e) {
    if( out != null ){
    out.close();
    if( in != null ){
    in.close();
    } catch (Exception e) {
    if( out != null ){
    out.close();
    if( in != null ){
    in.close();
    throw e;
    return response;

    There is a known bug on earlier 1.3.1 releases with sockets on Windows 2k
    and XP. I don't remember all the details.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Keith Patrick" <[email protected]> wrote in message
    news:[email protected]...
    I'm getting the exception on the client, which is an XP machine, while
    the server is Win2K. I can't recall which, but either the applet or
    the server runs 1.3x while the other runs 1.4. I discounted that
    factor, though, as the problem only occurs on one site, which on all
    others it works fine.
    "Cameron Purdy" <[email protected]> wrote in message
    news:<[email protected]>...
    Exception is in the applet or on the server?
    Would one of those by any chance be running on W2K with JDK 131_01 orolder?
    >>
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Keith Patrick" <[email protected]> wrote in message
    news:[email protected]...
    I am getting a SocketException when a Java applet talks to our
    WebLogic 7.0 server. The catch is that it only occurs at one site
    (that has very high T1 utilization, although latency is only ~60 ms)
    Our setup is such that the calls hit an Alteon load balancer, which
    then sends the request out to one of 4 IIS clustered servers, where it
    then is sent to one of 2 WL clustered servers. I figured latency
    would be the cause, but on IIS and on WL, the timeouts are set to
    several hundred seconds, so I am not quite seeing where the connection
    is being reset. To be honest, I really don't know if it is WL that is
    killing the connection, as nothing abnormal shows up in the WL log. I
    have seen similar problems in this group, though, although the stack
    traces never follow the same path mine does. I do have the following
    call stack from the Java plug-in console, though. Any ideas would be
    greatly appreciated.
    java.net.SocketException: Connection reset by peer: JVM_recv in socket
    input stream read
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
    at
    sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(Unknown
    Source)
    atsun.plugin.net.protocol.http.HttpURLConnection.checkCookieHeader(Unknown
    Source)
    atsun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
    at org.xxxx.abstracts.Controller.sendRequest(Controller.java:39)
    at org.xxxx.data.DataMediator.getDataNode(DataMediator.java:46)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Also, here is my code, although I can't see anything on the client
    side that seems off:
    public Object sendRequest( Object request, URL receiver ) throws
    Exception{
    Object response = null;
    URLConnection con = null;
    ObjectOutputStream out = null;
    ObjectInputStream in = null;
    try {
    con = receiver.openConnection();
    con.setDoInput(true);
    con.setDoOutput(true);
    con.setUseCaches(false);
    con.setDefaultUseCaches(false);
    con.setAllowUserInteraction(false);
    out = new ObjectOutputStream(con.getOutputStream());
    out.writeObject(request);
    out.flush();
    out.close();
    in = new ObjectInputStream(con.getInputStream());
    response = in.readObject();
    in.close();
    } catch (ClassCastException e) {
    if( out != null ){
    out.close();
    if( in != null ){
    in.close();
    } catch (Exception e) {
    if( out != null ){
    out.close();
    if( in != null ){
    in.close();
    throw e;
    return response;

  • Server Socket does not read data input stream

    Hi all,
    I am very newbie to Java Network programming with sockets and multi-threading.
    But I am obliged to develop a chat system written in Applets which can be placed on the website and used by visitors who come to my website.
    In order to understand this, I have tested a basic web chat program I downloaded from the Internet which use sockets and multi-threadings. The program work fine, no bugs at all at both compilation and run time. I noticed that all three streams for Client side (i.e. first one is input stream used receiving data from User; the second one is socket input stream used for receiving data from Server socket, and the third is socket output stream used for writing data to server socket) were established. And the same, two socket streams (input & output) for Server side were also connected when running program giving right port number and IP address of the server.
    The problem is both server and client sockets do not read data using the following stream classes:
    1. DataStreamInput: I use input.readUTF() method
    2. or BufferedReader: I use input.readLine() method
    The example of the codes are below:
    private BufferedReader input = null;
    private PrintWriter output = null;
    private Socket socket = null;
    public void open() throws IOException
    {  input = new BufferedReader(new
    InputStreamReader(socket.getInputStream()));
    System.out.println("Server socket input stream was created, and");
    output = new PrintWriter(socket.getOutputStream());
    System.out.println("Server socket output stream was created");
    public void run()
    {  System.out.println("Server Thread " + clientPort + " running.");
    while (true)
    {  try
    System.out.println("Server is reading data from Client, wait...");
    String fromClient = input.readLine();
    System.out.println("Server received a message on " + clientPort + ".");
    catch(IOException ioe)
    {  System.out.println(clientPort + " ERROR reading: " + ioe.getMessage());
    server.remove(clientPort);
    stop();
    The problem is at the line: String fromClient = input.readLine(); in the run() method? What is wrong with the codes above?
    Note: I also try to use original codes which use readUTF() method in DataStreamInput class instead using readLine() in BufferedReader. Both methods dont read data from inputstream socket?
    I very appreciate any help/advice from experienced developers.
    Best regards

    Hi,
    Yes. The readLine() method hangs! After the test, the execuation of the program is stopped at the line of readLine() method; it does not pass it?
    There is no problem with writing to Server socket. After the test, the program pass through flush() method. Here is the code for writing to sever socket within ChatClient (client side socket) class:
    private BufferedReader input = null;
    private PrintWriter           output = null;
    public ChatClient(String serverName, int serverPort)
    {  System.out.println("Establishing connection. Please wait ...");
    try
    {  socket = new Socket(serverName, serverPort);
    System.out.println("Connected: " + socket);
    start();
    catch(UnknownHostException uhe)
    {  System.out.println("Host unknown: " + uhe.getMessage()); }
    catch(IOException ioe)
    {  System.out.println("Unexpected exception: " + ioe.getMessage()); }
    public void start() throws IOException
    {  input   = new BufferedReader (new
                             InputStreamReader(System.in));
    System.out.println("Client User input stream was created,");
    output = new PrintWriter(socket.getOutputStream());
    System.out.println("Client Socket output stream was established, and");
    if (thread == null)
    {  client = new ChatClientThread(this, socket);
    thread = new Thread(this);
    thread.start();
    public void run()
         while (thread != null) {
         String fromUser;
              try{
                   while((fromUser = input.readLine())!= null)
                   System.out.println("Client wasreading a data from User, and");
    output.println(fromUser);
         output.flush();
         System.out.println("Client has written a data to Server");
    catch(IOException ioe)
    {  System.out.println("Sending to server error: " + ioe.getMessage());
    stop();
    etc.
    Here is a piece of codes for reading data from the Client Socket in the ChatServer Class (Server Side socket):
    public void run()
    {  System.out.println("Server Thread " + clientPort + " running.");
    while (true)
    {  try
    {  //server.handle(clientPort, input.readLine());
    System.out.println("Server is reading data from Client, wait...");
    String fromUser = input.readLine();
    //while((fromUser = input.readLine()) != null)
         System.out.println("Server received a message on " + clientPort + ".");
    catch(IOException ioe)
    {  System.out.println(clientPort + " ERROR reading: " + ioe.getMessage());
    server.remove(clientPort);
    stop();
    etc. Please advice why the readLine() method hangs; does not read data from the input stream received from the CLIENT?

  • URLConnections and Input Streams

    I am trying to get a jar file I have up on a web server.
    First I make a connection to the server requesting the file..that works fine.
    Second i want to use an input stream to bring in the file so i can read its contents.
    The problem lies in using the InputStream to read a URL connection.
    I have tried using the JarInputStream but that wont work.
    Do I need to take my URLConnection and convert it to an object or data type that I am not aware of?
    URL url = new URL("http://www.domain.com/myfile.jar");
    URLConnection conn = url.openConnection();
    JarFile in = new JarFile(new BufferedReader(new InputStreamReader(conn)));
    Any ideas fellas?

    At this point that is all I want to do. Just download the file.
    Thats where I am having trouble.
    Once I get it downloaded it should be fine.
    Should I maybe write the input of the file coming off the server to input of a new file?

  • System.read.in(); -problems when inputting numbers

    Very wet behind the ears when it comes to java and having problems in inputting numbers. My course requires me to write a program that converts degrees c to degrees f. An addition is to have the user input the value of degrees c. When I input a value, say 0, then instead of c being that value it is 49 instead (maybe ASCII?). I sense that the problem is the System.in.read(); bit. I've preceded it with (int) and also tried (char) but to no avail. The other problem is how to get the program to accept a double figure or treble figure input (i.e 20 degrees c). My program is below. Any advice would be greatly appreciated.
    //This program is designed to convert degrees Celsius into degrees Fahrenheit
    class Ctof
         public static void main(String[]args)
         throws java.io.IOException
              //identify variables
              int c;
              double f; //double is needed as calculation involves fractions
              System.out.println("Please input a value of degrees Celsius then press [Enter]");
              c=(int)System.in.read();
              f=(c/(5.0/9.0))+32;
              System.out.println(c + " degrees Celsius"); //prints value of c
              System.out.println("This is " + f + " degrees Fahrenheit"); //prints value of f
    }

    I think this should work...
    import java.io.*;
    class Ctof
    static BufferedReader b;
    public static void main(String[]args)
    throws java.io.IOException
    //identify variables
    int c;
    double f; //double is needed as calculation involves fractions
    b = new BufferedReader(new InputStreamReader(System.in));
    System.out.println("Please input a value of degrees Celsius then press [Enter]");
    c = Integer.parseInt(b.readLine());
    f=(c/(5.0/9.0))+32;
    System.out.println(c + " degrees Celsius"); //prints value of c
    System.out.println("This is " + f + " degrees Fahrenheit"); //prints value of f
    } I've added a BufferedReader to read data from the input stream (System.in). This then gets converted to an int. System.in.read() is only really for reading bytes.
    Andrew

  • Re: Connection Failure: ReadFile on fd=1231 failed with err=64  + JVM_recv in socket input stream read

    Jon,
    I believe that this error is similar to a "connection reset by peer". It is
    a Window specific error. I believe it indicates that something has happened
    on the other end of the socket such that the socket has gone bad.
    I think that this should only occur when people reset their connection
    before the reply is sent. I don't believe that it is indicative of any
    serious problem other than this communication failure caused by the client.
    I've opened an issue to catch and squelch these spurious exceptions rather
    than logging them. For now I think it is safe to ignore them.
    Regards,
    Adam
    "Jon Mountjoy" <[email protected]> wrote in message
    news:[email protected]...
    Hi Guys,
    Using weblogic 5.1 (downloaded pretty soon after announcement) on windows
    2000 (yes I know not certified there yet) and using jdk1.2.2-001.
    I have a pretty standard setup - a connection pool (5) to a sqlserver
    (remote) machine.
    A pretty standard multithreaded servlet - grabs a connection, does aselect,
    calls dbkona to dump output, releases connection.
    It runs fine - browser returns result. When I push 'reload' on browser,say
    10 times very quickly, I get the following errors. It is sometimes a
    combination of these:
    1- Mon May 08 13:34:41 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1912 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled
    Code)
    2- Mon May 08 13:40:42 GMT+00:00 2000:<D> <ListenThread> Problem
    accepting connecti on java.net.SocketException: Connection reset by peer:
    JVM_recv in socket input stream read
    Now I can get rid of (1) by switching off native IO!! This also stoppedIO
    exceptions that were being raised by the servlet when it tried to outputto
    the output stream. (2) persists.
    I have changed nothing else in the properties.
    (1) sounds like I may need to up the number of file descriptors open?
    (2) I don't know. Is my server too loaded? I am running on a 600Mhzusing
    64Mb heap for the server with 300Mb swap available...
    Regards,
    Jon
    More substantial excerpts:
    Mon May 08 13:40:42 GMT+00:00 2000:<D> <ListenThread> Problem accepting
    connection
    java.net.SocketException: Connection reset by peer: JVM_recv in socketinput
    stream read
    at java.net.SocketInputStream.socketRead(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java, Compiled Code)
    at weblogic.socket.ResettableSocket.getPrefix(ResettableSocket.java,
    Compiled Code)
    at weblogic.socket.JVMSocketT3.claimSocket(JVMSocketT3.java, CompiledCode)
    at weblogic.socket.JVMSocketT3.claimSocket(JVMSocketT3.java, CompiledCode)
    at weblogic.socket.JVMSocketManager.accept(JVMSocketManager.java,Compiled
    Code)
    at
    weblogic.t3.srvr.ListenThread$RJVMListenRequest.execute(ListenThread.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Mon May 08 13:35:31 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1980 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Mon May 08 13:35:31 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1760 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Mon May 08 13:35:31 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1908 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)

    We are seeing the same error since switching to sp11 (we had been using
    sp10). Haven't seen it in Solaris though. What is causing it?
    Wed May 08 12:01:48 EDT 2002:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=3640 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java:259)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java:178)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:280)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    "John Slaman" <[email protected]> wrote in message
    news:[email protected]..
    >
    I'm getting a error as follows:
    Mon Apr 22 19:04:10 EDT 2002:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=2368 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    I have no idea as to the cause. It's been posted in the archives before -but with
    no particular solution.
    I'm using WLS 5.1 SP11, JDK 1.2.2_007. Win2000.
    Does anybody know the cause/solution?
    Thanks.
    "Jon Mountjoy" <[email protected]> wrote:
    Hi,
    I have noticed that applying the service pack helps things quite a bit.
    I no longer get NT muxer errors etc etc. just the "connection reset by
    peer"
    every now and again.
    As I am repeatedly hitting the server from one browser, your 'connection
    going bad' scenario probably
    applies quite well.
    (btw. before the SP, the errors seemed to crop up more just before/during
    a
    GC.)
    Jon

  • Connection Failure: ReadFile on fd=1231 failed with err=64  + JVM_recv in socket input stream read

    Hi Guys,
    Using weblogic 5.1 (downloaded pretty soon after announcement) on windows
    2000 (yes I know not certified there yet) and using jdk1.2.2-001.
    I have a pretty standard setup - a connection pool (5) to a sqlserver
    (remote) machine.
    A pretty standard multithreaded servlet - grabs a connection, does a select,
    calls dbkona to dump output, releases connection.
    It runs fine - browser returns result. When I push 'reload' on browser, say
    10 times very quickly, I get the following errors. It is sometimes a
    combination of these:
    1- Mon May 08 13:34:41 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1912 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled
    Code)
    2- Mon May 08 13:40:42 GMT+00:00 2000:<D> <ListenThread> Problem
    accepting connecti on java.net.SocketException: Connection reset by peer:
    JVM_recv in socket input stream read
    Now I can get rid of (1) by switching off native IO!! This also stopped IO
    exceptions that were being raised by the servlet when it tried to output to
    the output stream. (2) persists.
    I have changed nothing else in the properties.
    (1) sounds like I may need to up the number of file descriptors open?
    (2) I don't know. Is my server too loaded? I am running on a 600Mhz using
    64Mb heap for the server with 300Mb swap available...
    Regards,
    Jon
    More substantial excerpts:
    Mon May 08 13:40:42 GMT+00:00 2000:<D> <ListenThread> Problem accepting
    connection
    java.net.SocketException: Connection reset by peer: JVM_recv in socket input
    stream read
    at java.net.SocketInputStream.socketRead(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java, Compiled Code)
    at weblogic.socket.ResettableSocket.getPrefix(ResettableSocket.java,
    Compiled Code)
    at weblogic.socket.JVMSocketT3.claimSocket(JVMSocketT3.java, Compiled Code)
    at weblogic.socket.JVMSocketT3.claimSocket(JVMSocketT3.java, Compiled Code)
    at weblogic.socket.JVMSocketManager.accept(JVMSocketManager.java, Compiled
    Code)
    at
    weblogic.t3.srvr.ListenThread$RJVMListenRequest.execute(ListenThread.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Mon May 08 13:35:31 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1980 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Mon May 08 13:35:31 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1760 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Mon May 08 13:35:31 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1908 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)

    I have exactly the same problem running on Windows NT 4.0 (SP4) Weblogic 5.1 and
    JDK1.2.2-001.
    java.net.SocketException: ReadFile on fd=1048 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java, Compiled
    Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java, Compiled
    Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Jon Mountjoy wrote:
    Hi Guys,
    Using weblogic 5.1 (downloaded pretty soon after announcement) on windows
    2000 (yes I know not certified there yet) and using jdk1.2.2-001.
    I have a pretty standard setup - a connection pool (5) to a sqlserver
    (remote) machine.
    A pretty standard multithreaded servlet - grabs a connection, does a select,
    calls dbkona to dump output, releases connection.
    It runs fine - browser returns result. When I push 'reload' on browser, say
    10 times very quickly, I get the following errors. It is sometimes a
    combination of these:
    1- Mon May 08 13:34:41 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1912 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled
    Code)
    2- Mon May 08 13:40:42 GMT+00:00 2000:<D> <ListenThread> Problem
    accepting connecti on java.net.SocketException: Connection reset by peer:
    JVM_recv in socket input stream read
    Now I can get rid of (1) by switching off native IO!! This also stopped IO
    exceptions that were being raised by the servlet when it tried to output to
    the output stream. (2) persists.
    I have changed nothing else in the properties.
    (1) sounds like I may need to up the number of file descriptors open?
    (2) I don't know. Is my server too loaded? I am running on a 600Mhz using
    64Mb heap for the server with 300Mb swap available...
    Regards,
    Jon
    More substantial excerpts:
    Mon May 08 13:40:42 GMT+00:00 2000:<D> <ListenThread> Problem accepting
    connection
    java.net.SocketException: Connection reset by peer: JVM_recv in socket input
    stream read
    at java.net.SocketInputStream.socketRead(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java, Compiled Code)
    at weblogic.socket.ResettableSocket.getPrefix(ResettableSocket.java,
    Compiled Code)
    at weblogic.socket.JVMSocketT3.claimSocket(JVMSocketT3.java, Compiled Code)
    at weblogic.socket.JVMSocketT3.claimSocket(JVMSocketT3.java, Compiled Code)
    at weblogic.socket.JVMSocketManager.accept(JVMSocketManager.java, Compiled
    Code)
    at
    weblogic.t3.srvr.ListenThread$RJVMListenRequest.execute(ListenThread.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Mon May 08 13:35:31 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1980 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Mon May 08 13:35:31 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1760 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Mon May 08 13:35:31 GMT+00:00 2000:<E> <HTTP> Connection failure
    java.net.SocketException: ReadFile on fd=1908 failed with err=64
    at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
    at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java, Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
    Compiled Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)

  • Io exception: Connection reset by peer: JVM_recv in socket input stream read

    We are developing a new J2EE app using JDev, OC4J, servlets, and EJBs. We have determined that our firewall is closing database connections that have been idle for 1 hour. This is a security requirement that cannot be changed. When we try to use these idle connections in both stateless and entity beans, we consistently receive this or a similar error message:
    "ServletSACategoryList: Error invoking EJB procedure. Exception: java.sql.SQLException: StatelessSysAdminBean::getCategoryList - Io exception: Connection reset by peer: JVM_recv in socket input stream read "
    Environment:
    Oracle 9iAS 9.0.2.0.0
    Database: Oracle 8.1.7
    JDBC 8.1.7
    JDK 1.3
    JDev 9.0.2.829
    We are using the ejb-location attribute within data-sources.xml for JNDI lookup of the DataSource. Here is what this file looks like:
    <data-sources>
    <data-source
    class="oracle.jdbc.pool.OracleDataSource"
    name="jdbc/OracleDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/OraclePoolDS"
    url="jdbc:oracle:thin:@###.###.#.###:1521:dev1"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="????????"
    password="????????"
    max-connections="4"
    wait-timeout="20"
    min-connections="1"
    inactivity-timeout="60"
    connection-retry-interval="1"
    max-connect-attempts="3"
    />
    </data-sources>
    After calling getConnection() on the Connection object in my stateless bean, I have tried checking if the Connection object is null or isClosed(), I have caught any Exception, and looped to try again, but nothing has worked.
    Please respond to [email protected] or directly to this post if you can help in any way.
    Thank you,
    - Rob

    Hi Robert,
    If you don't mind, I can only offer a few suggestions for things
    to try -- I'm afraid I don't have a solution for you. Of-course,
    you may have already tried these things, so please excuse me if
    this is the case.
    Firstly, your "data-sources.xml" file looks "different". Have
    you read the "Data Sources" chapter of the "Oracle9iAS Containers
    for J2EE Services Guide, Release 2 (9.0.2)"? It is accessible
    from here:
    http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/web.902/a95879/ds.htm#1004903
    Also, have you tried running OC4J in "debug" mode? This web
    page has more details:
    http://kb.atlassian.com/content/atlassian/howto/orionproperties.jsp
    I get the impression from the information you have supplied,
    that you may not be explicitly closing your database connections
    in your code. It looks to me like you are obtaining a database
    connection in your session bean, and then keeping it for the
    lifetime of that bean. Is that correct? I think it's better
    to obtain a connection when you need to interact with the database,
    and then close the connection immediately after completing the
    interaction with the database (but that's just my opinion).
    Lastly, if you haven't already discovered them, these web sites
    may also be of help:
    http://www.orionserver.com
    http://www.orionsupport.com
    http://www.elephantwalker.com
    Hope this helps you.
    Good Luck,
    Avi.

Maybe you are looking for

  • Feature request: Support for Multiple Libraries (like in iMovie)

    From the threads, I can tell this topic was raised by many for many years. I would like to propose support for multiple iPhoto libraries -- or more specifically, the ability to distribute media across different storage devices. There is a huge gap be

  • Saving web dynpro data into a custom db tabl

    Hi experts,                    Using editable alv i am editing alv fields , modified alv data is there in my internal table ( lt_contact).                    How can i move internal table data to Z-table...                  DATA: node_cont_dtls TYPE

  • How can I get reminders in chronological order?

    Is there a way to get reminders to appear in chronological order?

  • New VIA Audio Drivers

    VIA has released a combo audio drivers to support all these southbridges : VT8231 VT82C686A VT82C686B VT8233 VT8233A VT8233C VT8235 Here is the link : http://www.viaarena.com/?PageID=69 And here is the direct download : (Windows) http://downloads.via

  • Data Module in JDeveloper 2.0

    Hi, I'm the beginner of JDeveloper 2.0. In the help menu, it describe the way to open the data module wizard as follow: Choose File|New to get the New... dialog box, then double-click the Data Module icon. But I does not find the Data Module icon. On