Java Exception framework

Please help me out to design better exception handling framework.

I normally implement something like the following:
interface IException {
   public boolean hasCause();
   public Throwable getCause();
   public void printStackTrace();
abstract public class AbstractException extends Exception
implements IException {
   final private Throwable cause;
   protected AbstractException(final String message) {
      this(message, null);
   protected AbstractException(final String message, final Throwable cause) {
       super(message);
       this.cause = cause;
    final public boolean hasCause() {
         return (cause != null);
    final public Throwable getCause() {
         return cause;
    final public void printStackTrace() {
          super.printStackTrace();
          if (hasCause())
               cause.printStackTrace();
}In additon to AbstractException, I also create AbstractError (extending Error) and AbstractWarning (extending Exception). When I receive an AbstractError, this indicates a non-recoverable situation. Failure to connect to database, inability to read XML config file, etc. When I receive an AbstractWarning, the servlet or front controller prompts the user to recover from a given situation. Invalid user input, missing field, etc. AbstractException encapsulates business rule violations.
By creating three separate 'flavors' of exceptions, you can substantially reduce the number of exception processing areas in your application. Normally, I allow AbstractError and AbstractWarning to propogate all the way to the servlet controller and then display a message to the user in a common way. AbstractException, for business exceptions, are sometimes handled in the domain model and other times I allow them to propogate up to the servlet controller.
- Saish

Similar Messages

  • Java Exception handling framework

    Please suggest some frameworks for Java Exception handling

    http://java.sun.com/docs/books/tutorial/essential/exceptions/
    http://forum.java.sun.com/thread.jsp?forum=31&thread=173005
    http://www.tfh-berlin.de/~knabe/java/multex/
    http://www.impetus.com/comp_jeh.htm
    http://www.softwaresummit.com/1998/1998/speakers/haggar.htm

  • Can Forte' IIOP Client catch Java exceptions?

    Hi all,
    we are using Forte' IIOP features in IDL Mode, to integrate a Forte' client
    and a Java server.
    Our configuration is:
    - java jdk 1.1.5
    - Visigenic VIsibroker 3.1 for Java ORB
    - Forte' 3.0.G
    Is it possible for the Forte' client to catch a Java exception?
    We tried to define an IDL file based on our Java server:
    module querye
    interface QueryClass
    exception MiaSQLException{};
    string EseguiQuery(in string query_string) raises
    (MiaSQLException);
    Using forte' corbagen utility we generated the forte' .pex file:
    begin TOOL querye;
    forward QueryClass;
    class QueryClass inherits from Framework.Object
    class MiaSQLException inherits from FrameWork.GenericException
    end class;
    has public method EseguiQuery(
    input query_string : string
    ) : string;
    has property
    distributed=(allow=on, override=on, default=on);
    end class;
    method QueryClass.EseguiQuery(
    input query_string : string
    ) : string
    begin
    end method;
    end querye;
    We we tried to import the .pex file in the forte' repository, forte' raise
    a Syntax Error.
    Any idea?
    TIA
    Giuseppe Sorce
    CSI Piemonte - C.so Unione Sovietica 216 - 10134 Torino - ITALY
    tel. +39-011-3168736
    fax +39-011-3168212
    e-mail [email protected]
    url http://www.csi.it
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    I am trying to get Forte to communicate with Orbix (not the web
    version) via IIOP. Right now I am trying to set up an Orbix C++
    server with Forte being the client. Eventually I will need to
    communicate the other way (Forte being the server -- I need to do
    both). Right now I cannot get Forte to connect to the server. Any
    suggestions would be appreciated.
    Thanks in advance,
    Dale Boan
    Details
    I am running Forte on an NT machine and the Orbix server under HP-UX.
    Under NT, I am using Forte 3.0.F.2 with IIOP enabled (I think - it
    shows up in the partition GUI).Which version of Orbix are you using? I believe 2.3c is required. At least I
    know that Forte has successfully called Orbix services using 2.3c.
    - Coty

  • Can not print with jdeveloper because of java exception!

    Hi Gurus!
    I've installed jdeveloper 11 on Fedora 8 Linux. See the installationparameters below:
    JDEV_HOME=/usr/local/bin/middleware/jdeveloper
    PATH=$PATH:$JDEV_HOME/jdev/bin:/usr/local/bin/middleware/jdk160_05/bin
    JAVA_HOME=/usr/local/bin/middleware/jdk160_05/binThe installation completes successfully. After installation I've started jdeveloper. It throws the following java exception at startup but it starts.
    Locking assertion failure.  Backtrace:
    #0 /usr/lib/libxcb-xlib.so.0 [0xd6c777]
    #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xd6c8d1]
    #2 /usr/lib/libX11.so.6(_XReply+0xff) [0xb8e12f]
    #3 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/xawt/libmawt.so [0x853018ce]
    #4 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/xawt/libmawt.so [0x852de067]
    #5 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/xawt/libmawt.so [0x852de318]
    #6 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0x852de61f]
    #7 [0xb5f2ce9d]
    #8 [0xb5f25edd]
    #9 [0xb5f25edd]
    #10 [0xb5f23249]
    #11 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/client/libjvm.so [0x621c40d]
    #12 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/client/libjvm.so [0x6310378]
    #13 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/client/libjvm.so [0x621c2a0]
    #14 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x363) [0x6272153]
    #15 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb7f3e96d]
    #16 [0xb5f2ce9d]
    #17 [0xb5f25d77]
    #18 [0xb5f23249]
    #19 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/client/libjvm.so [0x621c40d]
    Locking assertion failure.  Backtrace:
    #0 /usr/lib/libxcb-xlib.so.0 [0xd6c777]
    #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xd6c83e]
    #2 /usr/lib/libX11.so.6 [0xb8d168]
    #3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0xb83d36]
    #4 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/xawt/libmawt.so [0x852dd319]
    #5 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/xawt/libmawt.so [0x852dd565]
    #6 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/xawt/libmawt.so [0x852de3c9]
    #7 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0x852de61f]
    #8 [0xb5f2ce9d]
    #9 [0xb5f25edd]
    #10 [0xb5f25edd]
    #11 [0xb5f23249]
    #12 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/client/libjvm.so [0x621c40d]
    #13 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/client/libjvm.so [0x6310378]
    #14 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/client/libjvm.so [0x621c2a0]
    #15 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x363) [0x6272153]
    #16 /usr/local/bin/middleware/jdk160_05/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb7f3e96d]
    #17 [0xb5f2ce9d]
    #18 [0xb5f25d77]
    #19 [0xb5f23249]The real mess starts if I want to print something. If I click on File -> Print then jdeveloper throws the following java exception:
    java.lang.NullPointerException: null attribute
            at sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1147)
            at sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2121)
            at sun.print.ServiceDialog$PageSetupPanel.updateInfo(ServiceDialog.java:1263)
            at sun.print.ServiceDialog.updatePanels(ServiceDialog.java:437)
            at sun.print.ServiceDialog.initPrintDialog(ServiceDialog.java:195)
            at sun.print.ServiceDialog.<init>(ServiceDialog.java:124)
            at javax.print.ServiceUI.printDialog(ServiceUI.java:188)
            at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:856)
            at ilog.views.util.print.IlvPrintUtil14.e(Unknown Source)
            at ilog.views.util.print.IlvPrintUtil.c(Unknown Source)
            at ilog.views.util.print.IlvPrintingController.printDialog(Unknown Source)
            at ilog.views.util.print.IlvPrintingController.print(Unknown Source)
            at oracle.diagram.framework.print.DefaultPrintPlugin.print(DefaultPrintPlugin.java:98)
            at oracle.diagram.framework.action.handler.PrintHandler.handleEvent(PrintHandler.java:31)
            at oracle.diagram.framework.controller.ControllerChain.handleEvent(ControllerChain.java:39)
            at oracle.diagram.framework.controller.ControllerChain.handleEvent(ControllerChain.java:39)
            at oracle.diagram.framework.controller.ControllerChain.handleEvent(ControllerChain.java:39)
            at oracle.diagram.framework.controller.DiagramController.handleEvent(DiagramController.java:99)
            at oracle.diagram.framework.editor.IdeDiagramEditor$HostController.handleEvent(IdeDiagramEditor.java:1132)
            at oracle.diagram.framework.DiagramFrameworkAddin$PrintController.handleEvent(DiagramFrameworkAddin.java:349)
            at oracle.ide.controller.IdeAction.performAction(IdeAction.java:524)
            at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:866)
            at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:496)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1220)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1261)
            at java.awt.Component.processMouseEvent(Component.java:6041)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
            at java.awt.Component.processEvent(Component.java:5806)
            at java.awt.Container.processEvent(Container.java:2058)
            at java.awt.Component.dispatchEventImpl(Component.java:4413)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Component.dispatchEvent(Component.java:4243)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
            at java.awt.Container.dispatchEventImpl(Container.java:2102)
            at java.awt.Window.dispatchEventImpl(Window.java:2440)
            at java.awt.Component.dispatchEvent(Component.java:4243)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)I don't know if I've done something wrong but I hope you guys could help me!
    I'm looking forward to your answers.
    yours sincerely
    Florian W.

    Hi Guys!
    I've found the solution by my self. It's not a specific jdeveloper problem but it's a java problem. Then first exception
    sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1147)point to a problem between java and cups. If someone is using "automatic rotation" an the job options tab for a print the java is not able to show a printer dialog. The only thing to do is change form automatic rotation to another value and java has no more problem.
    May be this will help somebody else!
    regards

  • Java Exception in Main/Menu/Reporting Tools/XML Publisher/Report Definition

    Hi ,
    One know this error :
    Java Exception: java.lang.NoSuchMethodError: oracle.xml.parser.schema.XSDBuilder.build(Ljava/io/InputStream;Ljava/net/URL;)Loracle/xml/parser/schema/XMLSchema;: during call of com.peoplesoft.pt.xmlpublisher.PSXPXsdUtils.getLevel0ColNames. (2,763) PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula Name:GetBurstFieldValues PCPC:3211 Statement:48
    Called from:PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula Name:SetBurstFieldValues Statement:81
    Called from:PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula Name:LoadReportDefn Statement:660
    Called from:PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula Name:SelectReportDefn Statement:744
    Called from:PSXPRPTDEFN.GBL.PostBuild Statement:36 The noted Java error was thrown during a call of the given method.
    It's if i Add a New Value in the report definition (Peoplesoft 8.5 , CRM ) : No customization in this
    Thanks in advance..

    Judging by the error, it looks like the xsd can not be constructed.
    I would start of by checking if the target location is defined in the Intergration Broker.
    PeopleBooks > PeopleTools 8.52: PeopleSoft Integration Broker Administration > Configuring PeopleSoft Integration Broker for Handling Services > Using the Target Locations Page to Set Target Locations for Services
    http://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/psbooks/tiba/book.htm?File=tiba/htm/tiba08.htm#H3007

  • "ORA-29532: Java call terminated by uncaught Java exception

    Dear Oracle:
    I am trying to establish an HTTPS connection from a Java stored
    procedure that is wrapped in a PL/SQL procedure and loaded into a
    Package. We are running on Oracle 8.1.7.
    My Java code compiles and runs fine when run stand-alone outside
    Oracle; I can establish the connection to a secure server and talk to
    the server. However when I load this Java class (using the loadjava
    utility) this class can no longer run and I get a the following
    exception:
    "ORA-29532: Java call terminated by uncaught Java exception:
    javax.net.ssl.SSLException: SSL handshake failed:
    X509CertChainIncompleteErr"
    I have tried loading the JSSE from Sun and I still get the same error.
    Searching in the Discussing Forums I found the following link (which
    describes a procedure that logs into the UPS secure server site and
    grabs some XML) http://osi.oracle.com/~mbpierma/SSL_Java_DB.html .
    This code works ok if we try to connect to UPS server. However this
    code doesn't work if we try to log in to a different server (such as
    ???). If I modify this code slightly and try to log to any other
    sever server I get the same error as the one above. Investigation
    lead us to understand that the certificate at the UPS web site is a
    self-signed certificate -- not one generated by a major 'recognized'
    authority such as Verisign or Thawte.
    Further research pointed me to the following URL
    http://www.znow.com/sales/oracle/network.816/a76932/appf_ora.htm#619367
    This URL has the documentation for JAVA SSL for 8.1.6 which I figure
    I could read and try to make it work in 8.1.7.
    I looked at your Secure Hello World example, however the code is
    missing the most critical parts of the whole example, it does not
    specify where the certificate or any of the security settings come
    from (see the attached JavaCertExample.txt file).
    So, my questions are the following:
    1) What should I do to avoid the error mentioned above?
    2) Do you have a sample piece of code that describes how to make a
    HTTPS connection using a Java stored procedure?
    3) Can I make the HTTPS connection using a URL class and not using
    sockets directly?
    4) Do I need to load the JSEE provided by Sun?
    5) Will the solution be different for Oracle 9i?
    // SecureHelloClient.java
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.net.ssl.*;
    import javax.security.cert.X509Certificate;
    import oracle.security.ssl.OracleSSLCredential;
    import oracle.security.ssl.OracleSSLSocketFactory;
    import oracle.security.ssl.OracleSSLProtocolVersion;
    import oracle.security.ssl.OracleSSLSession;
    public class SecureHelloClient
    public static void main(String argv[])
    String hostName = "localhost";
    if(argv.length != 0)
    String hostName = argv[0];
    // Set the SSLSocketFactoryImpl class as follows:
    java.util.Properties prop = System.getProperties();
    prop.put("SSLSocketFactoryImplClass",
    "oracle.security.ssl.OracleSSLSocketFactoryImpl");
    try
    // Get the default socket factory
    OracleSSLSocketFactory sSocFactory
    = (OracleSSLSocketFactory)SSLSocketFactory.getDefault();
    sSocFactory.setSSLProtocolVersion(OracleSSLProtocolVersion.SSL_Version_3_0);
    OracleSSLCredential sslCredObj = new OracleSSLCredential();
    // Where did these values come from? caCert, userCert, trustedCert,
    // Set the certificate chain and private key if the
    // server requires client authentication
    sslCredObj.addCertChain(caCert)
    sslCredObj.addCertchain(userCert)
    sslCredObj.setPrivateKey(userPvtKey, userPassword)
    // Populate credential object
    sslCredObj.addTrustedCert(trustedCert);
    sSocFactory.setSSLCredentials(sslCredObj);
    // Create the socket using factory
    SSLSocket jsslSoc =
    (SSLSocket)sSocFactory.createSocket(hostName, 8443);
    String [] ciphers = jsslSoc.getSupportedCipherSuites() ;
    // Select the ciphers you want and put them.
    // Here we will put all availabel ciphers
    jsslSoc.setEnabledCipherSuites(ciphers);
    // We are creating socket in client mode
    jsslSoc.setUseClientMode(true);
    // Do SSL handshake
    jsslSoc.startHandshake();
    // Print negotiated cipher
    System.out.println("Negotiated Cipher Suite: "
    +jsslSoc.getSession().getCipherSuite());
    System.out.println("");
    X509Certificate[] peerCerts
    = ((javax.net.ssl.SSLSocket)jsslSoc).getSession().getPeerCertificateChain();
    if (peerCerts != null)
    System.out.println("Printing server information:");
    for(int i =0; i ? peerCerts.length; i++)
    System.out.println("Peer Certificate ["+i+"] Information:");
    System.out.println("- Subject: " + peerCerts.getSubjectDN().getName());
    System.out.println("- Issuer: " + peerCerts[i].getIssuerDN().getName());
    System.out.println("- Version: " + peerCerts[i].getVersion());
    System.out.println("- Start Time: " + peerCerts[i].getNotBefore().toString());
    System.out.println("- End Time: " + peerCerts[i].getNotAfter().toString());
    System.out.println("- Signature Algorithm: " + peerCerts[i].getSigAlgName());
    System.out.println("- Serial Number: " + peerCerts[i].getSerialNumber());
    else
    System.out.println("Failed to get peer certificates");
    // Now do data exchange with client
    OutputStream out = jsslSoc.getOutputStream();
    InputStream in = jsslSoc.getInputStream();
    String inputLine, outputLine;
    byte [] msg = new byte[1024];
    outputLine = "HELLO";
    out.write(outputLine.getBytes());
    int readLen = in.read(msg, 0, msg.length);
    if(readLen > 0)
    inputLine = new String(msg, 0, readLen);
    System.out.println("");
    System.out.println("Server Message:");
    System.out.println(inputLine );
    else
    System.out.println("Can't read data from client");
    // Close all sockets and streams
    out.close();
    in.close();
    jsslSoc.close();
    catch(SSLException e)
    System.out.println("SSL exception caught:");
    e.printStackTrace();
    catch(IOException e)
    System.out.println("IO exception caught:");
    e.printStackTrace();
    catch(Exception e)
    System.out.println("Exception caught:");
    e.printStackTrace();

    Hi,
    I have the same problem.
    Is some ORACLE guru that can help us ?
    We need to communicate with some servlet
    via POST method of https (SSL3)
    and with using private certificate on the client site.
    We need furthermore allow using of some proxy.
    Client site is realized as set of stored procedures within ORACLE 8.1.7
    In this time I am able to communicate with server without SSL and certificate
    using package utl_tcp
    (but with this solution without certificate is our customer not satisfied -:))
    ORACLE help us please !
    Pavel Pospisil
    [email protected]

  • Uncaught Java Exception while persisting the null bean at e-biz suite login

    Dear Friends,
    Recently, there was a java upgrade in my system and after that when i login to E-Biz suite, i get the following Jinitiator error and many Jinitiator windows open up with this error.
    Uncaught Java Exception while persisting the null bean
    Java.io.NotSerializableException:java.lang.thread
        at.java.io.ObjectOutputStream.outputObject(Compiled Code)
        at.java.io.ObjectOutputStream.writeObject(Compiled Code)
        at.java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:369)
        at.java.io.ObjectOutputStream.outputObject(Compiled Code)
        at.java.io.ObjectOutputStream.writeObject(Compiled Code)
        at sun.beans.ole.OleBeanInterface.saveBean(OleBeanInterface.java.508)It is very difficult to deal with many jinitiator error windows opening up.
    Could any one tell the reason for this issue and its resolution as well?
    Regards,
    Sreekanth
    Edited by: Sreekanth Munagala on Jun 14, 2012 8:49 AM
    Edited by: Sreekanth Munagala on Jun 14, 2012 8:51 AM

    Please post the details of the application release, database version and OS.
    Recently, there was a java upgrade in my system What is this upgrade? From what version to what version?
    What is your client OS/Browser?
    What is the Jinitiator version?
    and after that when i login to E-Biz suite, i get the following Jinitiator error and many Jinitiator windows open up with this error.
    Uncaught Java Exception while persisting the null bean
    Java.io.NotSerializableException:java.lang.thread
    at.java.io.ObjectOutputStream.outputObject(Compiled Code)
    at.java.io.ObjectOutputStream.writeObject(Compiled Code)
    at.java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:369)
    at.java.io.ObjectOutputStream.outputObject(Compiled Code)
    at.java.io.ObjectOutputStream.writeObject(Compiled Code)
    at sun.beans.ole.OleBeanInterface.saveBean(OleBeanInterface.java.508)It is very difficult to deal with many jinitiator error windows opening up.
    Could any one tell the reason for this issue and its resolution as well?Is the issue with all clients and all browsers?
    Have you tried to clear the jcache and the browser history files?
    Thanks,
    Hussein

  • Java technology/framework suggestions required for solution.

    Hi,
    I'm a C/PRO*C developer (for the past 12 years) and have been asked to do some Java ( which I haven't touched for 13 years).
    I would like you input on the 'correct' solution (kind of like an architectural overview) of the technologies I should be looking at.
    There are two parts to this.
    I need to write a web browser/Application that picks up a file locally on windows PC and reads the contents of the file to populate some url parameters which go to a specific web sevice via HTTPS.
    I then need a web service or some kind of servlet (I guess) that on receipt of the request by the client then stores (to a database) the request for auditing and then creates a soap message (using the data receieved) to an external third party( WSDL provided by thirdpparty). Once the thirdparty responds the web server then generates a web page for the client which includes a number of options and details retrieved from the thirdparty are displayed and on the client selecting them the result is sent to the server and the selected option is stored.
    Part of this must be that the server must be capable of running as a number of instances. It must be highly secure.
    What java technologies/frameworks should be looked out? Is my very rough design fundamentally floored?
    Thanks in advance.
    OFN

    OldFashionedNewbie wrote:
    So should I use servlets as opposed to JSP? or JCF?Servlets are not opposed to JSP. (JCF? Do you mean JSF?) You can and would use both Servlets and JSP, however, I have grown to believe that JSPs are awful and you should use Velocity instead. From what I've heard of JSF, I'd avoid that too.
    Essentially then create a servlet that accepts HTTP request and manipulates a call to the thirdparty, audits data to database, and returns a page back to client which then accepts the option.The server accepts the HTTP request and deals with that lower-level stuff for you, then it invokes your servlet.
    The servlet shouldn't call the third party, etc.; it should invoke other code (that you'd write) to do all that. You need a layer of abstraction between your business logic and the web tier. Among other things this will make it much easier to test.
    If I were wanting to run this as a in multiple instances then I create a connection pool to the database. But could multiple app instances be able to use one network connection to the ThirdParty?I suppose they could but it seems like more trouble than it's worth and a whole layer of infrastructure that I wouldn't bother with unless (a) you've demonstrated that it's a problem during profiling, and (b) you find that there's some preferably open-source library that handles this for you.

  • Is there a way to handle custom java exception in OSB?

    For example, i created a exception that extends RuntimeException.
    My exception has a new field called "code".
    I want to handle this exception in Oracle Service Bus process and retrieve this code to throws another exception with a XML structure that includes the code.
    Is there a way to do that ?
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-382515</con:errorCode>
         <con:reason>Callout to java method "public static org.apache.xmlbeans.XmlObject ...</con:reason>
         <con:java-exception xmlns:con="http://www.bea.com/wli/sb/context">
             <con:java-content ref="jcid:33a6c126:14006f3df18:-7fd9"/>
         </con:java-exception>
         <con:location xmlns:con="http://www.bea.com/wli/sb/context">
             <con:node>optmusPipeline</con:node>                    
             <con:pipeline>optmusPipeline_request</con:pipeline>
             <con:stage>processStage</con:stage>
             <con:path>request-pipeline</con:path>   
         </con:location>
    </con:fault>
    it is not enough to recover the information i needed.

    Hi Sandro,
    I've got the same situation. I agree that returning xml from function is not a best choice as you have to manually check if return status is an error or not. Processing exception in error handler is better and this is how I do it:
    I am doing a java callout to a function that can throw exception. Then I add ErrorHandler to stage containing this callout (all the exception are caught here).
    In the error handler I check if $fault/ctx:java-exception is not null. If not then I pass thrown exception to my utility function that converts it to xml similar to yours:
    import org.apache.xmlbeans.XmlException;
    import org.apache.xmlbeans.XmlObject;
    public static XmlObject exceptionToXML(Throwable exception)
      throws XmlException {
      String xmlString = exceptionToString(exception);
      return XmlObject.Factory.parse(xmlString);
    public static String exceptionToString(Throwable exception) {
      String cause = "";
      if (exception.getCause() != null) {
      cause = exceptionToString(exception.getCause());
      return String
      .format("<exception><name>%s</name><description>%s</description>%s</exception>",
      exception.getClass().getName(), exception.getMessage(),
      cause);
    Calling exceptionToXML with $fault/ctx:java-exception/ctx:java-content returns:
    <exception>
         <name>pl.app.MyException</name>
         <description>Exception message</description>
    </exception>
    Then you can check the exception class (IF action: $exception/name/text() = "pl.app.MyException") and handle it accordingly.
    Good luck,
    Krzysiek

  • Does wscompile generate "fault" tag in WSDL file from Java exception class?

    I'm trying to generate WSDL files from Java classes. I defined some of my own exception that inherits from "RemoteException", but wscompile doesn't generate the corresponding complex type and "fault" tag. Does anyone know if this is a bug or wscompile doesn't support from Java Exception to fault?
    Thanks

    It will if the exceptions do not inherit from RemoteException.

  • FRM-92100 Java Exception (jacob)

    I'm using Jacob to load specific parts of Office documents into an Oracle database. This works successfully in 99.9% of cases although some users experience intermittent problems which can't be pinned down to a particilar office document and appear to be totally random. The error message indicates that the exception occurs when trying to close the Word session down.
    The error message is as follows:
    FRM-92100: Your connection to the Server was interrupted.
    Details:
    Java Exception:
    com.jacob.com.ComFailException: A COM exception has been encountered:
    At invoke of: Quit
    Description: Not enough storage is available to complete this operation.
    I have seen several references to the 92100 catch all error code but none that tie in with this description.
    Could anyone point me in the right direction as to what's causing this error? My first assumption would be the RAM available on the users PC at time of transfer but can't pin this down.
    Many thanks.

    I think that fix for bug 5375851 has resolved the problem mentioned and hence this shall be of help.
    Thanks,
    Message was edited by:
    user482823

  • Oracle BI 11.1.1.7.1: Calling BI webservices from Plsql Procedure: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoClassDefFoundError

    Hi,
         I have a requirement of calling BI webservices from Plsql stored procedure. I generated all my wsdl java classes and loaded them into the database. However, when I tried to call one of my java class using stored procedure, it is giving me"ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoClassDefFoundError".
    *Cause:    A Java exception or error was signaled and could not be
               resolved by the Java code.
    *Action:   Modify Java code, if this behavior is not intended.
    But all my dependency classes are present in database as java class objects and are valid. Can some one help me out of this?

    Stiphane,
    You can look in USER_ERRORS to see if there's anything more specific reported by the compiler. But, it could also be the case that everything's OK (oddly enough). I loaded the JavaMail API in an 8.1.6 database and also got bytecode verifier errors, but it ran fine. Here are the errors I got when loading Sun's activation.jar, which ended up not being a problem:
    ORA-29552: verification warning: at offset 12 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
    verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):12 by a throw at offset 18 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
    verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):18 by a throw at offset 30 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
    verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):30 by a throw
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

  • Java Exception: java.lang.NoSuchMethodError -while accessing Job Code Table

    Recently we upgraded tools from 8.51.03 to 8.52.12
    when try to open data from below navigation.
    Set Up HRMS--> Foundation Tables--> Job Attributes---> Job Code Table
    then getting below error. Seriously doubt if a jar file is missing in PS_APP_HOME/class. Any clue?
    Java Exception: java.lang.NoSuchMethodError: PeopleSoft.PeopleCode.Func.CreateSQL(Ljava/lang/String;[Ljava/lang/Object;)LPeopleSoft/PeopleCode/SQL;: during call of com.peoplesoft.hr.hr.cache.MetaCatalog.getObjectCatalog. (2,763) HCMD_CORE.metadata.ObjectCatalog.OnExecute Name:getJavaObject PCPC:1099 Statement:19
    Called from:HCMD_CORE.metadata.ObjectCatalog.OnExecute Name:FindJavaObject Statement:177
    Called from:HCMD_CORE.metadata.ObjectCatalog.OnExecute Name:FindObject Statement:212
    Called from:WCS_SOURCE.Implementation.EmployeeInformationImpl.OnExecute Name:GetRecordField Statement:67
    Called from:WCS_SOURCE.Implementation.EmployeeInformationImpl.OnExecute Name:CreateCache Statement:26
    Called from:WCS_SOURCE.Impleme
    The noted Java error was thrown during a call of the given method.
    Error Codes
    Java Exception: java.lang.NoSuchMethodError: PeopleSoft.PeopleCode.Func.CreateSQL(Ljava/lang/String;[Ljava/lang/Object;)LPeopleSoft/PeopleCode/SQL;: during call of com.peoplesoft.hr.hr.cache.MetaCatalog.getObjectCatalog. (2,763)
    Problem Category/Subcategory                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Not sure about 8.52, but in 8.51, I found the PeopleSoft.PeopleCode.Func class in PS_HOME/appserv/classes/peoplecode.jar, and CLASSPATH gets set to PS_HOME/appserv/classes by psconfig.sh
    Not an answer, but it might give you some ideas on where to look.
    Regards,
    Bob

  • SMC on solaris 10 x86 - toolbox java exception

    Just installed (for the first time) solaris, to test it on a x86, had some difficulties with the NIC (realtek), but now seems ok.
    But I can't start sun managemnt console, keep getting the same error: can't open toolbox, and gives me a java exception.
    installed both jre 1.4.2 and jre 1.5.0.
    the exception is
    java.net.MalformedURLException: no protocol:
    any idea on the problem?
    Thank you in advance
    Stefano

    Thanks for your help.
    Yes, the browser starts, tells me to wait for the toolbox to load, and then stops.
    When i go to the message log there are always two error "toolbox not loaded" and the exception...
    I've just started with solaris, and I've no other machine to try to connect...
    I' ve tought of something about connection, even because of the problem with the card, but everithing else seems ok.
    How can I check for this?
    Thanks again.
    Stefano.

  • Error: ORA-29532: Java call terminated by uncaught Java exception:

    Anyone have this similar problem of
    ORA-29532: Java call terminated by uncaught Java exception:
    javax.xml.rpc.soap.SOAPFaultException: Caught exception while handling request:
    deserialization error: XML reader error: unexpected character content:
    "A"
    The service is running fine in a browser and returns the date. When I run it using the PL/SQL it has the error mentioned above.
    I am running the following:
    CREATE OR REPLACE FUNCTION GetDate_wb( p_dummy IN VARCHAR2 )
    RETURN DATE
    AS
    l_service sys.UTL_DBWS.service;
    l_call sys.UTL_DBWS.call;
    l_result ANYDATA;
    l_wsdl_url VARCHAR2(1024);
    l_service_name VARCHAR2(200);
    l_operation_name VARCHAR2(200);
    l_input_params sys.UTL_DBWS.anydata_list;
    l_port sys.UTL_DBWS.qname := 8988;
    BEGIN
    l_wsdl_url := 'http://org-lblakisa1:8988/BPEL_OD-LoginWS-context-root/getDate1SoapHttpPort?WSDL';
    l_service_name := 'getDate1';
    l_operation_name := 'getDate';
    l_service := sys.UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
    service_name => l_service_name);
    l_call := sys.UTL_DBWS.create_call (
    service_handle => l_service,
    port_name => NULL,
    operation_name => l_operation_name);
    l_input_params(1) := ANYDATA.ConvertVarchar2(p_dummy);
    l_result := sys.UTL_DBWS.invoke (
    call_handle => l_call,
    input_params => l_input_params);
    sys.UTL_DBWS.release_call (call_handle => l_call);
    sys.UTL_DBWS.release_service (service_handle => l_service);
    RETURN ANYDATA.AccessDate(l_result);
    END;
    /

    Problem is resolved... We had a version issue in that 10.1.3 web service is not compatible. 10.1.2 worked.

Maybe you are looking for

  • Direct link between SES to activity in tables?

    hello all is there a way to have a direct link between a Service entry sheet and its activities in tables? so far, the only link we found is the following: table ESSR enter SES number: get package number and enter it in table ESLL. this will give me

  • Is it possible for jsp(tomcat container)  access ejb deployed in sun app se

    if it's possible ,how to implement

  • Can events be re-ordered?

    1) I have 3 calendars and I only use the Month view. When I toggle a calendar on or off, SOME of another calendar's events swap places on their day as shown in the list. 2) Bonus question: I have "Show time in Month view" checked in preferences. When

  • Trying to add a motion path to a panel but i get errors...

    hey guys.. im trying to move a panel container from one location to another.. basically when i start off the application the panel's horizontalCenter is set to "0" what i need it to do is move from that center location to left. the code i have is...

  • Importing class packages

    i am currently developing a flash movie with no graphics at the moment. It is being done with a lot of classes and packages, many of the AS classes import the same packages as well. I have many linked movie clips to those classes. The problem is that