Exception thrown if one server is brought down - consumer closed

Hi,
I'm using Sun App Server 7.0 to host our web app.
We are using JMS to send and receive messages between the 2 servers in the farm.
We use the "imqAddressList" property of the "ConnectionFactory" to list the Hot names for subscription.
If we bring down one of the app servers, the other server throws the following exception:
javax.jms.IllegalStateException: [C4063]: Cannot perform operation, consumer is closed.
     at com.sun.messaging.jmq.jmsclient.Consumer.checkState(Consumer.java:279)
     at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl.checkReceive(MessageConsumerImpl.java:154)
     at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl.receive(MessageConsumerImpl.java:369)
     at com.ams.framework.jms.JMSSubscriberThread.run(Unknown Source)
Is there any workaround for this issue:
Is there a way to stop the connection attempt at this point?
Please advice.
Thanks
Shekhs

Some of you need would be better suited to the application server forum, but let's see if I can provide some help. Now, the following doesn't account for any licensing restrictions you may have, so you'll have to be the judge of that.
Predicate 1. You can have as many brokers as you need.
Predicate 2. A server can attach to any broker regardless of its location.
Predicate 3. A SJS MQ cluster is not the same thing as an application server cluster. Make sure you are clear when you are mentioning a broker.
Predicate 4. A SJS MQ cluster is used primarily for load balancing.
Based on P1, you should start at least one broker per development stage. This will prevent load testing, for example, to affect development and production. (Not necessarily true if they are on the same machine, but I digress)
Now, I'm pretty rusty on my app server skills, but since an application server instance can connect to any number of brokers, you would be able to get an application server instance, for test for example, to connect to testBroker A, and another application server instance, for production, to connect to prodBrokerA. Now since the MQ cluster is a function of the JMS layer, unknown to the application server, nothing prevents you from doing an MQ cluster between prodBrokerA and prodBrokerB (for application server instance B), and another cluster for testBrokerA and testBrokerB.
Once that is done, you can think of clustering the application servers A and B, but that chat belongs to another forum....
With all of that, you need to make sure your machines have enough resources (CPU, Memory and I/O) to support all of that software....
HTH

Similar Messages

  • Exception thrown by rmi server

    We are getting this follwing error -
    Thu Jul 18 09:41:45 EDT 2002:<E> <Adapter> Exception thrown by rmi server: [1509
    452174786178111S10.15.3.21:[7001,7001,7002,7002,7001,-1]/3]
    java.lang.SecurityException:
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at java.lang.SecurityException.<init>(SecurityException.java:39)
    at weblogic.t3.srvr.T3Srvr.checkServerLock(T3Srvr.java:1926)
    at weblogic.jndi.internal.WLNamingManager.checkServerLock(WLNamingManage
    r.java:97)
    at weblogic.jndi.internal.RemoteContextFactoryImpl.getContext(RemoteCont
    extFactoryImpl.java:95)
    at weblogic.jndi.internal.RemoteContextFactoryImpl_WLSkel.invoke(RemoteC
    ontextFactoryImpl_WLSkel.java:55)
    at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(Compiled Code
    at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(Compiled
    Co
    de)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(Compiled Code)
    Does any one has a clue about this? Thanks in advance.

    I am suffering the same problem, any fix for this problem??

  • Orgstructure data (except persons) from one server to another

    Hi all,
    we have two SAP ECC servers, say serverA and serverB.
    in serverA, we maintain all the OM data using PP01, PP02, PPOM_OLD, etc.
    as a result of this, the data gets stored in OM infotypes, as we see in hrp tables hrp1000, hrp1001 etc.
    on serverA, PA is also implemented, so position objects are related to persons.
    in  serverB, the exact org data of serverA needs to be synchronized into serverB. (daily once), so that all the org units, positions, jobs, relationships, etc. with org chart appear in serverB.
    PA is not implemented in serverB, so person objects is not required to be uploaded to serverB.
    what is the best way, to upload OM data of serverA to serverB.
    from serverA, we can download the data from HRPtables, or we can access table data using custom RFCs with RFC destinations.
    except BDCs, is there any easy and effective way to upload the org data from serverA to serverB.
    thanks,
    Madhu_1980

    Yes, there is ALE messagetype HRMD_A which deals with OM Infotypes as well.
    You can filter the object types, so that otype P will not be distributed.
    BR - Jörg

  • Session Bean Client Hangs when one Server in Cluster Fails

    We are testing several failure scenarios and one has come up that concerns us.
    Some background: Were running a WLS6.1 cluster on two separate machines. We
    start a test client consisting of 50 active threads and let them start calling
    into a session bean. After a couple minutes we pull the network plug out of one
    of the machines to simulate an uncontrolled crash of the machine. Once the plug
    is pulled the clients hang and of more concern any new clients that we startup
    also hang. Has anyone successfully solved this problem?

    When we kill one of Weblogic instances in the cluster none of the clients fail.
    All of our clients fail-over to the remaining servers. It's pulling the network
    plug to our of the server that causes everything to hang. Not just or test client,
    but the other servers in the cluster hang. The control panel doesn't respond
    at all either. We currently have a support case open with BEA #348184 about this.
    We've gotten a prompt response in which we were asked to modify our configuration
    by deploying our beans to each individual server rather than the cluster. We
    did this, but the results so far have not changed.
    Thanks for the feedback,
    Howard.
    "Ade Barkah" <[email protected]> wrote:
    We haven't encountered something like that, so it could be a setup problem.
    Can you verify that the t3 url hostname the client threads use resolves
    to the
    ip addresses of each machine in the cluster? Are all machines in the
    cluster
    listening at the same port number? Also, does it matter if you kill one
    of the
    weblogic processes instead of pulling the plug? (i.e., if you leave the
    network
    layer up?)
    Check also that your threads aren't simply blocking each other when the
    server
    goes down? E.g. start multiple test client processes with one thread
    each just
    to test.
    What we notice is (with round-robin cluster policy), as we bring down
    one of
    the servers, the clients will continue to work on the second server,
    but will slow
    down between method invocations as they still attempt to connect to the
    downed
    server.
    After a short period of time (~30 seconds) the clients will fully switch
    to the
    second machine and processing continues at full speed again, until the
    downed
    machine is brought back up, at which point work is distributed evenly
    again.
    Also, when the first server is brought down, some of the clients may
    terminate
    with a PeerGoneException (or something similar to that.) So unless your
    threads
    are catching exceptions, they might terminate as well.
    regards,
    -Ade
    "howard spector" <[email protected]> wrote in message news:[email protected]...
    We are testing several failure scenarios and one has come up that concernsus.
    Some background: Were running a WLS6.1 cluster on two separate machines.We
    start a test client consisting of 50 active threads and let them startcalling
    into a session bean. After a couple minutes we pull the network plugout of one
    of the machines to simulate an uncontrolled crash of the machine. Once the plug
    is pulled the clients hang and of more concern any new clients thatwe startup
    also hang. Has anyone successfully solved this problem?

  • Exception thrown : java.lang.IllegalStateException: No AdfRenderingContext

    I have an adf application which was built in RAD 6.0.1, I migrated it to RAD 7.5.3, and I still use run time 6.0, but when loading first page, I got error:
    SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /loginSelect.jspx. Exception thrown : java.lang.IllegalStateException: No AdfRenderingContext
         at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeBegin(CoreRenderer.java:136)
         at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeBegin(DefaultAjaxRenderer.java:64)
         at oracle.adf.view.faces.component.UIXComponentBase.encodeBegin(UIXComponentBase.java:593)
         at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591)
         at oracle.adf.view.faces.webapp.UIXComponentTag.encodeBegin(UIXComponentTag.java:108)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:478)
         at oracle.adf.view.faces.webapp.UIXComponentTag.doStartTag(UIXComponentTag.java:85)
         at com.ibm._jsp._loginSelect_5F_jspx._jspx_meth_afh_html_0(_loginSelect_5F_jspx.java:485)
         at com.ibm._jsp._loginSelect_5F_jspx._jspx_meth_f_view_0(_loginSelect_5F_jspx.java:518)
         at com.ibm._jsp._loginSelect_5F_jspx._jspService(_loginSelect_5F_jspx.java:66)
         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1101)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1036)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
         at ca.on.gov.csc.ahp.web.filters.SessionCheckFilter.doFilter(SessionCheckFilter.java:96)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
         at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
         at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:565)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
         at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:226)
         at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:285)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:321)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1101)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1036)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
         at ca.on.gov.csc.ahp.web.filters.SessionCheckFilter.doFilter(SessionCheckFilter.java:96)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
         at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
         at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:565)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
         at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
    The adf version is 10.1.3.
    Any idea to fix the error? Thanks in advance.

    i figured out the issue. Actually there was a method called findMaxId in one of my DAO and in the query i was using the actual column name instead of the id name.
    any how thanks

  • Error upon starting Weblogic server : Exception thrown while loading uddi

    Hi,
    I am getting $Proxy41.getDefaultWebApp(Unknown Source) error while starting the weblogic. Any one has clue? Below is the stack from myserv.log file.
    Environment:
    OS : Windows 2000 server
    WLS: Weblogic 7.0SP2
    Oracle client : Oracle 9i RC2
    IIS : IIS 5.0
    <Exception thrown while loading uddi: java.lang.ClassCastException: weblogic.management.configuration.ApplicationManagerMBean_CachingStub>
    java.lang.ClassCastException: weblogic.management.configuration.ApplicationManagerMBean_CachingStub
         at $Proxy41.getDefaultWebApp(Unknown Source)
         at weblogic.management.configuration.WebServerMBean_CachingStub.getDefaultWebApp(WebServerMBean_CachingStub.java:226)
         at weblogic.servlet.internal.WebAppServletContext.initFromMBean(WebAppServletContext.java:1312)
         at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:1054)
         at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:1009)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:502)
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:371)
         at weblogic.j2ee.J2EEApplicationContainer.prepareWebModule(J2EEApplicationContainer.java:1598)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:735)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:555)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:458)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplications(SlaveDeployer.java:490)
         at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeployer.java:253)
         at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initialize(DeploymentManagerServerLifeCycleImpl.java:150)
         at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.java:54)
         at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
         at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
         at weblogic.Server.main(Server.java:32)
    ####<Dec 14, 2005 11:19:54 AM PST> <Error> <Deployer> <rsecav-webenam> <myserver> <main> <kernel identity> <> <149205> <The Slave Deployer failed to initialize the application uddi due to error weblogic.management.ApplicationException: Prepare failed. Task Id = null
    Module Name: uddi, Error: Could not load uddi: java.lang.ClassCastException: weblogic.management.configuration.ApplicationManagerMBean_CachingStub
    }.>
    weblogic.management.ApplicationException: Prepare failed. Task Id = null
    Module Name: uddi, Error: Could not load uddi: java.lang.ClassCastException: weblogic.management.configuration.ApplicationManagerMBean_CachingStub
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:744)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:555)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:458)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplications(SlaveDeployer.java:490)
         at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeployer.java:253)
         at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initialize(DeploymentManagerServerLifeCycleImpl.java:150)
         at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.java:54)
         at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
         at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
         at weblogic.Server.main(Server.java:32)
    Thanks in advance,
    Manu

    Hi Manu,
    can I know how you over come this problem? I am using Weblogic 7 with Service Pack 4. I will be thankful to u if you can mail ur response to me on my mail [email protected]
    Thanks and Regards,
    Suresh Vemulapalli

  • MS SQL server is going down frequently(10 days of gap) with exception message: "A severe error occurred on the current command. The results, if any, should be discarded".

    MS SQL server is going down frequently(10 days of gap) with exception message: "A severe error occurred
    on the current command. The results, if any, should be discarded". We are facing this issue for past two month.But funny thing is server will be up automatically with out any service restart manually.  Also if we try to restart the SQL
    server service manually then SQL server will be in a dead lock situation and it will not come up even if we wait for long time. Then we should do a windows server machine restart to
    make the SQL sever up. As a suggestion from Microsoft to fix this kind of similar issue,
    we have installed service pack 3 for SQL Server. But even after we are facing same issue.
    Server Details:
    Server OS: Windows Server 2008 R2
    Two type of database servers are installed on server:
    1. MS SQL Server 2008 R2
    2. My SQL
    Also Reporting server is configured for the purpose of generating SSRS report from a dot net website.
     NOTE:Immediately after the data retrieval/save, we are closing the connection explicitly by the
    application.
    we have checked the windows event log and below are the details:
    Log Name:      Application
    Source:        ASP.NET 4.0.30319.0
    Application information:
        Application domain: /LM/W3SVC/5/ROOT-1-130718142067856406
        Trust level: Full
        Application Virtual Path: /
        Application Path: E:\WebSpaceFolder\ACSQuiK\Production\
        Machine name: DBSERVER 
     Process information:
        Process ID: 148
        Process name: w3wp.exe
        Account name: NT AUTHORITY\NETWORK SERVICE 
     Exception information:
        Exception type: SqlException
        Exception message: A severe error occurred on the current command.  The results, if any, should be discarded.
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
    Log Name:      Application
    Source:        Report Server Windows Service (MSSQLSERVER)
    Description:
    Report Server Windows Service (MSSQLSERVER) cannot connect to the report server database.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Report Server Windows Service (MSSQLSERVER)" />
        <EventID Qualifiers="0">107</EventID>
    Could anybody can suggest any kind of fix for this issue? Thanks in advance.

    Hi YesYemPee,
    I have tried but still not clear about your issue, I would like you provide more details information about your issue based on below points to better analysis about the issue:
    What action did you do and caused the error "A severe error occurred on the current command. The results, if any, should be discarded", did you run report on the web application or something else then the error happen?
    If you rendering the report and got the error, please try to provide us more error information in the log files which path like:
    C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles
    If it is not the case in step1, Please try to provide SQL Server Error log(SQL Server Logs) and more details information.
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • ACE slowness issue when one server goes down

    Hi,
    We are having two application servers.Both are load balanced using ACE.
    When we bring down one server, we find that when we upload some files into the second application server, its too slow.
    But when primary server comes up again the performance increases.This issue happens only when we bring the primary server down.
    We are using cookie based stickiness.Any ideas where we can look into.
    Rgds.,
    Sachin

    Depending on the load-balancing algorithm or predictor that you configure, the ACE performs a series of checks and calculations to determine which server can best service each client request. The ACE bases server selection on several factors including the source or destination address, cookies, URLs, HTTP headers, or the server with the fewest connections with respect to load.
    http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA1_7_/configuration/slb/guide/classlb.html

  • Catching an exception thrown from another thread

    I have a SocketServer that creates new threads to handle incoming clients. If one of the threads throw a SQLException is it possible to catch that exception in the SocketServer that created that thread.
    I tried implementing this code and I cannot get the server to catch an exception thrown in the thread. Are my assumptions correct?
    I was reading something about Thread Groups and implementing an uncoughtException() method, but this looked like overkill.
    Thanks for your time!
    Some Example code would be the following where the ClientThread will do a database query which could cause an SQLException. I'd like to catch that exception in my Socket Server
          try
                 new ClientThread( socketServer.accept() , host, connection ).start();
          catch( SQLException e )
                 System.out.println( "DataSource Connection Problem" );
                  e.printStackTrace();
          }

    hehe, why?
    The server's job is to listen for an incoming message from a client and pass it off to a thread to handle the client. Otherwise the server will have to block on that incoming port untill it has finished handling the client and usually there are many incoming clients continuously.
    The reason I would want to catch an exception in the server based on the SQLException thrown in the thread is because the SQLException is usually going to be due to the fact the datasource connection has become unavalable, or needs to be refreshed. This datasource connection is a private variable stored in the socket server. The SocketServer now needs to know that it has to refresh that datasource connection. I would normally try to use somesort of flag to set the variable but to throw another wrench into my dilemma, the SocketServer is actually its own thread. So I can't make any of these variables static, which means I can't have the thread call a method on teh socket server to change the status flag. :)
    I guess I need implement some sort of Listener that the thread can notify when a datasource connection goes down?
    Thanks for the help so far, I figured java would not want one thread to catch another thread's exceptions, but I just wanted to make sure.

  • Client Drops - No Exception Thrown

    Hi All,
    I have a client server application which has been tested extensively and works fine. I have recently migrated the server to a linux environment (it was on windows) and now am experiencing a problem.
    Any exception thrown in the client is programmed to be caught and displayed, as well as emailed to me. I am experiencing problems with one of the clients, they are being dropped after sending and receiving a couple of objects to the server - no exception is thown and no error log is created. It is at the same point every time - about 2 seconds after they connect. On the server side a java.net.SocketException: Broken pipe is thrown when it tries to send the second object to the client (the first data transfer always goes through fine). This is the only client experiencing this issue, it happens at the same spot everytime for them and it works for them when the server is hosted on a windows machine. It's frustrating because even when I run this client from the command line no exception is thrown (even though the part where it fails is in a try catch block), and no error log is created - it simply stops running therefore I don't know how to debug it.

    Presumably you are catching throwable.
    It is quite possible that one end is closing down correctly (so no exception) while the other end is expecting something else to happen and thus an exception occurs.
    If you are sending messages, not data, and there are no message errors then this is not a problem. Simply catch the exception, note in the code that it not a problem, and eat it.

  • Exception thrown from the servlet service function (uri=/servlet/auth)

    iam getting foll. error when i try logging in to iDA -
    [28/Mar/2005:15:39:38] failure (12538): Internal error: exception thrown from the servlet service function (uri=/servlet/auth): java.lang.NullPointerException, Stack: java.lang.NullPointerException
    at netscape.nda.servlet.NDAAuth.execute(NDAAuth.java:306)
    at netscape.nda.servlet.NDAServlet.doPost(NDAServlet.java:117)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:897)
    at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:464)
    we're using iplanet messaging server 5.2 with iDA.
    we have two webservers one on each nodes where messaging services are running in cluster.
    the webmail is running fine.
    the webservers are running fine without errors.
    i tried shifting mesaging services on to both nodes, but the error persists.
    can any one pl. help me ??

    Hi,
    I hope below link will help you.
    http://knowledgebase.iplanet.com/ikb/kb/articles/4761.html
    Thanks,
    Daks.

  • Find all unchecked exceptions thrown by method?

    Dear all,
    I am writing critical code that must be correct. Thus, I wish to know that I have not overlooked any important unchecked exceptions. I am aware that the distinction between unchecked and checked exceptions is controversial, and I know the difference between these types of exceptions.
    I would like to see for each function a list of all possible exceptions a method can throw. Preferably I would like a tool to do this for me, but I would write something myself if there is a reasonably simple way to do it.
    More precisely, I would like to be able to define the set of "unchecked" exceptions myself, e.g., I would put down NullPointerException as "unchecked", but I would let IOException be checked (in my particular application, not in general). In general, this would however be a very nice language feature that could perhaps be a compromise in the (un)checked exceptions-controversy. Each programmer could define an "unchecked"-filter. Perhaps it would best be viewed as a kind of lint.
    In any case, I have not found any tool, and it seems I can not do it myself with reflection, since it only gives access to declared exceptions, i.e., if the JDK-programmer decided not to put IOException in the signature of a method, then reflection can not see that the method may throw such an exception.
    Does anybody know how to do this?

    Douglas1024 wrote:
    Thank you for your time, but I am well aware how one uses exceptions in normal code.
    From an abstract point of view exceptions are simply a form of outputs from a method. Thus, if the goal is to write correct and easily verifiable code, in contrast to the vast majority of code that simply works reasonably, it is quite meaningful to know exactly what kinds of exceptions are thrown by a method and when.
    Please note my correction regarding IOException.Millions upon millions of lines of correct code have been written following these standard java exception principles. The notion that you can write "better" code by detailing every single unchecked exception that could possibly be thrown is ludicrous. In fact by handling unchecked exceptions you will in all likelihood do more harm than good, hence why they are unchecked in the first place.

  • Additional uncaught exception thrown while handling exception.

    Hello all! I am *trying* to surf around the internet and do a little online shopping. I keep getting this error though and it is really bugging me/ruining my night. I am about ready to through my computer at a wall.
    Here is the error:
    Additional uncaught exception thrown while handling exception.
    Here is the full error as it appears on my screen:
    Additional uncaught exception thrown while handling exception.
    Original
    RedisException: Redis server went away in Redis->setOption() (line 23 of /home/www/usa.hunter-boot.com/htdocs/drupalroot/sites/all/modules/contrib/redis /lib/Redis/Client/PhpRedis.php).
    Additional
    RedisException: Redis server went away in Redis->setOption() (line 23 of /home/www/usa.hunter-boot.com/htdocs/drupalroot/sites/all/modules/contrib/redis /lib/Redis/Client/PhpRedis.php).
    It is REALLY bugging me. I don't know that much about computers other then the basics. I only use mine to write papers and go on the internet so if someone is nice enough to try and help me fix this issue then please don't use fancy tech lingo (dumb it down for me). Thank you!

    That's a problem on the web server, not on your computer.

  • Uncaught exceptions thrown in overridden ThreadGroup.uncaughtException

    Hi,
    To process uncaught exceptions in threads I spawn, I have created a ThreadGroup and overridden the uncaughtException method. This works flawlessly, but it brought up the following question:
    What happens to an exception that is thrown in an overridden uncaughtException method that is not caught?
    I assumed that an uncaught exception in an uncaughtException method would call the uncaughtException method in the parent thread group, but this does not seem to be the case. The uncaught exception just seems to disappear.
    Can somebody please confirm my finding that an uncaught exception thrown there just disappears and does not get handled anywhere else? Can somebody point me to the right sections of the Java Language Specs or the JVM Specs that deal with this issue?
    Below is a test program that I wrote to investigate. It throws an exception in an "outer thread", part of an "outer group" thread group; an exception in an "inner thread", part of an "inner group" thread group; and an exception in the uncaughtException method of the "inner group" thread group. I expected that the first two invoke the uncaughtException of the "outer group", while the last one invokes the method of the "inner group". Contrary to my expectations, the exception thrown in the uncaughtException method of the "inner group" does not seem to invoke anything.
    Thanks in advance.
    Yours,
    --Mathias
    public class ThrowInUncaughtExceptionHandler {
    public static void main(String[] args) {
    (new ThrowInUncaughtExceptionHandler()).run();
    public void run() {
    ThreadGroup outerGroup = new ThreadGroup("outer") {
    public void uncaughtException(Thread t, Throwable e) {
    System.out.println("in outerGroup.uncaughtException: "+e);
    final Thread outerThread = new Thread(outerGroup, new Runnable() {
    public void run() {
    System.out.println("in outerThread.run");
    System.out.println("\tthread group: "+Thread.currentThread().getThreadGroup());
    System.out.flush();
    ThreadGroup innerGroup = new ThreadGroup("inner") {
    public void uncaughtException(Thread t, Throwable e) {
    System.out.println("in innerGroup.uncaughtException: "+e);
    System.out.println("\tthrowing another exception...");
    throw new RuntimeException("thrown in innerGroup.uncaughtException");
    final Thread innerThread = new Thread(innerGroup, new Runnable() {
    public void run() {
    System.out.println("in innerThread.run");
    System.out.println("\tthread group: "+Thread.currentThread().getThreadGroup());
    System.out.flush();
    throw new RuntimeException("thrown in innerThread");
    innerThread.start();
    try { innerThread.join(); }
    catch(InterruptedException ioe) { /* ignore */ }
    throw new RuntimeException("thrown in outerThread");
    outerThread.start();
    }

    Hi tigerxx:
    Thank you for your reply. Unfortunately, your suggestion does not help. I had tried it already, even though according to the Java API Javadocs, this is not necessary anyway: If no thread group is specified as parent of a thread group, then the current thread's thread group is used. Since innerGroup is created by a thread in outerGroup, innerGroup's parent is outerGroup.
    Thanks again, though, for taking the time to read and reply.
    --Mathias                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Can the servlet/jsp engine be brought down

    Hello,
              Can the servlet/jsp engine be scheduled for a "in-house patch" not affecting
              the EJB Container? That means the jsp/servlet engine is brought down.
              (HotDeploy is a development feature). Does any version of WebLogic provide
              any way to do this?
              It is a single VM and I suppose that this is not possible. Just thinking out
              loud!!
              Thanks
              Gaurav
              

    Sorry, but there's no way to apply a hot-patch to the server. Good idea, but
              very tricky to implement!
              If you were using a cluster with session-replication, you can cycle the
              servers one at a time. The other servers will pick up where the
              downed-server was working. You can then apply the patch, and bring up the
              server again. Give it a few minutes (an hour to be safe!) to replicate from
              the running server, then cycle the other server safely.
              Alex
              "Gaurav Khanna" <[email protected]> wrote in message
              news:3c7c1256$[email protected]..
              > Hello,
              >
              > Can the servlet/jsp engine be scheduled for a "in-house patch" not
              affecting
              > the EJB Container? That means the jsp/servlet engine is brought down.
              > (HotDeploy is a development feature). Does any version of WebLogic provide
              > any way to do this?
              > It is a single VM and I suppose that this is not possible. Just thinking
              out
              > loud!!
              >
              > Thanks
              > Gaurav
              >
              >
              >
              >
              

Maybe you are looking for

  • How to find out which list is associated with specific incoming email address

    Hey Guys, I've a received a request today from a user asking me which list was setup with a specific incoming email address. Is there a way to find out which list is associated with an email address? Thanks

  • I just bought a new iPad2, and updated it to iOS 7, shouldn't I have gotten iLife free like they said in the keynote last week?

    In the keynote last week at the iPhone event, they stated that all buyers of "new iOS devices" would be getting the option to download iLife for free?  Why wasn't this the case when i just bought my iPad2 yesterday and put iOS7 on it?  Is there a sta

  • Data display in flat file

    hi, I've created one link to action . while clicking the link I need to fetch the values from the oracle database and populate it into .txt file. I need to use one separate java class for fetching the values from the database and keep it inside the .

  • FYI Mail Notification

    I am using 11g and BPMN Process. My scenario is this, I just want to send an email notification to the Initiator that the process has got completed, I don't need any manual intervention. I tried using the FYI Human Task where I set the notification v

  • Calc time estimates, anyone?

    I have a 13 dimension database that yields about 20GB of data after calculation.Block size is about 18KThe only calculation I run is a CALC DIM statement (I'd run a CALC ALL but I fix on members from some dimensions). The CALC DIM just consolidates e