You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Thilina Gunarathne (JIRA)" <ji...@apache.org> on 2007/01/29 12:41:49 UTC

[jira] Created: (AXIS2-2051) Axis2 fails when init(ServiceContext) is not implemented in the skeleton

Axis2 fails when init(ServiceContext) is not implemented in the skeleton
------------------------------------------------------------------------

                 Key: AXIS2-2051
                 URL: https://issues.apache.org/jira/browse/AXIS2-2051
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
            Reporter: Thilina Gunarathne
            Priority: Critical


Following method in the DependencyManager is the culprit... Class.getMethod throws an methodNotFound exception when the init() method is not in the skeleton..   

public static void initServiceClass(Object obj,
                                        ServiceContext serviceContext) {
        try {
            Class classToLoad = obj.getClass();
            // We can not call classToLoad.getDeclaredMethed() , since there
            //  can be insatnce where mutiple services extends using one class
            // just for init and other reflection methods
            Method method = classToLoad.getMethod(SERVICE_INIT_METHOD, new Class[]{ServiceContext.class});
            if (method != null) {
                method.invoke(obj, new Object[]{serviceContext});
            }
        } catch (SecurityException e) {
            log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
        } catch (IllegalArgumentException e) {
            log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
        } catch (IllegalAccessException e) {
            log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
        } catch (InvocationTargetException e) {
            log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
        } catch (NoSuchMethodException e) {
            log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
        }
    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2051) Axis2 fails when init(ServiceContext) is not implemented in the skeleton

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilina Gunarathne resolved AXIS2-2051.
---------------------------------------

    Resolution: Invalid

The error was actually caused by something else...  

> Axis2 fails when init(ServiceContext) is not implemented in the skeleton
> ------------------------------------------------------------------------
>
>                 Key: AXIS2-2051
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2051
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Thilina Gunarathne
>            Priority: Critical
>
> Following method in the DependencyManager is the culprit... Class.getMethod throws an methodNotFound exception when the init() method is not in the skeleton..   
> public static void initServiceClass(Object obj,
>                                         ServiceContext serviceContext) {
>         try {
>             Class classToLoad = obj.getClass();
>             // We can not call classToLoad.getDeclaredMethed() , since there
>             //  can be insatnce where mutiple services extends using one class
>             // just for init and other reflection methods
>             Method method = classToLoad.getMethod(SERVICE_INIT_METHOD, new Class[]{ServiceContext.class});
>             if (method != null) {
>                 method.invoke(obj, new Object[]{serviceContext});
>             }
>         } catch (SecurityException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         } catch (IllegalArgumentException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         } catch (IllegalAccessException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         } catch (InvocationTargetException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         } catch (NoSuchMethodException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2051) Axis2 fails when init(ServiceContext) is not implemented in the skeleton

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468527 ] 

Thilina Gunarathne commented on AXIS2-2051:
-------------------------------------------

changed the last log.info in to a log.debug

> Axis2 fails when init(ServiceContext) is not implemented in the skeleton
> ------------------------------------------------------------------------
>
>                 Key: AXIS2-2051
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2051
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Thilina Gunarathne
>            Priority: Critical
>
> Following method in the DependencyManager is the culprit... Class.getMethod throws an methodNotFound exception when the init() method is not in the skeleton..   
> public static void initServiceClass(Object obj,
>                                         ServiceContext serviceContext) {
>         try {
>             Class classToLoad = obj.getClass();
>             // We can not call classToLoad.getDeclaredMethed() , since there
>             //  can be insatnce where mutiple services extends using one class
>             // just for init and other reflection methods
>             Method method = classToLoad.getMethod(SERVICE_INIT_METHOD, new Class[]{ServiceContext.class});
>             if (method != null) {
>                 method.invoke(obj, new Object[]{serviceContext});
>             }
>         } catch (SecurityException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         } catch (IllegalArgumentException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         } catch (IllegalAccessException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         } catch (InvocationTargetException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         } catch (NoSuchMethodException e) {
>             log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org