db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Van Couvering (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1069) Client should unwrap exceptions thrown in privilege blocks rather than throwing the java.security.PrivilegedActionException
Date Fri, 02 Jun 2006 00:43:31 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1069?page=comments#action_12414331 ] 

David Van Couvering commented on DERBY-1069:
--------------------------------------------

Hm.  In the source code I have:

        try {
            socket_ = (java.net.Socket) java.security.AccessController.doPrivileged(new OpenSocketAction(server,
port));
        } catch (java.security.PrivilegedActionException e) {
            throw new DisconnectException(this,
                new ClientMessageId(SQLState.CONNECT_UNABLE_TO_CONNECT_TO_SERVER),
                new Object[] { e.getClass().getName(), server, new Integer(port), 
                    e.getException().getMessage() },
                e.getException());
        }


So, we are unwrapping the exception to get the message, and chaining the unwrapped exception.
 However, the name of the original exception is not used as the first parameter in the Object
array.  That I can fix.

But, what happens to the stack trace when you use ij?  Do you have to enable logging to see
it?


> Client should unwrap exceptions thrown in privilege blocks rather than throwing the java.security.PrivilegedActionException
> ---------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1069
>          URL: http://issues.apache.org/jira/browse/DERBY-1069
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Reporter: Daniel John Debrunner
>     Assignee: David Van Couvering

>
> Can lead to misunderstanding the root cause of the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message