Not able to catch Exception

While passing SQLERRM into a variable. Exception is not being caught. Am I missing something?
create or replace procedure schema1.proc1 (p_sequence number)
v_status_flag varchar2(1000);
begin
v_status_flag := 'INITIAL';
begin
schema2.proc2 (p_sequence, v_status_flag);
exception
when others then
v_status_flag := 'ERROR--';
end;
insert into temp1(status)
values (v_status_flag);
end;
select * from temp1;
ERROR--
create or replace procedure schema1.proc1 (p_sequence number)
v_status_flag varchar2(1000);
begin
v_status_flag := 'INITIAL';
begin
schema2.proc2 (p_sequence, v_status_flag);
exception
when others then
v_status_flag := 'Error--'|| SQLERRM;
end;
insert into temp1(status)
values (v_status_flag);
end;
select * from temp1;
INITIAL

avish16 wrote:
Thanks Manik, sorry I missed commit.No, the problem isn't that you missed Commit. The actual problem lies in the way you are handling exceptions.
This way, you will never understand if there was any exception during execution of your stored program. Needless to say, exceptions must be propogated to the Parent callers after logging appropriate Error messages in your tables.
Below is a sample way of doing so:
create or replace procedure logError(err_code in number, err_msg in varchar2)
is
declare
  pragma autonomous_transaction;
begin
  insert into error_table(err_code, err_msg);
  commit;
end;
create or replace procedure schema1.proc1 (p_sequence number)
v_status_flag varchar2(1000);
begin
  v_status_flag := 'INITIAL';
    begin
      schema2.proc2 (p_sequence, v_status_flag);
    exception
    when others then
      log_errors(sqlerrcode, sqlerrm);
      raise;
    end;
end;
/Similar exception handling needs to be performed in Proc2 as well, as this ensures the exception is Caught, Logged and then propogated further in calling hierarchy.
I hope this helps understanding Exception handling. Also read a nice demonstration and explanation by BluShadow on Exception handling {message:id=2718301}

Similar Messages

  • Not able to catch the exception

    Hi,
    I'm trying to run an ADF page (Test.jspx) . The only page content I have is an embedded BI report.
    I have used a report executable in my page definition.
    A sample code snippet is:
    <executables>
    <biContent id="biExecBinding1" connectionId="TMBIPresentationServerConn" path="/shared/TMSharedFolders/MOT_SalesAccount" type="biReportContent" xmlns="http://xmlns.oracle.com/bi/report/bindings">
    </executables>
    Here TMBIPresentationServerConn is the name of the connection of the BI Server.
    If BI Server is down, on running my page , an exception is being thrown by the framework.
    I want to catch this exception and perform my own logic, but since i am using a binding context for report , i am not able to catch this exception.
    Could you please let me know how can i catch the exception if BI is down?
    Thanks
    Nutan

    (as I suspected from your first post)
    You are using a version of JDeveloper that isn't available to the general public, and are asking about it on a public forum. You should use the internal Oracle forum - I don't know the URL, because I am one of the unwashed general public ;)
    John

  • Not able to catch soap faults

    My process is not able to catch soap faults. I can see the fault being thrown on the TCPMon Tunnel UI.
    Following is the fault I see on the Tunnel UI :
    HTTP/1.1 500 Internal Server Error
    Server: WebSphere Application Server/5.1
    Expires: Thu, 01 Dec 1994 16:00:00 GMT
    Set-Cookie: JSESSIONID=0000efI8on7qoNUcMQ3EHHBcdwI:-1;Path=/
    Cache-Control: no-cache="set-cookie,set-cookie2"
    Content-Type: text/xml; charset=utf-8
    Content-Length: 555
    Content-Language: en-US
    Connection: close
    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server</faultcode>
    <faultstring>com.mycompany.e2sc.soap.E2ScWebServiceSoap.endTransaction(com.mycompany.e2sc.xsd.StartTransactionRequest) -- no signature match</faultstring>
    <faultactor>/e2sc/servlet/rpcrouter</faultactor>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Any ideas ??
    Thanks
    Anand

    This is a known regression on 2.0.10. It is fixed in 2.0.11. -Edwin

  • How to not stop in catched exception in jdb

    Hi,
    I am not sure if this is a silly question :-)
    When I use jdb to debug a kvm.
    It always stop in catched exceptions which I don't care.
    How to not stop in catched exception?
    Thanks for suggestions
    gan

    for example
    my jdb stop and show:
    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    Exception occurred: java.lang.NumberFormatException
    (to be caught at: com.sun.midp.main.Configuration.getIntProperty(), line=144, bci=28)
    thread="Thread1", java.lang.Integer.parseInt(), line=273, bci=11
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    I input
    ignore java.lang.NumberFormatException
    in jdb and run again, but jdb still stop
    What is the right usage of ignore in jdb?
    Thanks for any suggetion or comment.
    gan

  • After upgraded 9.2 DB, all users are not able to login (Except Guest).

    After completed the DB upgrade from 8.1.7.4 to 9.2.0, all users are not able to login the oraclemypage.home. This is except the Guest account.For example, I use the sysadmin account to login the oraclemypage.home. It shows "Your login is invalid. Please login again."
    Moreover, I do the following query.
    SQL> select fnd_web_sec.validate_login('SYSADMIN','SYSADMIN') from
    dual;
    FND_WEB_SEC.VALIDATE_LOGIN('SYSADMIN','SYSADMIN')
    N
    If I guery the Guest account, the result is "Y".
    Also, all users can access via dev60cgi/f60cgi to open E-business 11.5.7 application. Are there any missing script / process I need to do?
    Thanks,
    Matthew

    Hi Arun,
    What message u get on the apache logs / jserv logs when u get the error ?
    Since the log cumulate a giga byte, I clean up the log and test again. It seems no error message.Whats your platform?
    HP-UX 11.11To which version (5 digit) u upgraded DB ?
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    I found a note 225074.1 that talks of a similar issue where users are ablt to login to forms but not php. this is for AIX. review the note.
    I had checked this previously. Part of this document already tried which suggested by Oracle Support.what is the end_date for all of these users in fnd_user table ? if all users for some reason is end_dated , then fnd_web_sec will show 'N"
    All users are normal. For those I tested without end_dated, I can access via f60cgi too.whats the session_cookie_domain set to in icx_parameters table? Set to NULL and try bouncing apache once.
    This set to ".mycompany.com". You mean that I set the session_cookie_domain to NULL and restart Apache, right? Why I need to set it NULL?

  • My iphone 4 is not able to catch wifi signal since few days

    I tried to connect my iphone with my wifi many times. Username and password are correct but also it does not connect. can someone help me to solve this problem? the bluetooth also not working.

    No, still didnt work. I have to be like within a 10 metre range of ANY router in order for it to pick up Wi Fi. My network has replaced my phone though

  • Problem in catching Exception

    I am using servlets. In my program after a particular point I am not able to catch an Exception if it occurs.
    And after this point whatever Exception occurs that is not coming to catch block and its getting printed in webserver logs.
    Can someone help me
    Thanks

    Two possibilities:
    -First you might be catching checked exceptions but not unchecked exceptions. You can catch all types of exceptions by using a catch(Throwable) rather, or in addition to, a catch(Exception)
    -Second, you might be able to catch the exception at the top level and will have to instead add it to many of your methods instead. The reason is that your code might be called in an application server thread. And exceptions are not propogated out of a thread. But if you didn't create it you have no control over it. So your only choice is to add exception/thowable catches in many of your methods.

  • Not able to modify list of approver on when Shopping Cart is on Hold

    Hi All
    We are facing the following situation.
    We are creating a new shopping cart and then putting it on Hold. If we open the shopping cart again ( the SC being on Hold), we are not able to add or change the app rovers in approval flow.  But if we order the Shopping Cart and then open it back and try to add or change the approvers we are able to do this.
    We are using BAdI  BBP_CHNG_AGNT_GET to add or change approver and we are trying to debug this BADi to analyse the issue. But we are not able to catch what's happening when the SC is in Hold status. Is there any other method by which we can check in debugging what's happening in the BBP_CHNG_AGNT_GET with SC on Hold.
    Any information in this regard is much appreciated.
    Best regards
    Indrajit Dutta Choudhury
    Atanu Mondal

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • Not able to integrate Payment Gateway with WebDynpro for ABAP

    Hi,
       I am not able to integrate the Payment Gateway for Billdesk ( third party software) with Webdynpro for ABAP.
    Summery of the Issue : -
    (*) Data from PORTAL Application to PAYMENT GATEWAY is going Correctly but
    (*) Data from PAYMENT GATEWAY to PORTAL Application is not going correctly.
    Details about the Problem : -
       I have created 3 View in Webdynpro Application for ABAP.
    View 1 -> Sales Order
    View 2 -> Confirm Order
    View 3 -> Success Message
    When I am on the View 2 i,e Confirm Order, I have a UI Element ( LINK TO URL) on this View. When I click on the Link it successful takes me to the Bill desk site(Payment Gateway Integrator).After selecting the Card Type - > Master card, or Visa or Amex, I am routed to the Gateway Site of the Citibank, Where I have to enter the CARD details like Card Number, CVV Number, Expiry Date, and press the Submit Button.
    Which now takes me to the final confirmation site, stating
    1) Order Number
    2) Bank ID
    3) Merchant ID
    4) Amount
    5) Authorize ( APPROVED / NOT APPROVED)
    Now once i click on the Submit button, It transfers the amount of the Customer to my bank account, correctly and goes back to the my portal application.
    Till here it is working correctly, but 1 parameter is missing which is called "msg", and this parameter contains important information regarding the payment. This parameter is sent back form the Gateway Site to my Portal.
    1) Authorize STATUS
    2) Check Sum
    etc... which will be finally required to decided whether I should go on to create the Sales Order for the Customer or not.
    If the Authorize Status = '0300' then only create the Sales Order other wise if the status is any thing else lets say not equal to '0300' then gives the message that the Credit Card is not authorize to process the Sales Order.
    Regards,
    Saurabh Bhatnagar
    E : [email protected]

    Dear Sir,
    we are implementing Retail  POS (Point of sale) for one retail company. We need to integrate third party payment gateway.
    it's name is PLUTAS. We have got developer kit from Plutas (For trial ) . we have installed that kit in our system.
    In my program, I am triggering " PL_TriggerTransaction" using call method. After triggering method it executes method, control passes to third party software. But I am not able to catch return parameter (Responce).
    So  that would be great if you help me out with this issue.
    I wrote following code.
    REPORT  ZTEST678.
    INCLUDE OLE2INCL.
    data : rc_plutus type ole2_object,
    lpszTransData type string, 
    lTxnType type char4,
    lpszTransData1 TYPE string,
    ret_string  TYPE string,   
      l_count TYPE i,
      l_time TYPE sy-uzeit.
      rc_gui type ref to CL_GUI_CONTROL.
    lTxnType = '4001'.                        "----
    transaction type
    lpszTransData = '1234567'.          " -
    trasaction data
    *create object rc_gui.
    create object rc_plutus 'PLUTUSEXCHANGE.EXCHANGEOBJ'(001) no flush. "no flush ."queueonly.
    call method of  rc_plutus  'PL_TriggerTransaction'(002) = lpszTransData1
    exporting
      #1 = lTxnType
      #2 = lpszTransData.
    wait up to 20 seconds.
    write:  ret_string.                        " <----
    Value is not coming
    write:  lpszTransData1.            " <----
    Value is not coming

  • Lost 3G connection when updated to 6.1, and not able to update applications

    Hello,
    Once i updated my iPhone4 to 6.1 software, I am not able to catch 3G connection on my phone anymore. I am not sure why this happened. Furthermore, i am not able to update any applications; the icons look like they are ready to be updated but no movement of progress bar.
    Has anyone experienced a similar situation? Ways ot work around it?

    OK good. Did you stream or import the photos to your computer before? if so you can select which photos from the computer you want to sync to the iPhone (iTunes).
    I remember that there also is a method to restore the emails (pop email) from your computer, but i do not remember how. But if you use an imap email (like gmail and so on) this is not relevant because email app open it will sync with the server.

  • Catch Exception shape - working in inner loop but not in outer loop

    Hello,
    I'm trying to use the catch exception shape for the first time.  My orchestration has 3 loops.  I'll call them loop1, loop2, loop3 where loop3 is my inner most loop.  I'm able to catch the exact same error on the inner most loop3 but the outer
    loop2 doesn't catch it and just puts a warning in the event viewer ( have no catch or scope on loop1 yet). 
    I can't figure out what the difference is.  
    The one that is not caught just has the dehydrated message and orchestration saying it will try again.  then 5 mins later it does log an error and terminates but my catch is still not catching it.
    Below in bold is the 'uncaught' warning message and the caught error message respectively.  They look exactly the same to me, so why would the inner be caught but outer NOT caught?  they're both catching the same type which is System.SystemException.
     I couldn't get either to catch a System.FormatException but that's a different issue I'll solve later.
    this is the warning from the UNCAUGHT error:
    The adapter failed to transmit message going to send port "WcfSendPort_SqlAdapterBinding_TypedProcedures_dbo_uspEncounterAdd" with URL "mssql://sqldev1//AllianceDB?InboundId=uspEncounterAdd". It will be retransmitted after the retry interval
    specified for this Send Port. 
    Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The input data for the field/parameter "sTransactionId" is invalid according to the expected SqlDbType BigInt. ---> System.FormatException: Input string was
    not in a correct format.
       at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt)
       at System.Int64.Parse(String s, NumberStyles style, IFormatProvider provider)
       at Microsoft.Adapters.Sql.MetadataHelper.ConvertXmlValueToDotNetObject(String xmlString, String fieldParameterName, SqlDbType sqlDbType, Int32 maxLength, Int32 precision)
       --- End of inner exception stack trace ---
    Server stack trace: 
       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)".
    This is the error message that I'm writing to the event viewer when CATCHING the error in loop3:
    Error from ScopeGetEncounterResponse: message = An error occurred while processing the message, refer to the details section for more information 
    Message ID: {1781C639-DB28-4306-B701-783E069A0403}
    Instance ID: {8E1084F2-00EE-43B2-A112-BF80702A167A}
    Error Description: Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The input data for the field/parameter "sRefID" is invalid according to the expected SqlDbType BigInt. ---> System.FormatException: Input string was not
    in a correct format.
       at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt)
       at System.Int64.Parse(String s, NumberStyles style, IFormatProvider provider)
       at Microsoft.Adapters.Sql.MetadataHelper.ConvertXmlValueToDotNetObject(String xmlString, String fieldParameterName, SqlDbType sqlDbType, Int32 maxLength, Int32 precision)
       --- End of inner exception stack trace ---
    Server stack trace: 
       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)
    Thank you so much for your excellent advice!
    Jean Stiles
    jRenae.s

    It turns out that my outer loop2 was catching the error.  It was just retrying 3 times before it would catch it (I forgot that I had set the retry count to 0 on the loop3 inner port).  I was so impatient that I was stopping my orchestration
    before it was actually catching it!
    jRenae.s
    HI jRenae.s,
    Congratulations! I’m glad to hear that you have solved this issue by yourself, and it is very appreciated to share your solution to us. It will be helpful for others, and welcome to post your question on this forum.
    Best regards
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Not able to spy objects in ie9 using coded UI Test Builder Spy, giving exception -Interface not registered(Exception from HRESULT:0X....

    Not able to spy objects in ie9 using coded UI Test Builder Spy, giving exception - "Interface not registered(Exception from HRESULT:0X...."
    I am not able to capture any objects of my web application using coded ui recorder. Even though it is a simple html page, coded ui is showing a message  -"Interface not registered(Exception from HRESULT:0X...."
    Please give me solution , why this is hapening. I am having problem with object identification. Even I am not able to identify any object in google.com.
    swapnanil sengupta

    TechnologyName is displaying as "MSAA" . But my application is a Webapplication.If I try to spy the google .com's search field then also TechnologyName is displaying as "MSAA". Is it any configuration issue of vsts codedui.
    swapnanil sengupta

  • Except sadmin other users not able to see siebel BI publisher reports

    Hi,
    we have integrated siebel with BI publisher, except sadmin other users not able to see BI publisher reports, it is throwing error "No file has been attached to this record, please attach a file. SBL-SVC-00155".
    when login with sadmin report is generating. we have created user sadmin on BI publisher. if we change that user sadmin on BI publisher to some other name, then sadmin not able to generate reports. is there any specific on user creation on BIP should match with siebel?
    Thanks,
    Joe

    i suggest then dropping user and re-creating and then re-assigning permission (just keep his webcat files) - it'll be faster than looking into individual permissions
    another possible option - did you check his browser? sometimes the screen resolution can be too low and they don't see it on the same screen - need to scroll.
    is it possible he's not using the same Dashboard page as others? just check the "Report Links" to make sure
    i'm not sure what else could be a cause of this

  • I recently buyed totally unlocked sprint iphone which was legally contract free and i am using that phone in india but i am not able to send sms .everything is working fine except sending sms. i have tried everything plz help me !!

    i recently buyed totally unlocked sprint iphone which was legally contract free and i am using that phone in india but i am not able to send sms .everything is working fine except sending sms. i have tried everything plz help me !! i have tried everything i.e. reset iphone /hard reset/network setting reset /sms service no i have also changed but i am still not able to send sms.. please help me as i am really worried .. thank you !!

    I had the same problem.  Kept getting message of waiting for activation or check network connections.  I also tried every solution out there and nothing worked.  This did though:  I download the newest version of itunes (through Internet Explorer - Google Chrome wouldn't work).  It pulled in my entire library thank goodness and then I plugged my iphone 4s into the computer.  I let itunes find it, did a complete backup in icloud, then did a restore.  Entire process took a couple of hours, but I now have imessage and facetime back.  I was about ready to give up on Apple and go get a different phone ~

  • Not able to start the remote server - class not found exception

    All,
    I am quite new to RMI programming, although i am an experienced java programmer. I am facing a problem in starting the remote server program which i wrote for RMI. I am getting class not found exception for "stub" class eventhough the class is in the classpath.
    Following is the error console:
    cmd> java -classpath "D:\Eclipse_WorkSpaces\WS2\RMITests\classes" MyServerImplementation
    GetNames error: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: MyServerImplementation_Stub
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: MyServerImplementation_Stub
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Naming.java:160)
    at MyServerImplementation.main(MyServerImplementation.java:21)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: MyServerImplementation_Stub
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.ClassNotFoundException: MyServerImplementation_Stub
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:434)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
    at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
    at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
    at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    ... 12 morePLEASE ADVISE HOW TO RESOLVE THIS...
    Following are my classes:
    MyRemoteInterface.java
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface MyRemoteInterface extends Remote {
    public String[] getNames() throws RemoteException;
    public class MyServerImplementation extends UnicastRemoteObject implements
    MyRemoteInterface {
    public MyServerImplementation()throws RemoteException{
    super();
    public String[] getNames() throws RemoteException{
    return new String[]{"Name1","Name2","Name3","Name4"};
    public static void main(String args[]) {
    try {
    // Create an object of the HelloWorldServer class.
    MyRemoteInterface obj = new MyServerImplementation();
    // Bind this object instance to the name "HelloServer".
    Naming.rebind("rmi://localhost:1985/GetNames", obj);
    System.out.println("GetNames bound in registry");
    catch (Exception e) {
    System.out.println("GetNames error: " + e.getMessage());
    e.printStackTrace();
    public class MyRMIClient {
    *@param args*
    public static void main(String[] args) {
    try {
    MyRemoteInterface remObj = (MyRemoteInterface) Naming.lookup("rmi://localhost:1985/GetNames");
    System.out.println("Names are "+remObj.getNames());
    catch(Exception e) {
    System.out.println("Problem encountered accessing remote object "+e);
    }

    That's a remote exception coming from the registry. You need to learn to recognize remote exceptions and their source, it's a mjaor source of confusion in RMI.
    In this case it's the registry that can't find the stub class.
    The stub class needs to be in the CLASSPATH of (i) the Registry and (ii) the client as well. Ditto the remote interface; ditto any application classes it refers to, and so on until closure.
    The easiest way to achieve (i) is to start it in the server's JVM, with LocateRegistry.createRegistry().

Maybe you are looking for

  • How to put value in Ring

    I forgot how to input value into ring control. Could anyone tell me how?

  • Attachment in mail from Application

    Hi all,     i want to send some result to higher persons as mail from my program.the result should be send as Excel Attachement. Is it posssible to do.If so kindly givme your suggestion..

  • Iphoto 6 Import Problem

    Howdy All, Every time I import a set of photos into Iphoto, the import function locks up at the end of the import, thus requiring me to force quit the program (when I just simply try to quit, i get a window telling me the import process is still goin

  • Module Pool Screen - Download

    Hi Friends, i have to copy the Module pool program from one server to another server. while doing this i need how to copy / download the screen from the server. i heard that one option is exist in the layout of screen. please help me on this. this is

  • Error - xml tags not proprely ended

    HI Friends, i have wrote an xml package for oracle apps report. After runing my concurrent program it will through an error The following tags were not closed: payrollstart, locsummary. Error processing resource 'http://hrmstest.vra.com:8000/OA_CG...