Client side handling of exceptions thrown by a webservice

I have a webservice that is deployed in Tomcat 5.5 running on Windows XP, Java version is 1.5, using jwsdp 1.5. My client, when run as an applet in a browser (have tried IE 6 and FireFox 1), seems to be unable to parse any exception thrown from the webservice. Instead the following exception is caught by the client:
==========================================================
Checking the security service exception that occurred [Runtime exception; nested exception is:
XML parsing error: com.sun.xml.rpc.sp.ParseException:1: Document root element is missing]
com.irista.security.services.data.SecurityServiceException: Runtime exception; nested exception is:
XML parsing error: com.sun.xml.rpc.sp.ParseException:1: Document root element is missing
at com.irista.security.services.webclient.SecurityServiceProxy.removeAuthenticatio nProfile(SecurityServiceProxy.java:1276)
at com.irista.security.ui.applet.AuthenticationProfilesListPanel.deleteAction(Auth enticationProfilesListPanel.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.irista.ui.webapp.framework.WebAppletPane.performAction(WebAppletPane.java:1 80)
at com.irista.ui.webapp.framework.WebAppletPane.performAction(WebAppletPane.java:1 51)
at com.irista.ui.webapp.framework.WebAppToolbar$ButtonActionListener.actionPerform ed(WebAppToolbar.java:368)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
==========================================================
If I run the client outside of a browser it catches the exception that is actually thrown by the webservice.
Is there possibly a problem with the java 5 plugin handling exceptions thrown by webservices?
I have not found any bug reports or forumn posts regarding this so any assistance would be greatly appreciated.
thanks,
scott

Thanks for the reply, here is what the printStackTrace() output:
java.rmi.RemoteException: Runtime exception; nested exception is:
     XML parsing error: com.sun.xml.rpc.sp.ParseException:1: Document root element is missing
     at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:318)
     at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:300)
     at com.irista.security.services.webservice.SecurityServiceIF_Stub.removeAuthenticationProfile(SecurityServiceIF_Stub.java:1963)
     at com.irista.security.services.webclient.SecurityServiceProxy.removeAuthenticationProfile(SecurityServiceProxy.java:1266)
     at com.irista.security.ui.applet.AuthenticationProfilesListPanel.deleteAction(AuthenticationProfilesListPanel.java:131)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at com.irista.ui.webapp.framework.WebAppletPane.performAction(WebAppletPane.java:180)
     at com.irista.ui.webapp.framework.WebAppletPane.performAction(WebAppletPane.java:151)
     at com.irista.ui.webapp.framework.WebAppToolbar$ButtonActionListener.actionPerformed(WebAppToolbar.java:368)
     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
     at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
     at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at javax.swing.JComponent.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: XML parsing error: com.sun.xml.rpc.sp.ParseException:1: Document root element is missing
     at com.sun.xml.rpc.streaming.XMLReaderImpl.next(XMLReaderImpl.java:120)
     at com.sun.xml.rpc.streaming.XMLReaderBase.nextContent(XMLReaderBase.java:23)
     at com.sun.xml.rpc.streaming.XMLReaderBase.nextElementContent(XMLReaderBase.java:41)
     at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:123)
     ... 34 more

Similar Messages

  • Query: creating client side handler

    how can I create a client side handler for a webservice on weblogic 9.2 workshop

    Take a peek at edocs for some examples and code you can get started with:
    http://edocs.bea.com/wls/docs92/webserv/client.html#client_handlers
    Best of luck,
    -Jacobd
    Mihir Khanwalkar wrote:
    how can I create a client side handler for a webservice on weblogic 9.2 workshop

  • Client-side handler: static config?

    I would like to provide a client-side JAX-RPC handler that would
    be invoked without any modification to existing client code.
    The idea is that user's would only need to modify a config file
    (something like the web-services.xml file, but on the client-
    side) to use our handler.
    We are already doing this in axis (uses a client-side deployment
    descriptor: client_deploy.wsdd), but based on another thread
    ("Client Handler Chain - help ??"), it looks like there is
    currently no equivalent in WLS?
    Are there plans to add the ability to statically configure
    client-side handlers in WLS via some sort of client-side config
    file/descriptor, or is the programmatic method of modifying
    the HandlerRegistry in the client code the only way?
    Any help/ideas would be greatly appreciated!
    --Terry

    In 7.0, you can do this in a handler:
    import weblogic.webservice.binding.soap.HttpClientBinding;
    String url = http://my/new/address/;
    sslAdapter = null; //only needed for ssl
    Binding binding = new HttpClientBinding( url, sslAdapter );
    context.setProperty( WLMessageContext.BINDING_PROP,
    binding );
    HTHs
    -manoj
    http://manojc.com
    "William Cassidy" <[email protected]> wrote in message
    news:[email protected]...
    >
    Is there a similar way to set the endPointAddress.
    "manoj cheenath" <[email protected]> wrote:
    Ok, I will add this as a feature request.
    If you are ok with using WLS internal APIs (This APIs may change in
    the future), try this:
    weblogic.webservice.Operation operation
    =
    ((weblogic.webservice.WLMessageContext)messageContext).getOperation();
    >>
    weblogic.webservice.Port port = operation.getPort();
    String endPointAddress = port.getAddress();
    regards,
    -manoj
    "Terry Martin" <[email protected]> wrote in message
    news:[email protected]...
    Manoj, thanks for the response.
    We'd definitely like to see a client side dd at some point, but
    can work with the API's for now. Thanks much for adding this as
    a feature request.
    On another subject:
    I need to determine the target/endpoint URL from my client-side
    request handler. Again, this was something we were able to do in
    axis, but is currently not part of the JAX-RPC standard (JSR101).
    I could be missing something, but haven't seen any way of
    determining the target URL given only the SOAPMessageContext.
    The only way seems to be if it were passed as a "standard"
    property in the SOAPMessageContext (this is one way it is done
    in axis).
    I imagine this will someday be standardized in JAX-RPC (I can
    think of many uses for this feature, other than our own). In the
    meantime, could you also add this as a feature request for WLS?
    Thanks again,
    -Terry
    "manoj cheenath" <[email protected]> wrote:
    True. In WLS 7.0 there are no client side dd in which you can specify
    the handler chain. We did not comeup with ourown client side dd,
    hopeing that JSR109 will define the dd.
    It is quite easy to register the handlers through APIs. Let us know
    if
    that will not help you.
    I will add client side dd as a feature requst for the next release.
    regards,
    -manoj
    "Terry Martin" <[email protected]> wrote in message
    news:[email protected]...
    I would like to provide a client-side JAX-RPC handler that would
    be invoked without any modification to existing client code.
    The idea is that user's would only need to modify a config file
    (something like the web-services.xml file, but on the client-
    side) to use our handler.
    We are already doing this in axis (uses a client-side deployment
    descriptor: client_deploy.wsdd), but based on another thread
    ("Client Handler Chain - help ??"), it looks like there is
    currently no equivalent in WLS?
    Are there plans to add the ability to statically configure
    client-side handlers in WLS via some sort of client-side config
    file/descriptor, or is the programmatic method of modifying
    the HandlerRegistry in the client code the only way?
    Any help/ideas would be greatly appreciated!
    --Terry

  • InvocationException on debugger side but no exception thrown in debuggee

    Hi Folks,
    in my current project we develop a debugger-like tool. In the tools workflow we call a method of the debuggee via "invokeMethod()" which triggers the debuggee vm to load a class via "loadClass()". When we try to load a class which extends a class from an external library (which was not added to the classpath) then an "InvocationException" is thrown in the debugger (cause: "Exception occurred in target VM"). But when I have a look into the console output of the target VM no exception message can be found. If I call loadClass() directly within the program then Exception "NoClassDefFoundError" is thrown and can be found within the programs console output.
    Does anybody have an idea why this exception does not appear within the console output when the debugger is used?
    Thanks for your help.
    Best Regards
    Mario

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

  • Exception handling in rmi in client side

    Hello everybody, I'm developing a small client-server application using JDBC and RMI .
    I would like to ask if any body can help to know how handle exceptions thrown in the server side and show them for the client.
    Any help will be appreciated

    I prefer not to have the server's exceptions known to the client. The client only gets the exceptions the client expects. This is part of the server interface which is defined and owned by the client.
    So any exception thrown on the server I would handle and rethrow a different appropriate exception up to the client.

  • Client side proxy class properties and APIs

    I used clientgen to generate client side proxy from WSDL.
    Generated class has name <ServiceName>Soap_Stub and extends
    weblogic.webservice.core.rpc.StubImpl class.
    I am looking for answers to the following questions:
    1. Does this proxy have default value of client side timeout?
    2. If it has one then what its value?
    3. What API will retrieve this value from the instance of my proxy object?
    4. What API will set this value?
    5. What API can be used to set the characteristics of connection between client
    and
    server? Something like "keepAlive".
    Is there some documentation available which gives the answers to these questions?
    Thank you,
    Igor Malkiman

    Hello,
    From the release notes [1] for WLS 8.1 SP2 (CR111881) concerning a
    timeout on webserivce invocation on the client-side, see if this answers
    most of your questions.
    For more information about the weblogic.webservice.binding package, see
    the Javadocs [2].
    Regards,
    Bruce
    RESOLUTION:
    1. Requires weblogic.jar on the client side
    2. Set system property "weblogic.webservice.UseWebLogicURLStreamHandler"
    to
    be true, i.e: -D"weblogic.webservice.UseWebLogicURLStreamHandler=true"
    3. set timeout on the stub:
    with API for BindingInfo:
    BindingInfo bInfo = (BindingInfo)
    stub._getProperty("weblogic.webservice.bindinginfo");
    bInfo.setTimeout(5 /* secs */);
    with stub property:
    stub._setProperty("weblogic.webservice.rpc.timeoutsecs", "5" /* secs
    CHANGED BEHAVIOR:
    Yes. Prior to 8.1sp1, BindingInfo.setTimeout(5000/*millisecs*/) takes
    milliseconds as paramter. But it has no effect on the client side. With
    8.1sp2, the parameter will be seconds insteadof milliseconds, i.e:
    BindingInfo.setTimeout(5/*secs*/).
    [1]
    http://e-docs.bea.com/wls/docs81/notes/resolved.html
    [2]
    http://edocs.bea.com/wls/docs81/javadocs/index.html
    Igor Malkiman wrote:
    >
    I used clientgen to generate client side proxy from WSDL.
    Generated class has name <ServiceName>Soap_Stub and extends
    weblogic.webservice.core.rpc.StubImpl class.
    I am looking for answers to the following questions:
    1. Does this proxy have default value of client side timeout?
    2. If it has one then what its value?
    3. What API will retrieve this value from the instance of my proxy object?
    4. What API will set this value?
    5. What API can be used to set the characteristics of connection between client
    and
    server? Something like "keepAlive".
    Is there some documentation available which gives the answers to these questions?
    Thank you,
    Igor Malkiman

  • Client side authentication, 2 sided SSL

    Hi,
    Is using client side SSL auth. effective when working (via webservice) with a load balancer (SSL termination) that passes requests to a server connected to it?
    Is this ok? considered a best practice? does the client side certificate add any security?
    THANKS!

    I agree with you sabre150. However, I was restricting my comments to the authentication part of Access Control (which I once defined in a book as being a three-part protocol dance, where every part is related, but independent):
    i) Identification - where someone claims to be somebody who needs access to a resource;
    2) Authentication - where that someone has to prove they are who they claim to be; and
    3) Authorization - where the system determines if that authenticated entity is authorized to access the resource.
    Sending the Client SSL certificate is Identification (anyone can do this so it doesn't prove anything). Digitally signing the nonce sent by the server is the proof (and the Authentication part of the dance). Verifying authorization is completely separate from the authentication part of the decision (which is what you referred to).
    Many people confuse all three steps as "authentication" because it happens seamlessly on most systems; but in reality, they are distinct parts that can be interchanged - you can use a username-string as an identifier, a password as an authenticator and a UNIX group membership for authorization. You can also use an LDAP DN as an identifier, a digital signature as an authenticator and a XACML rule-set for authorization - and so on.
    In the end, a system must do all three parts of the dance to provide access to protected resources; SSL ClientAuth focuses on only the authentication part of the dance; and for SSL ClientAuth to be considered secure, the protection of the Private Key becomes the single most important determinant. Everything after the verification of the digital signature is an authorization decision (which you pointed out).
    (Sorry for the long answer, but I often make mistaken assumptions that cause me to write more cryptically than I should).
    Arshad Noor
    StrongAuth, Inc.

  • Additional uncaught exception thrown while handling exception.

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

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

  • Client Drops - No Exception Thrown

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

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

  • Client variable database repository exception handling

    We have recently had 2 incidents where client variable
    database storage appears to have failed in our clustered
    environment. We have 2 servers that share a sybase 12.5.2 client
    variable repository (CDATA/CGLOBAL). The problem seems to be
    occuring when a table that the application uses gets blocked by an
    unrelated application. When this happens, client variable storage
    seems to fail - the 2 servers apparently use whatever client
    variables they have in memory rather than getting the values from
    CDATA.
    There are no exceptions thrown, the application continues to
    function normally except that each server has it's own copy of the
    client variables. When we kill the process that has the table
    locked up, the servers start using CDATA normally again.
    The page that is getting blocked by the external process does
    not update any client variables, but it does read them. The
    inconsistent client variable problem occurs on other pages, not the
    one being blocked.
    I was able to sort of recreate the problem. I found that if I
    renamed CDATA, no error is reported to the user. The database
    exception (table not found) is logged, but not thrown on the page.
    To the user the application appears to function normally. So this
    demonstrates that updates to CDATA which result in database
    exceptions fail silently and are not thrown to the page.
    Has anyone else experienced silent exceptions in CDATA
    updates? Are there any workarounds for this behavior? Our
    application relies on client variables being consistent across
    servers and really need for exceptions to be thrown to the page so
    that the user is aware.
    Additional Info:
    CFMX 7.0.2
    Windows Server 2003 SP1
    database is sybase 12.5.2

    This is one of the "classic" design problems in this kind of architecture. And, unfortunately, the answer is "it depends on how you think you need to handle it." And I'm sure there are plenty of "gurus" that will tell you one way or another is the only way to do it.
    I'll be more honest: I'll give you a couple of personal suggestions, based on experience in this architecture. These are suggestions - you may do with them what you will. I will not say this is the best, most correct, or even remotely relevant to what you're doing.
    If it's simple data validation for "typing" (e.g. String, number, Date, etc.), that is taken care of when you attempt to stuff in the information into the appropriate DTO. If it's more "sophisticated" than that (must be in a certain range, etc.), that particular checking should probably be delegated from your Controller to a helper class. That not only saves the "expense" of transmitting the information back and forth across the wire, it's "faster" to the end user so say "Ooopsie" by redirecting back to the form right then. Basically the same thing if the types are wrong.
    That only leaves the "big" problems in the business layer (EJBs), where you have to deal with concurrency, database failures, etc. Generally these kinds of exceptions are thrown back to to the Controller in one of two forms:
    1) a sublass of RuntimeException, which signals that some Very Bad Things have happened in your container. EJBException is one like that and you can see where it's being thrown from.
    2) a subclass of Exception, also called "application exceptions." They are usually something like a "duplicate record" or a validation-like error (which you mentioned) like a missing field. They're used as a signal to a failure in the logic, not the container. That way you have to decide at what layer of your architecture they should be handled and/or passed on to the next.

  • How to properly handle Exception thrown in a .tag file?

    I've got a .jsp file that makes use of some custom tags, each defined in their own .tag file, and located in WEB-INF/tags. I'm having a lot of trouble with the scenario of cleanly dealing with an exception raised by scriptlets in either a .jsp file, and a .tag file. I'm using both Java and Tomcat 6....
    Originally, I wanted to use .tag files in order to componentize common elements that were present in .jsp pages, as well as move ugly scriptlets out of .jsp pages, and isolate them in tag files with their associated page elements.
    Things started getting hairy when I started exploring what happens when an exception is thrown (bought not handled) in a scriptlet in a .tag file. Basically, my app is a servlet that forwards the user to various .jsp pages based on given request parameters. The forwarding to the relevant .jsp page is done by calls to the following method:
    servletContext.getRequestDispatcher("/" + pageName).forward(request, response);
    Where 'pageName' is a String with the name of the .jsp I want to go to...
    Calls to this method are enclosed in a try block, as it throws both a ServletException, and IOException...
    When either my .jsp, or .tag throw an exception in a scriptlet, the exception is wrapped in a JSPException, which is then wrapped in a ServletException.
    I can catch this exception in my servlet... but then what? I want to forward to an error page, however, in the catch block, I can't forward in response to this exception, as that results in an IllegalStateException, as the response has already been committed. So what do I do? How do I get from this point, to my "error.jsp" page?
    It was suggested to me that I use the <% @ page isErrorPage="true" %> directive in my error.jsp,
    and the in my real .jsp, use <%page errorPage="/error.jsp" %>.
    This works great when the exception is thrown in my .jsp.... But when the exception is thrown in the .tag file... not so much...
    My .jsp page was rendered up until the point where the <my:mytag/> (the tag with the offending raised exception) was encountered. Then, instead of forwarding to the error page when the error in the tag is encountered, the error page is rendered as the CONTENT of of my TAG. The rest of the .jsp is then NEVER rendered. I checked the page source, and there is no markup from the original .jsp that lay below the my tag. So this doesn't work at all. I don't want to render the error page WITHIN the half of the .jsp that did render... Why doesn't it take me away from the .jsp with the offending tag altogether and bring me to the error.jsp?
    Then it was suggested to me that I get rid of those page directives, and instead define error handling in the web.xml using the following construct:
    <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/error</location>
    </error-page>
    <error-page>
    <error-code>404</error-code>
    <location>/error</location>
    </error-page>
    For this, I created a new servlet called ErrorServlet, and mapped it to /error
    Now I could mangle the end of the URL, which causes a 404, and I get redirected to the ErrorServlet. Yay.
    However, exceptions being thrown in either a .jsp or .tag still don't direct me to the ErrorServlet. Apparently this error handling mechanism doesn't work for .jsp pages reached via servletContext.getRequestDispatcher("/" + pageName).forward(request, response) ????
    So I'm just at a total loss now. I know the short answer is "don't throw exceptions in a .jsp or .tag" but frankly, that seems a pretty weak answer that doesn't really address my problem... I mean, it would really be nice to have some kind of exception handler for runtime exceptions thrown in a scriptlet in .tag file, that allows me to forward to a page with detailed stacktrace output, etc, if anything for debugging purposes during development...
    If anyone has a few cents to spare on this, I'd be ever so grateful..
    Thanks!!
    Jeff

    What causes the exception?
    What sort of exception are you raising from the tag files?
    Have you got an example of a tag file that you can share, and a jsp that invokes it so people can duplicate the issue without thinking too much / spending too much time?
    My first instinct would be that the buffer is being flushed, and response committed before your Exception is raised.
    What you describe is pretty much standard functionality for Tomcat in such cases.

  • Uncaught exception raised in Open Directory client-side plugin

    I am having an issue whenever I try to access my Open Directory. It says Uncaught exception raised in Open Directory client-side plugin.
    In updateConfigurationViewFromDescription: NSInvalidArgumentException *** - [NSplaceholderMutableString initWithString:]: nil argument.
    I'm having a hard time finding a directory with the relative plugin. Could you point me the right way? Perhaps finding and deleting that little bugger would help?  I'm running Lion Server 10.7.3 with the 10.7.3 Server Admin tools. The goal here is to set up Deploy Studio for our organization, which I had working for a little while until this little guy started rearing his ugly head.
    Thanks much-

    Dear cdolan92,
    not really. It has been a while. I think I also deleted server.app and admin tools and reinstalled those.
    Perhaps I even did a backup of open directory and turned off the master to local and back to master.
    But I am not sure any more.
    Sorry.
    Best
    H.

  • Handling exception thrown by parseEscapedXML function

    Hi,
    I am using parseEscapedXML function to parse an xml string in the below format .
    <parameters><item id="" value=""/><item id="" value=""/></parameters>
    The exception thrown when input is in incorrect xml format is not caught using catchAll.
    Kindly check if anyone have any idea about this.

    Hi,
    Ideally your BAPI shouldn't raise exceptions - it is much better to use the RETURN table from your BAPI with any relevant messages - have a look at the majority of standard SAP BAPI's in transaction BAPI.
    This way, the only exceptions your try... catch block needs to handle are those related to the actual calling of your BAPI, not it's functionality.
    Also, if you can successfully run the BAPI in SE37 but it fails when called from your WD application, try using the FBGENDAT functionality to capture what data is being passed to SAP from your Web Dynpro application.  All it takes is a simple mistake in setting up your contexts or logic and you won't be calling your BAPI correctly.
    Hope this helps,
    Gareth.

  • How to handle text of iframe to send to remote printer in client side?

    Hello everybody,
    I am having problem to handle the printing text of iframe to send to remote printer. I am using JDK 1.5, JSP and JBOSS. My clients have to print the information displayed in iframe to their remote Printer. I am using javascript code below to print:
    /* CODE IS IN JAVASCRIPT */
         document.frames[frameName].focus();
         document.frames[frameName].print(); But the main problem is that it takes a lot of times about 2 mins. Why is the above code taking so long time? Is it due to javascript code or the printing process? Is there any method or function to send printing text of iframe to printer faster?
    can anyone help me to solve this problem.....
    Thank You.
    Edited by: ritesh163 on Aug 20, 2008 2:45 PM

    ritesh163 wrote:
    Hello stevejluke,
    I am seeking for the suggestion whether it can be done through javascript or there is any other function or method in JSP that can replay javascript code and also work faster.
    Thank you.But JSP has nothing to do with it. JSP lives on the server, not the client. If can't control the client printer, can't know about it, and can't print to it. This is purely client-side, which means not JSP.

  • How to handle exceptions thrown by event

    Hi all,
    i have this slight problem, i'm trying to handle accessing a databse from a button click, i'm trying to simulate somebody logging on to a network. the code is as follows;
    *@author James Taylor
    *@version 30-11-2003
    *Logon gui
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.sql.*;
    public class LogonUI extends JFrame {
         //instance variables
         private JLabel userNameL;
         private JPasswordField password;
         private JButton logon;
         ButtonHandler handler;
         Connection con;
         Statement stmt;
          *Constructor initialises and creates UI, adds functionality to the button.
         public LogonUI() throws SQLException, ClassNotFoundException, IllegalAccessException, InstantiationException{
              super("Employee Logon");
              Container c = getContentPane();
              c.setLayout(new FlowLayout() );
              //handles what happens when user presses the button
               handler = new ButtonHandler();
              userNameL = new JLabel("Please Enter Password:");
              c.add(userNameL);
              password = new JPasswordField(15);
              c.add(password);
              logon = new JButton( "Logon" );
              //anonymous inner class that is created once the button is pressed.
              //it connects to database to validate user
              logon.addActionListener( handler );
              c.add(logon);
              c.setBackground( Color.pink );
              setDefaultCloseOperation(DISPOSE_ON_CLOSE);
              setSize(250,150);
              setVisible(true);
          *class that opens connection to validate user
         private class ButtonHandler implements ActionListener {
              public void actionPerformed(ActionEvent ae)throws SQLException, ClassNotFoundException, IllegalAccessException, InstantiationException{
                   try{
                        boolean isValidUser = false;
                        //Load mysql driver
                         Class.forName("com.mysql.jdbc.Driver").newInstance();
                         //make a connection
                        String url = "jdbc:mysql://localhost/flight";
                        con = DriverManager.getConnection(url)
                        //Create and instantiate a statement obj
                        stmt = con.createStatement();
                        //get a result set
                        ResultSet rs = stmt.executeQuery("SELECT Password FROM employees");
                        //Iterate through the result set
                        while ( rs.next() ){     
                             String savedPassword = rs.getString("Password");
                             if (password.getText().equals(savedPassword) ){
                                  isValidUser = true;
                                  JOptionPane.showMessageDialog(null,"Yipeeeee");
                        if (isValidUser == false){
                             JOptionPane.showMessageDialog(null,"Invalid Password");     
                        stmt.close();
                        con.close();
                   }catch(Exception e){ e.printStackTrace();}
              public static void main (String[] args) throws SQLException, ClassNotFoundException, IllegalAccessException, InstantiationException{
              LogonUI testAirApp = new LogonUI();
    }When the user presses the button the app tries to validate the user.
    I have not been able to test the code due to SQL Exceptions thrown in the handler class, and when i try and throw them up from here i get;
    LogonUI.java:52: actionPerformed(java.awt.event.ActionEvent) in LogonUI.ButtonHandler cannot implement actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener; overridden method does not throw java.lang.InstantiationExceptionAny ideas on my code and how to handle these exceptions will be very appreciated. Regards, James

    Turn your checked exceptions into unchecked exceptions and retrieve the cause later:
    RuntimeException unchecked = new RuntimeException(checked);
    Throwable t = unchecked.getCause();Stephen

Maybe you are looking for

  • Difference in String declaration

    Hello All, Can any one please tell me whats the difference between following String declarations: a) String str = "abc"; b) String str = new String( "abc" ); Also please tell me which one is correct way of declaration and in which sence. Thanks in ad

  • Running a smoot and constant frame rate?

    Hi, Can someone please show me a way in which I can maintain a constant fram rate, cause the only use of: try { Thread.sleep(snooze); }catch (InterruptedException ex) { // do nothing is a bit bumpy, i.e. the frame rate increases and decreases as it w

  • How do you use a Springboard Module in a Visor?

    I have a Visor Springboard question I hope someone can help me with. I use a medical device module that uses the expansion slot. It plugs into the Visor and comunicates with a medical implant wirelessly. The medical device came with a new Visor. I go

  • Using JCom for getting the user name

    I am using jcom610-win.exe and weblogic610sp2_win.exe .I need to use the Jcom for getting the user name of the NT Iser Logged in.I have got the process for this on the page at http://e-docs.bea.com/wls/docs61/jcomreference/Security.html .But this pag

  • Mac Book Pro Visually Deformed Battery

    Here is the another example with so called, Visually Deformed Battery. You can see it for yourself on this link. http://www.flickr.com/photos/moth3r/sets/72157622678416670/ I have already contacted Apple through Local Apple Representative in Croatia,