Scocket Exception/Connection Exception

hi folks,
i am gtting this type of exception
java.net.SocketException:
java.net.ConnectException: Connection timed out: connect
while connecting to remote DB.i am using DB as MySql,and getting this type of exception.
and url is like this..
jdbc:mysql://IPaddress:3306/databasename
thanks in Advance.
prasad.sistla

Ok.
Why do you use youre own PrintWriter?
You have a stream from HttpServlet Object. Use this.
Use something like this:
* Test.java
* Created on 18. Februar 2003, 10:13
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
* @author  Mueller
* @version
public class Test extends HttpServlet {
    /** Initializes the servlet.
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    /** Destroys the servlet.
    public void destroy() {
    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
     * @param request servlet request
     * @param response servlet response
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        /* output your page here */
        out.println("<html>");
        out.println("<head>");
        out.println("<title>Servlet</title>");
        out.println("</head>");
        out.println("<body>");
        out.println("My first servlet");
        out.println("</body>");
        out.println("</html>");
        out.close();
    /** Returns a short description of the servlet.
    public String getServletInfo() {
        return "Short description";
}Dietmar

Similar Messages

  • Urgent help required "java.lang.Exception: Connection reset"

    Hi Everyone,
    I am getting error message when I access cluster database from grid console.
    Error      java.lang.Exception: Connection reset
    I am unable to create jobs or do other admin stuff on the database, I have searched alot , restarted the repository database, restarted the emgc components, even the agents but of no use. The agent status showing OK as under.
    Oracle Enterprise Manager 10g Release 3 Grid Control 10.2.0.3.0.
    Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
    Agent Version : 10.2.0.3.0
    OMS Version : 10.2.0.3.0
    Protocol Version : 10.2.0.2.0
    Agent Home : /app/oracle/agent/agent10g/rac2.tawaf
    Agent binaries : /app/oracle/agent/agent10g
    Agent Process ID : 19646
    Parent Process ID : 19629
    Agent URL : https://rac2.tawaf:3872/emd/main
    Repository URL : https://tawafapp.tawaf:1159/em/upload
    Started at : 2009-04-02 11:26:10
    Started by user : oracle
    Last Reload : 2009-04-02 11:26:10
    Last successful upload : 2009-04-02 12:27:42
    Total Megabytes of XML files uploaded so far : 3.48
    Number of XML files pending upload : 0
    Size of XML files pending upload(MB) : 0.00
    Available disk space on upload filesystem : 86.22%
    Last successful heartbeat to OMS : 2009-04-02 12:30:20
    Agent is Running and Ready
    The error reported in emoms.log is as under.
    2009-04-02 12:37:25,073 [MetricCollector:RACHOMETAB_THREAD600:60] ERROR rt.RacMetricCollectorTarget _getAllData.184 - oracle.sysman.emSDK.emd.comm.CommException: Connection reset
    oracle.sysman.emSDK.emd.comm.CommException: Connection reset
    at oracle.sysman.emSDK.emd.comm.EMDClient.getResponseForRequest(EMDClient.java:1543)
    at oracle.sysman.emSDK.emd.comm.EMDClient.getMetrics(EMDClient.java:915)
    at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab._getAllData(RacHomeTab.java:180)
    at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab.getData(RacHomeTab.java:91)
    at oracle.sysman.emo.perf.metric.eng.MetricCached.collectCachedData(MetricCached.java:404)
    at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread._collectCachedData(MetricCollectorThread.java:596)
    at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread.run(MetricCollectorThread.java:320)
    at java.lang.Thread.run(Thread.java:534)
    can anyone help me as its very urgent for me to clear this error.
    thanks

    this error is also reported against the cluster database.
         Thread: SeverityLoad https://rac2.tawaf:3872/emd/main java.sql.SQLException: ORA-20613: Severity for unknown target. (target guid = 1938FC9C72DDAC01E0C0F268FFC5F6AD) ORA-06512: at "SYSMAN.EM_VIOLATION_CHECKS", line 174 ORA-04088: error during execution of trigger 'SYSMAN.EM_VIOLATION_CHECKS' Error occured at line : 43, File name:Severity

  • 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.

  • Io exception: Connection timed out during Active Sync

    I received this connection exception during an Active Sync Process.
    The exception caused the process to halt for 9 minutes - it then picked again and continued processing accounts.
    We are running IdM v5.0 SP6, Tomcat Application Server, and an Oracle 9 Repository.
    Any ideas?

    Hi,
    It seems the query is taking too long and eventually the connection to the database is timing out.
    I also believe that you are on the supported database configurations for WLS 10.0 MP1 :-
    Link:[http://edocs.bea.com/platform/suppconfigs/configs100/100_over/supported_db.html]
    You will also have to look in the weblogic server log for relevant errors like socket exceptions.
    Regards.

  • Exception in thread "main" java.sql.SQLException: Io exception: Connection

    Hello
    I created a java program to connect to a oracle database 10g
    I got the following error:
    Exception in thread "main" java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093632)(ERR=12514)(ERROR_STACK=(ERROR=(CODE=12514)(EMFI=4))))
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:418)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at dbAccess.main(dbAccess.java:10)
    here the code
    import java.sql.*;
    class dbAccess {
    public static void main (String args []) throws SQLException
         if (args.length<=0) {System.out.println("You need to provide the user and password");System.exit(0);}
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@dathvader2003:1521:orcl", args[0], args[1]);
    // @machineName:port:SID, userid, password
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    while (rset.next())
    System.out.println (rset.getString(1)); // Print col 1
    stmt.close();
    Any helps?
    Many thanks

    This is the exactly code
    import java.io.PrintStream;
    import java.sql.*;
    import oracle.jdbc.driver.OracleDriver;
    class dbAccess
    dbAccess()
    public static void main(String args[])
    throws SQLException
    if(args.length <= 0)
    System.out.println("You need to provide the user and password");
    System.exit(0);
    DriverManager.registerDriver(new OracleDriver());
    Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@dathvader2003:1521:orcl", args[0], args[1]);
    Statement statement = connection.createStatement();
    for(ResultSet resultset = statement.executeQuery("select BANNER from SYS.V_$VERSION"); resultset.next(); System.out.println(resultset.getString(1)));
    statement.close();
    }

  • Flood of "TLS connection exception: handshake incomplete"

    Good day every body!
    I am using 4215 IPS-K9-6.0-4a-E1 image. Recently our sensor started to generate a lot of errors like that (when connected by IDM):
    evError: eventId=1208572151825393108 severity=error vendor=Cisco
    originator:
    hostId: sens-1
    appName: cidwebserver
    appInstanceId: 384
    time: 2008/06/03 16:00:26 2008/06/03 16:00:26 UTC
    errorMessage: name=errTransport WebSession::sessionTask TLS connection exception: handshake incomplete.
    I do understand that there is something wrong with tls certificates. So here are the things that I've tried:
    -Regenerate HTTPS certificate and reconnect. Nope, doesn't work.
    -Reset sensor to defaults, set IP anew, regenerate certificates. Nope, doesn't work.
    -I've also searched this forum, found some topics having the same problem... But there weren't any solution stated.
    I do not want to use simple HTTP, so this is not an option.
    Could this be a client problem? My client host is MS Windows Server 2003, Sun JRE 1.5, IE 6.
    I'd be very thankful if anyone could point me a solution to this issue!
    Thanks in advance!
    Andrew

    That message is common when something is connecting to the sensor through HTTPS but is using the wrong TLS certificate.
    However, this message does not let you know which box is having this connection problem.
    If you are able to connect in from IDM and IDM is working fine, then it is likely that it is not IDM that is causing the errors.
    More than likely there is another box (or application) on your network that is trying to connect and still has the old SSL certificate of the sensor.
    That Other box needs to be updated with the sensor's newest SSL certificate.
    To figure out the IP address of the Other box you could try and use the "packet display" command on the sensor's command and control IP Address to look for HTTPS sessions to the sensor that are short lived.
    My best guess is that you may have an old installation of IEV or some other monitoring tool that is trying to connect to the sensor using an old SSL certificate, and that application needs to be updated to use the sensor's newest SSL certificate.
    If you can't connect in from IDM, and during those attempts you keep getting that error. Then your web browser has the old certificate cached, and you need to get your browser to accept the newest SSL certificate from your sensor. IDM should then start working and the error would go away.

  • Java.lang.IllegalStateException: Already Connected  Exception

    I get java.lang.IllegalStateException: Already Connected Exception while executing
    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    conn.setRequestMethod("POST");
    (Exception here) conn.setDoOutput(true); // we want to send things
    // the Content-type should be default, but we set it anyway
    conn.setRequestProperty( "Content-type", "application/x-www-form-urlencoded" );
    // the content-length should not be necessary, but we're cautious
    conn.setRequestProperty( "Content-length", Integer.toString(body.length()));
    Can any one please let me know how to get this thing fixed

    Remove either the line setRequestMethod("POST") or the setDoOutput(true). How did you came on the idea to set them both?
    You may find those snippets useful as well: http://balusc.blogspot.com/2006/05/httpservletutil.html#doPost

  • Java connection exception

    I am trying to connect to an external server from a proxy , but I get a java.connection exception : remote host did not respond within the time
    out period ..
    how do i solve this issue ? can i explicitly set an increased time out on the connection ?

    I am trying to use sockets to address the issue of time outs..the code i have is as follows..i am trying to post an xml file , i dont seem to be getting a response nor am i erroring out ?
    String host = "http://mysite.activation.com";
    Socket sckt = new Socket(host,80);
         sckt.setSoTimeout(10000);
         String method = "POST";
    String messageString = "<?xml version='1.0' encoding='UTF-8' ?>" +
         "<Test.Users>" +
         "<User userID='"+test+"' />"+
         "</Test.Users>" ;
         OutputStream out = sckt.getOutputStream();
         out.write(method.getBytes());
         out.write(messageString.getBytes());
         out.flush();
         out.close();

  • Java.sql.SQLException: E/A-Exception: Connection ended abnormally

    Hi all,
    this strange exception occurs in the communication channel monitoring. I see there was a processing error in the communication channel which inserts data from XI. When I look in audit protocol I can see that after a few minutes the connection is ended with an error which says the following:
    Error processing request in sax parser: Error when executing statement for table/stored proc. 'LVS' (structure 'STATEMENTNAME'): java.sql.SQLException: E/A-Exception: Connection ended abnormally.
    Now my questions are: Why does this error occur? And can someone explain me this error?
    Regards
    Florian

    I think I have the reason for this problem. It's a network problem. The network to this system has a high load. In addition, the JDBC receiver adapter was configured with parameter <i>"Disconnect from Database After Processing Each Message".</i> Now I have deselected the parameter and I have no problems.
    Thanks for your efforts
    Florian

  • Tomcat Io exception: Connection reset

    The error occurs after a little while and I need to stop start the entire tomcat before the pages can retrieve data from oracle again. I saw many posting on this which some says its related to browser closing before the end of page load, dbstmt.close etc...can someone pls direct me on which is correct.
    the print stack is as follows...
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Io exception: Connection reset
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
         at java.lang.Thread.run(Thread.java:534)
    root cause
    javax.servlet.ServletException: Io exception: Connection reset
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
         at org.apache.jsp.PMMonitor_jsp._jspService(PMMonitor_jsp.java:611)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
         at java.lang.Thread.run(Thread.java:534)
    Apache Tomcat/4.1.29

    I'd guess it's a database problem. Probably something to do with the way you open and close database connections, or the nature of the link to the Oracle server. It might even be an authentification problem.
    The problem is that there's a third trace block not being displayed here. The servlet exception probably also has a "root cause" exception which is not being printed on the trace. You may find more information in Tomcat's log files, but then again you may not.
    You may want to think about putting an explicit try - catch block in the offending jsp as a debugging aid and, thus, catching and displaying the expception in an "unwrapped" state.

  • Io exception: Connection reset

    Dear,
    my scenario is: SAP MII accesses an Oracle database and reads messages form this database to subsequently send to a webservice.
    For some messages, with size of 4K, the MII can complete the process successfully.
    For other messages that have size of 89K, the error occurs:
    : com.sap.xmii.Illuminator.logging.LHException: com.sap.xmii.Illuminator.logging.LHException: com.sap.xmii.Illuminator.logging.LHException: Error occurred while processing records; Io exception: Io exception: Connection reset
    How can I solve this problem?
    Best Regards,
    Sérgio Salomã

    You need to determine where the issue is occuring.  How are you calling the transaction?  Do you have proper error handling under the sql and web service actions?
    Jamie

  • Io exception: Connection reset VendorError: 17002

    When I switched from our development DB to our production DB, I now sometimes get this error when inserting a BLOB (average about 40k) using the Oracle Database 10g Release 2 (10.2.0.1.0) JDBC Drivers.
    Any help would be grealy appreciated!
    Here lies the debug:
    2006-02-27 01:32:23,996: - ERROR - (FaxTransaction.java:1209) [JavaMail-EventQueue] - SQLException: Io exception: Connection reset
    2006-02-27 01:32:23,996: - ERROR - (FaxTransaction.java:1210) [JavaMail-EventQueue] - SQLState: null
    2006-02-27 01:32:23,996: - ERROR - (FaxTransaction.java:1211) [JavaMail-EventQueue] - VendorError: 17002
    2006-02-27 01:32:23,998: - ERROR - (FaxTransaction.java:1212) [JavaMail-EventQueue] - SQLException:
    java.sql.SQLException: Io exception: Connection reset
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:977)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
         at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
         at net.nighthawk.faxviewer.server.database.FaxTransaction.addFaxPage(FaxTransaction.java:1195)
         at net.nighthawk.faxviewer.server.database.FaxTransaction.addNewFaxStapleGroup(FaxTransaction.java:83)
         at net.nighthawk.faxviewer.server.mail.NewMessageHandler.handle(NewMessageHandler.java:110)
         at net.nighthawk.faxviewer.server.FaxViewerServer$NewFaxEmailHandler.messagesAdded(FaxViewerServer.java:360)
         at javax.mail.event.MessageCountEvent.dispatch(MessageCountEvent.java:137)
         at javax.mail.EventQueue.run(EventQueue.java:121)
         at java.lang.Thread.run(Thread.java:595)
    2006-02-27 01:32:24,000: - ERROR - (FaxTransaction.java:1247) [JavaMail-EventQueue] - SQLException: Closed Connection
    2006-02-27 01:32:24,000: - ERROR - (FaxTransaction.java:1248) [JavaMail-EventQueue] - SQLState: null
    2006-02-27 01:32:24,000: - ERROR - (FaxTransaction.java:1249) [JavaMail-EventQueue] - VendorError: 17008
    2006-02-27 01:32:24,001: - ERROR - (NewMessageHandler.java:118) [JavaMail-EventQueue] - SQL Error trying to get the next sequence number for the FAX PAGE STAPLE.
    java.lang.Exception: SQL Error trying to get the next sequence number for the FAX PAGE STAPLE.
         at net.nighthawk.faxviewer.server.database.FaxTransaction.addFaxStaplePage(FaxTransaction.java:1251)
         at net.nighthawk.faxviewer.server.database.FaxTransaction.addNewFaxStapleGroup(FaxTransaction.java:94)
         at net.nighthawk.faxviewer.server.mail.NewMessageHandler.handle(NewMessageHandler.java:110)
         at net.nighthawk.faxviewer.server.FaxViewerServer$NewFaxEmailHandler.messagesAdded(FaxViewerServer.java:360)
         at javax.mail.event.MessageCountEvent.dispatch(MessageCountEvent.java:137)
         at javax.mail.EventQueue.run(EventQueue.java:121)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:840)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:759)
         at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:185)
         at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.prepareStatement(PoolingDriver.java:338)
         at net.nighthawk.faxviewer.server.database.FaxTransaction.addFaxStaplePage(FaxTransaction.java:1237)
         ... 6 more

    Here is the Java code if it helps.
    FaxPage faxPage;
    byte[] image;
    StringBuilder sqlString = new StringBuilder();
    sqlString.append("INSERT INTO faxviewer.fax_page ( ");
    sqlString.append("fax_page_id, "); // 1
    sqlString.append("fax_id, "); // 2
    sqlString.append("fax_page_number, "); // 3
    sqlString.append("fax_image ) "); //4
    sqlString.append("VALUES ( ");
    sqlString.append("?, ?, ?, ? ) ");
    stmt = conn.prepareStatement(sqlString.toString());
    stmt.setInt(1, faxPage.getFaxPageId());
    stmt.setInt(2, faxPage.getFaxId());
    stmt.setInt(3, faxPage.getFaxPageNum());
    stmt.setBytes(4, image);
    int rowcount = stmt.executeUpdate(); // Exception 17002 sometimes here

  • Connection refused: connect exception

    Dear All,
    while connecting to localhost using the below program, i am getting Connection Refuded: connect exception.
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class SocketTest {
    private java.net.ServerSocket serverSocket;
    public static void main(String[] str) {
    int port = 12034;
    InetAddress dst = null;
    try {
    dst = InetAddress.getByName("localhost");
    } catch (UnknownHostException e) {
    e.printStackTrace();
    System.out.println("chrono"+dst.getCanonicalHostName());
    System.out.println("chrono"+dst.getHostName());
    Socket sock;
    try {
    sock = new Socket(dst, port);
    System.out.println("aftersocket");
    } catch (IOException e) {
    e.printStackTrace();
    Regards,
    Ashok
    }

    Do you have a server on your localhost awaiting connections on port 12034?

  • Io exception: Connection refused Error

    I am trying to configure a connection pool on Weblogic 8.1 using Oracle thin client.
    When I click on the Test Driver configuration, I get the following error:
    Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    I have verified that the username/url are correct.
    Any ideas?

    Sreeram wrote:
    I am not sure how to run utils.dbping.Try this:
    C:\> java utils.dbping
    It will print out a usage message.
    Anyway, I am able to connect to the database using SQLPlus. I have the following
    entry in my tnsnames ora:
    dbalias.world=
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server.xx.com)(PORT = 1521))
    (CONNECT_DATA =
    (service_name = dbname)
    )Ok, and how did you define the pool? What were the properties and URL?
    Did your URL contain 'dbname' as the SID, or did you set the SID in the properties?
    show me the pool definition and show me how you start SQL-PLUS.
    Joe
    Thanks!
    Joe Weinstein <[email protected]> wrote:
    Sreeram wrote:
    I am trying to configure a connection pool on Weblogic 8.1 using Oraclethin client.
    When I click on the Test Driver configuration, I get the followingerror:
    Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    I have verified that the username/url are correct.The SID is probably wrong. What does utils.dbping show?
    Joe
    Any ideas?

  • Help!!getting Connection Exception &permission denied for my local system

    Hi,
    I am getting this connect Exception when i am running my RMI program.It is not comming when i am running all the programs[server,client] in my local system.
    When i put the server program in the server which is linux server and i am calling it from my local system its giving ConnectException permission denied to 127.0.0.1,no more further infoemation.
    These are the programs..
    server :
    import java.net.*;
    import java.rmi.*;
    public class AddServer
    public static void main(String args[])
         try
         AddServerImpl addServerImpl=new AddServerImpl();
         Naming.rebind("AddServer",addServerImpl);
         catch(Exception e)
         System.out.println("Exception :"+e);
    Implement:
    import java.rmi.*;
    import java.rmi.server.*;
    public class AddServerImpl extends UnicastRemoteObject
    implements AddServerIntf
    public AddServerImpl()throws RemoteException
    public double add(double d1,double d2)throws RemoteException
         return d1+d2;
    Interface:
    import java.rmi.*;
    public interface AddServerIntf extends Remote
         double add(double d1,double d2)throws RemoteException;
    Client Program :
    import java.rmi.*;
    import java.rmi.registry.*;
    public class AddClient
         public static void main(String args[])
         try
    //     String addServerURL="rmi://"+args[0]+"/AddServer";
         Registry r=LocateRegistry.getRegistry("rmi://"+args[0]);
    //AddServerIntf addServerIntf=(AddServerIntf)Naming.lookup(addServerURL);
    AddServerIntf addServerIntf=(AddServerIntf)r.lookup("AddServer");
    System.out.println("The firsrt number is"+args[1]);
    double d1 =Double.valueOf(args[1]).doubleValue();
    System.out.println("The second number is:"+args[2]);
    double d2=Double.valueOf(args[2]).doubleValue();
    System.out.println("The sum is:"+addServerIntf.add(d1,d2));
    catch(Exception e){
         System.out.println("Exception:"+e);
    Plese go thru it and tell what modifications that i have to do with it...
    regards,
    j.mouli

    You can specify a policy file and grant the following pemission in it:
    grant {
    permission java.net.SocketPermission "*:1024-65535","accept, connect, listen, resolve";
    Specify this policy file using "-Djava.security.policy=your policy file".
    BTW, don't forget to run rmiregistry before you launch your own RMI application.
    Good luck!
    Justine

Maybe you are looking for

  • Apple TV upgrade installed, will not recognize my Remote App on iPhone 5

    I just installed the new Apple TV upgrade.  Now my iPhone 5 Remote App no longer works.  The message received on my iPhone is, "Could not find Apple TV."  Is anyone else experiencing this annoyance?

  • Bootcamp Problem.  Won't reboot when running the windows install disc.

    I have gone through steps of bootcamp assistant.  Prepared my mac for install.  Downloaded apple drivers to zip drive.  set size of partition for Windows.  Inserted Windows 7 install disc.  It went through setting up the particition and then restarte

  • Camera Raw 7 plug-in | Learn Photoshop CS6 | Adobe TV

    NAPP Instructor Matt Kloskowski goes over some of the new changes made to Photoshop's Camera Raw plugin - including the new Process Version 2012. http://adobe.ly/Jo38yo

  • Do I have a corrupt file?

    I am working a on a project. All footage is 1920 x 1080 601 avchd and 1920 x 1080 60p h.264 converted with mpegstream clip the project is in 2 parts. 1st part is 54 mins and change, second is 1hr 03 mins and change. I have tried exporting both self c

  • Simple Trivia game

    I am attempting to design a very simple trivia game. It needs to include if and for statements. Can anyone link me to a place they know of that shows me how?