Bug? EJB method Return Value and Client Catch the Exception?

oc4j 9.0.3 on the windows 2000
I write a Stateless Session Bean named SB1 ,
and define application exception.
The Code as follow:
public class AppErrorException extends Exception
public interface SB1 extends EJBObject
public String getMemono(String sysID, String rptKind, String parentMemono)
throws RemoteException, AppErrorException;
public class SB1Bean implements SessionBean
public String getMemono(String sysID, String rptKind, String parentMemono)
throws RemoteException, AppErrorException
throw new AppErrorException("Error in getMemono");
public class SB1TestClient
try
memomo= sb1.getMemono(.....);
catch(AppErrorException ae)
ae.printStackTrace();
I found a bug.
If SB1.getMemono() throws the AppErrorException, but SB1TestClient will not catch any Exception.
It is not normal!!!!
[cf]
But If I convert "public String getMemono(...)" into "public void getMemono(...)",
When SB1.getMemono() throws the AppErrorException, but SB1TestClient will catch any Exception.
It is normal.

getMemono(.......)'s code as follow:
public String getMemono(String sysID, String rptKind, String parentMemono)
throws AppErrorException
log("getMemono("+sysID+", "+rptKind+", "+parentMemono+")");
Connection connection= null;
CallableStatement statement = null;
String memono= "";
short retCode= -1;
String retMsg= "";
try
String sql= this.CALL_SPGETMEMONO;
connection = ResourceAssistant.getDBConnectionLocal("awmsDS");
statement= connection.prepareCall(sql);
statement.setString(1, sysID.trim());
statement.setString(2, rptKind.trim());
statement.setString(3, parentMemono.trim());
statement.registerOutParameter(4, java.sql.Types.VARCHAR);
statement.registerOutParameter(5, java.sql.Types.SMALLINT);
statement.registerOutParameter(6, java.sql.Types.VARCHAR);
statement.executeQuery();
retCode= statement.getShort(5);
retMsg= statement.getString(6);
log("retCode="+retCode);
log("retMsg="+retMsg);
if (retCode==AppConfig.SHORT_SP_RETCODE_FAILED)
log("retCode==AppConfig.SHORT_SP_RETCODE_FAILED");
this.sessionContext.setRollbackOnly();
throw new AppErrorException(retMsg);
memono= statement.getString(4);
log("memono="+memono);
if (rptKind.trim().length()<6)
log("rptKind.trim().length()<6");
this.sessionContext.setRollbackOnly();
throw new AppErrorException("rptKind.trim().length()<6");
memono= "SS";
catch (AppErrorException ae)
log("catch(AppErrorException ae)");
throw ae;
//throw new EJBException(ae.getErrMsg());
catch (Exception e)
log("catch (Exception e)");
this.sessionContext.setRollbackOnly();
throw new AppErrorException(IExceptionConst.ERR_MSG_SYSMEMONO_00000, e.toString());
//throw new EJBException(IExceptionConst.ERR_MSG_SYSMEMONO_00000+", "+e.toString());
finally
log("this.sessionContext.getRollbackOnly()="+this.sessionContext.getRollbackOnly());
ResourceAssistant.cleanup(connection,statement);
return memono;

Similar Messages

  • Get method return value

    Hi. We're using bytecode instrumentation in a native jvmti agent to monitor method entry/exit. I'd like to capture method return values and report them upon method exit. I see how to obtain local variables, and am indeed doing this when a method is entered; however, I'm not sure how to get a method's return value.
    Thanks for any advice.
    -- david

    You will need to do two things to make this work:
    1) Change the method that your return instrumentation calls to accept a parameter (the return value).
    2) Modify your bytecode instrumentation to call your new function with the return value.

  • Client/server RMI app using Command pattern: return values and exceptions

    I'm developing a client/server java app via RMI. Actually I'm using the cajo framework overtop RMI (any cajo devs/users here?). Anyways, there is a lot of functionality the server needs to expose, all of which is split and encapsulated in manager-type classes that the server has access to. I get the feeling though that bad things will happen to me in my sleep if I just expose instances of the managers, and I really don't like the idea of writing 24682763845 methods that the server needs to individually expose, so instead I'm using the Command pattern (writing 24682763845 individual MyCommand classes is only slightly better). I haven't used the command pattern since school, so maybe I'm missing something, but I'm finding it to be messy. Here's the setup: I've got a public abstract Command which holds information about which user is attempting to execute the command, and when, and lots of public MyCommands extending Command, each with a mandatory execute() method which does the actual dirty work of talking to the model-functionality managers. The server has a command invoker executeCommand(Command cmd) which checks the authenticity of the user prior to executing the command.
    What I'm interested in is return values and exceptions. I'm not sure if these things really fit in with a true command pattern in general, but it sure would be nice to have return values and exceptions, even if only for the sake of error detection.
    First, return values. I'd like each Command to return a result, even if it's just boolean true if nothing went wrong, so in my Command class I have a private Object result with a protected setter, public getter. The idea is, in the execute() method, after doing what needs to be done, setResult(someResult) is called. The invoker on the server, after running acommand.execute() eventually returns acommand.getResult(), which of course is casted by the client into whatever it should be. I don't see a way to do this using generics though, because I don't see a way to have the invoker's return value as anything other than Object. Suggestions? All this means is, if the client were sending a GetUserCommand cmd I'd have to cast like User user = (User)server.executeCommand(cmd), or sending an AssignWidgetToGroup cmd I'd have to cast like Boolean result = (Boolean)server.executeCommand(cmd). I guess that's not too bad, but can this be done better?
    Second, exceptions. I can have the Command's execute() method throw Exception, and the server's invoker method can in turn throw that Exception. Problem is, with a try/catch on the client side, using RMI (or is this just a product of cajo?) ensures that any exception thrown by a remote method will come back as a java.lang.reflect.InvocationTargetException. So for example, if in MyCommand.execute() I throw new MySpecialException, the server's command invoker method will in turn throw the same exception, however the try/catch on the client side will catch InvocationTargetException e. If I do e.getCause().printStackTrace(), THERE be my precious MySpecialException. But how do I catch it? Can it be caught? Nested try/catch won't work, because I can't re-throw the cause of the original exception. For now, instead of throwing exceptions the server is simply returning null if things don't go as planned, meaning on the client side I would do something like if ((result = server.executeCommand(cmd)) == null) { /* deal with it */ } else { /* process result, continue normally */ }.
    So using the command pattern, although doing neat things for me like centralizing access to the server via one command-invoking method which avoids exposing a billion others, and making it easy to log who's running what and when, causes me null-checks, casting, and no obvious way of error-catching. I'd be grateful if anyone can share their thoughts/experiences on what I'm trying to do. I'll post some of my code tomorrow to give things more tangible perspective.

    First of all, thanks for taking the time to read, I know it's long.
    Secondly, pardon me, but I don't see how you've understood that I wasn't going to or didn't want to use exceptions, considering half my post is regarding how I can use exceptions in my situation. My love for exception handling transcends time and space, I assure you, that's why I made this thread.
    Also, you've essentially told me "use exceptions", "use exceptions", and "you can't really use exceptions". Having a nested try/catch anytime I want to catch the real exception does indeed sound terribly weak. Just so I'm on the same page though, how can I catch an exception, and throw the cause?
    try {
    catch (Exception e) {
         Throwable t = e.getCause();
         // now what?
    }Actually, nested try/catches everywhere is not happening, which means I'm probably going to ditch cajo unless there's some way to really throw the proper exception. I must say however that cajo has done everything I've needed up until now.
    Anyways, what I'd like to know is...what's really The Right Way (tm) of putting together this kind of client/server app? I've been thinking that perhaps RMI is not the way to go, and I'm wondering if I should be looking into more of a cross-language RPC solution. I definitely do want to neatly decouple the client from server, and the command pattern did seem to do that, but maybe it's not the best solution.
    Thanks again for your response, ejp, and as always any comments and/or suggestions would be greatly appreciated.

  • How to map AM method return values in the bean

    Hello -
    I have this requirement to map AM method return values in the bean as explained below. Please suggest a solution.
    Scenario: I am calling an AM method, which returns a String object on page load.
    AMImpl Method-
    public String getProfileName (){
    return "Profile";
    I wish to catch this retun value in the Bean Variable on page Load. I have created a methodAction biding on page and invokeAction to call this method on Page Load, but I don't know how to catch this value in the bean. Please suggest how to achieve this. Also, I need to achieve this in jsp page. I can't use TaskFlow for this.
    I am using ADF 11g.
    Regards -
    Rohit
    Edited by: Rohit Makkad on Apr 21, 2010 12:23 AM

    Hi, I think there are two ways, from the data control drag n drop the methods return value to the page. This way a binding for that will be created at the page definition eg retVal.
    and in the backing bean you can access it by calling resolveExpression("#{bindings.retVal.inputValue}")
    You can also call your method directly from the backbean
    ((YourAppModuleImpl) getBindings().getDataControl().getApplicationModule()).yourMethod();
    public DCBindingContainer getBindings() {
    return (DCBindingContainer) resolveExpression("#{bindings}");
    I dont know if the second method suits you
    Tilemahos

  • EJB method returns 2D String array

    Hi,
    one of EJB method returns a 2 dimensional array of String. Is it okay? Is this a good EJB programming practice?
    Thanks
    Sabir

    Its ok. but not consdered as best practice now.
    Check out the DTO pattern(previously called value obects from sun's site.
    --Ashwani                                                                                                                                                                                                                                                                       

  • Custom method return value will not pass to form

    I have created a custom method in my application module that returns a integer value. I am trying to use this value to fetch a row to populate a form. I cannot seem to get the value returned to populate the methodAction binding for the form.
    I have no problem displaying the returned value and have no problem populating the form if I hard code a value into the methodAction binding.
    I am trying to determine if this is a timing issue on page load, or some other issue with the returned integer.

    Hi,
    sounds like a lifecycle problem because the method call and execution of the VO iterator happen in the same phase. You can try setting the refresh conditions of the method to prepareModel and the iterator to prepareRender, but I doubt that this will solve the issue.
    What is the usecase ? And can the integer be handled within the AM to restrict the query (e.g. to set a ViewCriteria or bind variable)
    Frank

  • Job scheduling error : The return value was unknown. The process exit code was -1073741819. The step failed.

    I am working in Sqlserver 2008 R2, SSIS 64 bit version
    I am getting the below  error while scheduling the job in the development server  Database. 
    The return value was unknown.  The process exit code was -1073741819.  The step failed.
    The SSIS front end execution runs fine.
    Have anyone  faced this issue before?

    Hi Venkat,
    If you already changed to 64bit and still doesn't work then create proxy account.. 
    To create a proxy account
    In Object Explorer, expand a server.
    Expand SQL Server Agent.
    Right-click Proxies and select New Proxy.
    On the General page of the New Proxy Account dialog, specify the proxy name, credential name, and
    description for the new proxy. Note that you must create a credential first before you create a proxy if one is not already available. For more information about creating a credential, see How
    to: Create a Credential (SQL Server Management Studio) or CREATE CREDENTIAL (Transact-SQL).
    Check the appropriate subsystem for this proxy.
    On the Principals page, add or remove logins or roles to grant or remove access to the proxy account.
    Thanks

  • SQL 2012 - SSIS Error -The step did not generate any output. The return value was unknown. The process exit code was -1073741819. The step failed.

    Hi guys 
     Trying to run this package on SQL 2012 agent  and getting below error . No more details I could find so far.
    The step did not generate any output.  The return value was unknown.  The process exit code was -1073741819.  The step failed.
    About Package - Its connecting to different version (2000,2005,2008,2008R2,2012) servers and putting Jobs information into one Database table.  
    Any workaround or fix ?
    Thanks
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

    New package or one that used to work? Connecting how? How does it poll?
    On the surface it is an error from a memory space of the binary/non-managed code, so nothing can be really concluded based on what you decided to share with us.
    Arthur My Blog
    So Same package is working fine from my local machine which has SQL 2008 R2 and SQL 2012 installed. I am trying to push the package on server which has sql server 2012 Installed . 
    I don't see any error .
    I ran package manually from server using SQL Data tools and ran successfully...
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

  • Can't catch the exception when transaction rollback ,BPEL/SOA 11G,updated!

    Hi Guys ,
    I have two insert/update invoke actions through dbadpter in my BPEL process .
    When I set the GetActiveUnitOfWork property of those two db adapters to true ,it successfully makes the global transaction work . any of them failed will cause the other rollback.
    But the CatchAll brunch can't catch the exception in that case,
    I can only see exception message from the system output :
    02/11/2009 11:36:46 AM oracle.toplink.transaction.AbstractSynchronizationListener beforeCompletion
    WARNING:
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.1.0) (Build 090527)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (Table1_PK) violated
    from BPEL console , you can't even see the error , the process finished with no exception.
    When I set GetActiveUnitOfWork to false, CatchAll brunch is able to catch the exception , but global rollback is not working .
    I try all the other method like set the transaction property of BPEL to required , using checkpoint() in java embedding . it looks like only way is set GetActiveUnitOfWork to true, but can't catch exception.
    Here are some updated:
    Here is my process
    Main Sequence
    Invoke (dbadapter update)
    Invoke (dbadapter insert)
    Global CatchAll
    Invoke(jmsAdapter sendjms)
    if I disable the CatchAll branch , when insert failed , the insert will rollback as well, even GetActiveUnitOfWork set to false.
    enable CatchAll branch , even doing nothing in this branch , the update won't rollback when insert failed. it looks like when catch the exception , bpel seems not rollback , I try to add throw rollback in catchall branch, no any effect.
    any clue ?
    Kevin
    Edited by: kyi on Nov 5, 2009 10:10 AM

    Hi All,
    We are also facing a similar kind of issue.
    We have a simple BPEL which will makes use of JAva embedding to call an end point to check its availibility.
    The Java code for cheking the enpoint connectivity is below
    try{      
    boolean endpointAvailable = false;
    long start = System.currentTimeMillis();
    int endpointTestURL_port = 8445 ;
    int endpointTestURL_timeout = 500;
    String endpointTestURL_queryString = "" ;
    String endpointTestURL_protocol = (String)getVariableData ("endpointProtocol");
    addAuditTrailEntry("endpointTestURL_protocol: " + endpointTestURL_protocol);
    String endpointTestURL_host = (String)getVariableData ("endpointHost");
    addAuditTrailEntry("endpointTestURL_hostl: " + endpointTestURL_host);
    URL endpoint = new URL(endpointTestURL_protocol, endpointTestURL_host, 8445, endpointTestURL_queryString);
    addAuditTrailEntry("endpoint object is created" );
    String endpointTestURL = endpoint.toExternalForm();
    addAuditTrailEntry("Checking availability of endpoint at URL: " + endpointTestURL);
    // Configure connection
    HttpURLConnection connection = (HttpURLConnection)endpoint.openConnection();
    connection.setRequestMethod("GET");
    addAuditTrailEntry("The Method is Get");
    connection.setConnectTimeout(5000);
    addAuditTrailEntry("Timeout is 500 ms");
    // Open connection
    connection.connect();
    addAuditTrailEntry("Open Connection");
    String responseMessage = connection.getResponseMessage();
    addAuditTrailEntry("Recieved availability response from endpoint as: " + responseMessage);
    // Close connection
    connection.disconnect();
    endpointAvailable = true;
    if (endpointAvailable)
    setVariableData("crmIsAvailable", "true");
    else
    setVariableData("crmIsAvailable", "false");
    catch(Exception e)
    System.out.println ("Error in checking endpoint availability " + e) ;
    addAuditTrailEntry("error message is : " +e);         
    When we run the above as a seperate java program it runs fine i.e goes to the catch block and catches the exception.
    But when we run it within the java embedding in BPEL(11G) it gives us the follwoing error.
    The reason was The execution of this instance "490001" for process "default/GMDSSalesLeadsBackMediationInterface!1.0*soa_e1a6362f-c148-417c-819c-9327017ebfa4" is supposed to be in an active jta transaction, the current transaction status is "ROLLEDBACK" .
    Consult the system administrator regarding this error.
         at com.oracle.bpel.client.util.TransactionUtils.throwExceptionIfTxnNotActive(TransactionUtils.java:119)
         at com.collaxa.cube.engine.CubeEngine.store(CubeEngine.java:4055)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4372)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4281)
         at com.collaxa.cube.engine.CubeEngine._createAndInvoke(CubeEngine.java:713)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:545)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:654)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:355)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
         at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:88)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.wls.JpsWeblogicEjbInterceptor.runJaasMode(JpsWeblogicEjbInterceptor.java:61)
         at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:106)
         at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:106)
         at sun.reflect.GeneratedMethodAccessor960.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInte
    we also get
    BEA1-108EA2A88DAF381957FF
    weblogic.transaction.internal.TimedOutException: Transaction timed out after 301 seconds
    BEA1-108EA2A88DAF381957FF
         at weblogic.transaction.internal.ServerTransactionImpl.wakeUp(ServerTransactionImpl.java:1733)
         at weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(ServerTransactionManagerImpl.java:1578)
         at weblogic.transaction.internal.TransactionManagerImpl.wakeUp(TransactionManagerImpl.java:1900)
         at weblogic.transaction.internal.ServerTransactionManagerImpl.wakeUp(ServerTransactionManagerImpl.java:1488)
         at weblogic.transaction.internal.WLSTimer.timerExpired(WLSTimer.java:35)
         at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    javax.ejb.EJBException: Transaction Rolledback.: weblogic.transaction.internal.TimedOutException: Transaction timed out after 301 seconds
    BEA1-108EA2A88DAF381957FF
    We tried the following
    Increase the JTA timeout in the EM console to a larger value like 600 secs.
    The BPEL instance is not getting created.
    Any help would be appreciated
    Thanks
    Lalit

  • Urgent: How can I catch the exception when application exit by accident

    Can anyone give me advice and idea?
    I want to catch the exception when application goes down by accident for example: Power off, turn off the machine without closing the appliction properly.
    Because I want to notify the server and remove it from register.
    How can I do this????
    Please help,
    Thanks very mich,
    Peter

    Shrubz,
    I tested my application as follows:
    1. start rmiregistry
    2. start rmi server
    3. start two clients
    I printed out the client's object information as below:
    first clinet:
    RemoteObserver is com.ss8.qos.qcsm.policy.policyui.PanelMain_Stub[RemoteStub [ref: [endpoint:[192.168.70.237:4706](remote),objID:[-73a6662b:e75af455a5:-8000, 0]]]]
    second client:
    RemoteObserver is com.ss8.qos.qcsm.policy.policyui.PanelMain_Stub[RemoteStub [ref: [endpoint:[192.168.70.237:4711](remote),objID:[-73a6665a:e75af48703:-8000, 0]]]]
    Now I stop the second client by clicking ^C (ctrl c)
    I noticed that this client has not been removed from the server register (Vector).
    next, I am working on first client for example add one record. After server received this record, it will update all clients who have already registered with server. Because now in the server register there are two clinets (first and second), so it will try to update two clients. The exception will be thrown when server tries to update second client which has already been stoped. I used printStackTrace() to print out the message as follow:
    Catch ConnectException
    Connection refused to host: 192.168.70.237; nested exception is:
         java.net.ConnectException: Connection refused: no further information
    java.rmi.ConnectException: Connection refused to host: 192.168.70.237; nested exception is:
         java.net.ConnectException: Connection refused: no further information
    java.net.ConnectException: Connection refused: no further information
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
         at java.net.Socket.<init>(Socket.java:269)
         at java.net.Socket.<init>(Socket.java:98)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:29)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:124)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:497)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:194)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:178)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:87)
         at com.ss8.qos.qcsm.policy.policyui.PanelMain_Stub.update(PanelMain_Stub.java:53)
         at com.ss8.qos.qcsm.policy.policydb.Observable.performNotify(Observable.java, Compiled Code)
         at com.ss8.qos.qcsm.policy.policydb.Observable.notifyObservers(Observable.java:71)
         at com.ss8.qos.qcsm.policy.policydb.PolicyServer.ServerAddPolicy(PolicyServer.java:102)
         at java.lang.reflect.Method.invoke(Native Method)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:237)
         at sun.rmi.transport.Transport$1.run(Transport.java:140)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:137)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:422)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:634)
         at java.lang.Thread.run(Thread.java:479)
    *** end here ***
    I don't see any information related to object ID. How can I handle this?
    Please give me suggestion.
    Many Thanks,
    Peter

  • How can I catch the exception type c = type i?

    How can I catch the exception and display the error message when I assign the u2018ABC123u2019 value to an int data type.
    Code is as follow.
    REPORT  zfsl_sum_functions.
    DATA: cin(50),
          cout(50),
          iin TYPE i,
          iout TYPE i,
          etext TYPE string.
    cin = '123ABC'.     " how can i catch this
    iout = cin.
    WRITE: iout.

    The CATCH-ENDCATCH statement is obsolete as of release was620. You should use TRY. CATCH. ENDCATCH.
    The exception that will be raise is CX_SY_CONVERSION_NO_NUMBER, so you have to catch that exception or a super class of this exception class.
    REPORT zfsl_sum_functions.
    DATA: cin(50),
    cout(50),
    iin TYPE i,
    iout TYPE i,
    etext TYPE string.
    DATA: rf_cx_error TYPE REF TO CX_SY_CONVERSION_NO_NUMBER,
            errortxt TYPE string.
    TRY.
        cin = '123ABC'. " how can i catch this
        iout = cin.
        WRITE: iout.
      CATCH CX_SY_CONVERSION_NO_NUMBER INTO  rf_cx_error.
        errortxt = rf_cx_error->get_text( ).
        WRITE errortxt.
    ENDTRY.

  • 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

  • Catching the exception thrown in a java class on a JSP front end

    I have a web service created in JAVA.. The modules throw certain exceptions and i am having auto generated JSP created from the WSDL's , which i can obviously edit. i want to catch these exceptions in this JSP page.. Any clue how to do this?
    Thanks.

    Nee333 wrote:
    I have a web service created in JAVA.. The modules throw certain exceptions and i am having auto generated JSP created from the WSDL's , which i can obviously edit. i want to catch these exceptions in this JSP page.. Any clue how to do this? It is not possible to catch the Exception in a JSP. You can however put any logging or even an if statement into your JSP to display the error or control the flow based on the error.

  • Catch the exception thrown when database is not available in web.xml

    Hi,
    I have an app that uses a mysql database configured in the web.xml configuration file - a javax.servlet.jsp.jstl.sql.dataSource param
    There have been occasions where that server has been down, and this causes the expected error stack trace to be dumped to the jsp page
    Is there anywhere I can catch that exception in the jsp page, so the end user does not see that nasty error?
    Thanks,
    Tom

    You have answered your own question, catch the exception with a try catch block !!
    try
    // doing something stupid
    catch (Exception exception)
    out.println("sorry user, you did something really stupid");
    // it is acceptable to do nothing here if you dont want to handle the
    // error or output a message
    }

  • Return code (SY-SUBRC) for the EXCEPTION will not be processed

    Hi,
    when I was doing the EPC check i have approached this messgae.
    Return code (SY-SUBRC) for the EXCEPTION will not be processed after CALL FUNCTION
    'CU_READ_RGDIR'
    (You can turn off this check by setting all EXCEPTIONS to 0)
    (The message can be hidden with "#EC *)
    Any pointers on how to handle this.
    Regards
    Rohini.

    Hi Rohini,
    Try doing something like this.
    TYPE-POOLS: hrpay.
    DATA: w_pernr              TYPE          p0000-pernr ,
          w_buffer             TYPE          hrpay_buffer,
          w_no_authority_check TYPE          xfeld       ,
          w_molga              TYPE          t500l-molga ,
          t_in_rgdir           TYPE TABLE OF pc261.
    CALL FUNCTION 'CU_READ_RGDIR'
      EXPORTING
        persnr             = w_pernr
        buffer             = w_buffer
        no_authority_check = w_no_authority_check
      IMPORTING
        molga              = w_molga
      TABLES
        in_rgdir           = t_in_rgdir
      EXCEPTIONS
        OTHERS             = 0.

Maybe you are looking for

  • Potential Windows Update database error detected 0x80070490

    This is the response I get when I run the Windows update troubleshooter from the Windows 8.1 Action Center.  If I click next it reports the errors have been fixed.  However if I run it again it reports exactly the same errors. After searching the Int

  • Basics on using Adobe Flash Player

    I'm trying to get a better understanding of some of the basics concerning Adobe Flash Player.  I'm developing a web page with some third party software and have been provided with an HTML file to add to the site.  If I try to launch the HTML file eit

  • Adding pictures into an Array?

    The following is a BlackJack Program my group and I made. So far, it seems to work and would likely net us a 100% when we hand it in. However, we wish to go that extra mile and add pictures, cards in particular, something that should obviously be in

  • Battery overheating

    Hi everybody! I don't know if it happen to somebody else, but since a couple of days by battery started to be the reason of my MBP overheating... well, until a week ago my laptop was always between 49 and 54 degrees, but since a couple of days it goe

  • Change the Locale settings when scheduling the report with an Excel format?

    Hi, My reports have been scheduled with Excel format, however, when the report is viewed in Excel, the date fields are in the format "mm/dd/yyyy" i.e. English(United States) and they need to be in the format "dd/mm/yyyy" i.e. English (Ireland). I am