You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org> on 2007/07/12 23:28:04 UTC

[jira] Created: (TUSCANY-1429) Using default helper context got ClassCastException due to T-1317

Using default helper context got ClassCastException due to T-1317
-----------------------------------------------------------------

                 Key: TUSCANY-1429
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1429
             Project: Tuscany
          Issue Type: Bug
          Components: Java SDO Implementation
    Affects Versions: Java-SDO-M2
         Environment: WinXP
            Reporter: Fuhwei Lwo
             Fix For: Java-SDO-1.0


Starting from T-1317, we started to use HelperContext as the scope instead of TypeHelper or XSDHelper. The ClassCastException problem starts to appear when we need to cast HelperContext to HelperContextImpl to access the XMLStreamHelperImpl which is not a spec compliant Helper because the default helper context is not an instance of HelperContextImpl.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-1429) Using default helper context got ClassCastException due to T-1317

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelvin Goodson resolved TUSCANY-1429.
-------------------------------------

    Resolution: Fixed

Resolving this but will open a jira to complete the updates to the API in the trunk

> Using default helper context got ClassCastException due to T-1317
> -----------------------------------------------------------------
>
>                 Key: TUSCANY-1429
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1429
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M2
>         Environment: WinXP
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-1.0
>
>         Attachments: 1429.patch, 1429.patch
>
>
> Starting from T-1317, we started to use HelperContext as the scope instead of TypeHelper or XSDHelper. The ClassCastException problem starts to appear when we need to cast HelperContext to HelperContextImpl to access the XMLStreamHelperImpl which is not a spec compliant Helper because the default helper context is not an instance of HelperContextImpl.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1429) Using default helper context got ClassCastException due to T-1317

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513278 ] 

Kelvin Goodson commented on TUSCANY-1429:
-----------------------------------------

Fuhwei,
   thanks for this. One issue I have is the casting of HelperContexts in the test cases to HelperContextImpls.   I think the new method in SDOHelper should be getXMLStreamHElper(HelperContext),  and then we can get rid of all the casting to impls.  There's no need for any change to what is now the SDOHelperImpl.createXMLStreamHelper method,  since it is really already getter method. 


> Using default helper context got ClassCastException due to T-1317
> -----------------------------------------------------------------
>
>                 Key: TUSCANY-1429
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1429
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M2
>         Environment: WinXP
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-1.0
>
>         Attachments: 1429.patch
>
>
> Starting from T-1317, we started to use HelperContext as the scope instead of TypeHelper or XSDHelper. The ClassCastException problem starts to appear when we need to cast HelperContext to HelperContextImpl to access the XMLStreamHelperImpl which is not a spec compliant Helper because the default helper context is not an instance of HelperContextImpl.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1429) Using default helper context got ClassCastException due to T-1317

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fuhwei Lwo updated TUSCANY-1429:
--------------------------------

    Attachment: 1429.patch

Uploading 1429.patch to fix this problem by forcing commonj.sdo.HelperProvider from the spec to instantiate Tuscany's HelperContextImpl for the default helper context. This would allow us to cast the HelperContext to HelperContextImpl whenever we need to access Tuscany specific information like XMLStreamHelper.

I also took the liberty to clean up client APIs such as SDOHelper, SDOHelperImpl, api.SDOUtil, and util.SDOUtil to use HelperContext as scope instead of TypeHelper and XSDHelper. The approach I am taking is to deprecate APIs with TypeHelper/XSDHelper parameters and create new ones with HelperContext. I also fixed test cases using those newly deprecated APIs.  Please review. Thanks.

> Using default helper context got ClassCastException due to T-1317
> -----------------------------------------------------------------
>
>                 Key: TUSCANY-1429
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1429
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M2
>         Environment: WinXP
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-1.0
>
>         Attachments: 1429.patch
>
>
> Starting from T-1317, we started to use HelperContext as the scope instead of TypeHelper or XSDHelper. The ClassCastException problem starts to appear when we need to cast HelperContext to HelperContextImpl to access the XMLStreamHelperImpl which is not a spec compliant Helper because the default helper context is not an instance of HelperContextImpl.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1429) Using default helper context got ClassCastException due to T-1317

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fuhwei Lwo updated TUSCANY-1429:
--------------------------------

    Attachment: 1429.patch

Just found out the existing SDOUtil.createXMLStreamHelper(HelperContext hc) has satisfied the requirement of getting the XMLStreamHelper without casting. I have changed the test cases to use the existing SDOUtil API.

> Using default helper context got ClassCastException due to T-1317
> -----------------------------------------------------------------
>
>                 Key: TUSCANY-1429
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1429
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M2
>         Environment: WinXP
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-1.0
>
>         Attachments: 1429.patch, 1429.patch
>
>
> Starting from T-1317, we started to use HelperContext as the scope instead of TypeHelper or XSDHelper. The ClassCastException problem starts to appear when we need to cast HelperContext to HelperContextImpl to access the XMLStreamHelperImpl which is not a spec compliant Helper because the default helper context is not an instance of HelperContextImpl.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org