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.

Similar Messages

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

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

  • 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

  • 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

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

  • I am facing a problem while deploying an Entity bean in iPlanet(sp3).I have attached the exception thrown.Why has this exception occured?

    [04/Dec/2001 10:54:00:2] error: EBFP-marshal_internal: internal exception caught in kcp skeleton, ex
    ception = java.lang.NullPointerException
    [04/Dec/2001 10:54:00:2] error: Exception Stack Trace:
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown Source)
    at com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unknown Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
    at samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.findByPrimaryKey(
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__samples_test_ejb_En
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp_stub_TestEnt
    ityHome.java:338)
    at samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_TestEntityHome.
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)

    Hi,
    I think you are trying to test the Hello world EJB example shipped with the product. As a first
    step I would recomend you to go through every line of the document on deploying this application,
    since, I too have experienced many errors while trying to deploy the sample applications, but on
    following the documentation, I subsequently overcame all the errors and have been working with the
    applications. So please follow the steps in documentation and let me know, if you still encounter any
    issues.
    Regards
    Raj
    Sandhya S wrote:
    I am facing a problem while deploying an Entity bean in iPlanet(sp3).I
    have attached the exception thrown.Why has this exception occured?
    [04/Dec/2001 10:54:00:2] error: EBFP-marshal_internal: internal
    exception caught in kcp skeleton, ex
    ception = java.lang.NullPointerException
    [04/Dec/2001 10:54:00:2] error: Exception Stack Trace:
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at
    com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown
    Source)
    at
    samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.findByPrimaryKey(
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at
    samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__samples_test_ejb_En
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp_stub_TestEnt
    ityHome.java:338)
    at
    samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_TestEntityHome.
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • 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

  • How to  get the profile object in simple java class  (Property accessor)

    Hi All,
    Please guide me how to get the profile object in simple java class (Property accessor) which is extending the RepositoryPropertyDescriptor.
    I have one requirement where i need the profile object i.e i have store id which is tied to profile .so i need the profile object in the property accessor of the SKU item descriptor property, which is extending RepositoryPropertyDescriptor.
    a.I dont have request object also to do request.resolvename.
    b.It is not a component to create setter and getter.It is simple java class which is extending the RepositoryPropertyDescriptor.
    Advance Thanks.

    Iam afraid you might run into synchronization issues with it. You are trying to get/set value of property of a sku repository item that is shared across various profiles.
    Say one profile A called setPropertyValue("propertyName", value).Now another profile B accesses
    getPropertyValue() {
    super.getPropertyValue() // Chance of getting value set by Profile A.
    // Perform logic
    There is a chance that profile B getting the value set by Profile A and hence inconsistency.
    How about doing this way??
    Create PropertyDescriptor in Profile (i.e user item descriptor), pass the attribute CustomCatalogTools in userProfile.xml to that property.
    <attribute name="catalogTools" value="atg.commerce.catalog.CustomCatalogTools"/>
    getPropertyValue()
    //You have Profile item descriptor and also storeId property value.
    // Use CustomCatalogTools.findSku();
    // Use storeId, profile repository item, sku repository item to perform the logic
    Here user itemdescriptor getPropertyValue/setPropertyValue is always called by same profile and there is consistency.
    -karthik

  • The exception, which is assigned to class 'CX_SY_RANGE_OUT_OF_BOUNDS'

    Bom dia pessoal.
    Gostaria de saber se alguem já passou pelo o problema abaixo.?
    No ambiente de produção ao se criar um nota fiscal pela a J1B1N e ao começar a digitar alguns itens o sistema gerar o seguinte DUMP.
    Versão: SAP ECC 6.0
    The exception, which is assigned to class 'CX_SY_RANGE_OUT_OF_BOUNDS', was no
    caught in procedure "CHECK_NFENUM_NUMERIC" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated.
    The reason for the exception is:
    In the executed program "SAPLJ1BB2", the system attempted to access the field "J_1BDYDOC-NFENUM" using the length 0.
    However, a partial field access with the length specification 0 is not allowed.
    Já analisei o forum abaixo e verifiquei na tabela J_1BAMV e não esta para o Field Group 77 como Display.
    A minha duvida é a seguinte realmente deve estar como Display ou existe uma nota da SAP a ser aplicada para resolver tal DUMP.?
    Att;
    Ângelo Junior
    Edited by: Angelo Marinho Teixeira Junior on May 6, 2011 6:04 PM

    Bom dia Angelo,
    O detalhe não é só direção (entrada/saída), mas emissão (sua ou de terceiro).
    Podemos emitir uma nota de entrada em nome de terceiro, neste caso é o ERP que deve numerar e enviar ao GRC/Sefaz... Sendo emissão de terceiro (saída ou entrada) é apenas para registro, basicamente esta a diferença.
    Atenciosamente, Fernando Da Ró

  • Unable to import a java class in a jsp file

    Hi,
    I am trying to import a java class in my jsp.
    ------------------jsp---------------
    <jsp:useBean id="form" class="com.company.portlets.searchApps.object.SearchOBJ" scope="request" />
    <jsp:setProperty name="form" property="*" />
    <input type="TEXT" name="projectID" value='<%= form.getProjectID() %>'>
    When I run the above JSP, it says that class 'com.company.portlets.searchApps.object.SearchOBJ' cannot be found.
    Why?
    My project structure looks like this:
    Project
    +Application Sources
    ++com.company.portlets.searchApps.object
    +++SearchOBJ.java
    +Web Content
    ++htdocs
    +++searchappsportlet
    ++++SearchAppsPortletShowPage.jsp
    ++WEB-INF
    +++index.jsp
    +Resources
    ++SearchApps.deploy
    Please advice...thanks!

    The way that JDeveloper organized the files was like this:
    C:\jdev1012\jdev\mywork\WksSearchApps\Project\classes\com\company\portlets\searchAPPS\object\SearchOBJ.class
    I am assuming that JDeveloper puts the file where they are suppose to be...if not, how do I change that?
    thanks,
    hussain

  • Write and read txt files and catch the exceptions

    hey everyone, im in a bit of a bind. im trying to set up this try catch statement. here is what i have for code so far.
    import java.util.Scanner;
    import java.io.*;
    public class Warning
        //   Reads student data (name, semester hours, quality points) from a
        //   text file, computes the GPA, then writes data to another file
        //   if the student is placed on academic warning.
        public static void main (String[] args)
         int creditHrs;         // number of semester hours earned
         double qualityPts;     // number of quality points earned
         double gpa;            // grade point (quality point) average
         String line, name, inputName = "students.dat";
         String outputName = "warning.dat";
         try
              Scanner FileScan1 = new Scanner (new File("students.dat"));
              // Set up scanner to input file
              // Set up the output file stream
              // Print a header to the output file
              outFile.println ();
              outFile.println ("Students on Academic Warning");
              outFile.println ();
              // Process the input file, one token at a time
              while (FileScan1.hasNext())//there is another line...
                  {               // Get the credit hours and quality points and
                   // determine if the student is on warning. If so,
                   // write the student data to the output file.
              // Close output file
         catch (FileNotFoundException exception)
              System.out.println ("The file " + inputName + " was not found.");
         catch (IOException exception)
              System.out.println (exception);
         catch (NumberFormatException e)
              System.out.println ("Format error in input file: " + e);
    }I am pretty sure the layout is good to go, but first and foremost that try statement is hanging me up. Could someone give me some suggestions about how i should set this up.
    i want to read in this students.dat file, then output another file called warning.dat.
    Thanks i really appreicate the help.

    no, i was really hoping to just see if the way it is
    set up it will be doable, that way i wouldn't be
    working on code that was impossiable to sort through
    properlyFair enough.
    One thing I'd suggest is that if you're really basically only going to be printing the exceptions, and since that is the top-level method (main) --
    I'd instead just add some "throws" clauses to main, get rid of the try/catch stuff, and just let the VM handle the exceptions for you. It will print them, just like you're doing, except that it will also print the stack traces, which you are not doing.
    If you're going to handle exceptions, it's better to actually do something about them rather than just print them - otherwise you might just as well let the runtime do that for you.

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

  • Error -  The exception, which is assigned to class 'CX_WDR_RT_EXCEPTION'

    Hi All,
    I get the following error when getting parameters from HTML Form to ABAP Webdynpro Application.
    Short text                                                                               
    An exception occurred that was not caught.  
    What happened?                                                                               
    The exception 'CX_WDR_RT_EXCEPTION' was raised, but it was not caught anywhere               
        along the call hierarchy.                                                         
       Since exceptions represent error situations and this error was not adequately responded to, the running ABAP program 'CL_WDR_CLIENT_APPLICATION=====CP' has to be terminated. 
    Source Code Extract                                                                               |
    Line
    SourceCde
    36
    if <url_param>-name np 'sap-*' and
    37
    <url_param>-name np 'sap.*' and
    38
           <url_param>-name ns '~' and
    39
    <url_param>-name np 'wd*'.
    40
    wa_url_param-name = <url_param>-name.
    41
    translate wa_url_param-name to upper case.        "#EC SYNTCHAR
    42
    wa_url_param-value = <url_param>-value.
    43
    insert wa_url_param into table <all_url_params>.
    44
    endif.
    45
    endloop.
    46
    endif.
    47
    wa-name = if_wd_application=>all_url_parameters.
    48
    wa-value = l_all_url_params.
    49
    insert wa into table parameters.
    50
    51
    l_parameters = view_info->get_parameters_for_inplug( inbound_plug ).
    52
    transfer all provided parameters for component if they have been defined in RR
    53
    loop at l_parameters assigning <parameter>.
    54
    wa-name = <parameter>-parameter_name.
    55
    l_parameter = wa-name.
    56
    clear wa-value.
    57
    *-------read url parameters
    58
    read table <all_url_params> assigning <tihttpnvp> with key name = l_parameter.
    59
    if sy-subrc = 0.
    60
    try.
    61
    create data wa-value type (<parameter>-abap_type).
    62
    assign wa-value->* to <f>.
    63
    cl_wdr_conversion_utils=>from_string( exporting in   = <tihttpnvp>-value
    64
    changing  data = <f> ).
    65
    catch cx_wdr_conversion_exception.
    >>>>>
    raise exception type cx_wdr_rt_exception.
    67
    endtry.
    68
    insert wa into table parameters[].
    69
    else.
    70
    *-------parameter not specified in url => read application properties
    71
    l_app_properties = me->application_info->get_properties( ).
    72
    read table l_app_properties into wa_property
    73
    with key name = wa-name.
    74
    if sy-subrc = 0.
    75
    try.
    76
    create data wa-value type (<parameter>-abap_type).
    77
    assign wa-value->* to <f>.
    78
    cl_wdr_conversion_utils=>from_string( exporting in   = wa_property-value
    79
    changing  data = <f> ).
    80
    catch cx_wdr_conversion_exception.
    81
    raise exception type cx_wdr_rt_exception.
    82
    endtry.
    83
    insert wa into table parameters[].
    84
    endif.
    85
    endif.
    Any help will be greatly appreciated.
    Thanks
    RM

    It appears that you are using some URL parameters.  You must have supplied a field to hold one of these URL parameters, but the data type is not compatible with the incomming data.  I would suggest setting an external breakpoint in this block of code to determine which URL parameter is causing your problem.

  • Unable to catch the exceptions caused by '|', '"' and '~' symbol in the URL

    I have a VB.net website with .Net framework version 1.1.
    I am able to catch all the exceptions and redirect to Custom error screen.
    However if I enter the invalid characters in URL specifically  '|', '"' and '~' it throws "ArgumentException" with message as "?" and not able to redirect this to Custom error screen.
    All other invalid characters and symbols are being handled properly. Custom error screen is set in WEB.config and it is working for all the exceptions.
    Please help me find a way to catch and redirect this exception to Custom error screen.

    Hello Mr. Monkeyboy,
    One of the security solutions ran a security test by entering the wrong characters in the URL (Few more cases) and there by finding if the site redirects to Custom webpage in case of errors and exceptions or not.
    Our site is redirecting to Custom error page for all the errors and exceptions except when entered '|','"' or '`' in the url.
    Example: If I enter: https://www.somesite.com/NotExists.aspx this get redirected to Custom error screen.
    However If I enter https:////www.somesite.com/NotExi|sts.aspx this goes to Server Error in "/somesite" page.
    Please note, both the URL is invalid, however one redirects to Custom error where another doesn't.
    Thanks for letting me know the lack of clarity in the initial question, hope I made it clear.
    I still don't understand the issue. And you should probably be posting the question in one of the ASP.Net forums which I provided a link to in my original post.
    You say you enter a URL in your website. But you make no mention of how that is done. Therefore even if you post a question in one of the ASP.Net forums you will need to explain what you mean by entering a URL in your Website.
    For example. "We have a website. A user can browse to the website with a WebBrowser. Then in a textbox on the website they can enter a URL (for whatever reason your website would allow a user browsing your website with a webbrowser to want to enter
    some URL for some reason into a textbox at your website) and select a button (to do who knows what) and we need to validate the URL does not contain invalid characters."
    Maybe these links can help or not.
    Validator.Url Method
    PathIsURL function
    Pinvoke.Net - pathisurl (shlwapi)
    Uri.TryCreate Method
    I suppose you could even use Regex to validate a URL based on Regex patterns that you should be able to find on the net for doing so with Visual Basic. But I would suppose you would want to provide whoever is placing invalid URL's on the website with the
    result displaying the invalid URL and which characters within it are invalid maybe.
    I suspect you could even try to validate a URL with a DNS by finding out if it exists or not.
    La vida loca

Maybe you are looking for

  • How to save my Mac's data/files

    Okay I really hope this doesn't end up being a rant but here goes. I was just using my Macbook Pro one day, like normal, when it decided to freeze up. This happens occasionally so I just held the power button and tried restarting the computer. Howeve

  • Where did my pro go?

    I ordered and paid for QT Pro a little over a year ago. Since, I have used it to edit several videos w/o a problem. BUT recently when I load QT, I can not access the PRO settings. I try to re-register but do not know where to find the reg. key. It is

  • ** How to get Source File Name thru XSLT Mapping

    Hi friends, We require source file name after message processing (SXMB_MONI) in the output structure.  We understad from Forums and  blog 2664, this is possible thru UDF - DynamicConfiguration class. This UDF will work if we use message mapping. But,

  • Displaying Charts Without Flash

    Is there an alternative to displaying charts in Flash or SVG format? I need to create unique 6 dynamic charts on one page... and HTML only offer Bar Charts. Is there a way to custom code pie, line, and stacked bar graphs in HTML or some other tool? T

  • Problem installing Photoshop update 13.0.1.3

    I tried to install the update with Adobe Updater and it failed with error code U44M1P7. I then downloaded the update patcht directly from the site and tried to install. Again error code this time U44M2P7. First time ever I experience problem with upd