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

[jira] Created: (TUSCANY-2346) weaks in databinding-jaxb plug-in

weaks in databinding-jaxb plug-in
---------------------------------

                 Key: TUSCANY-2346
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2346
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Data Binding Runtime, Java SCA OSGi Integration
    Affects Versions: Java-SCA-1.2
         Environment: databinding-jaxb, OSGi (but i think it should affects non-OSGi version too)
            Reporter: Ivan Churkin


There is a JAXB feature to create JAXB context by specifying the whole array of all mapping classes. Tuscany databinding-jaxb plug-in unable to work with.
As a result, when application uses SCA for transmitting objects created by specifying complex JAXB context  it crashes.

This plug-in (databinding-jaxb) creates context for marshalling on very simple way. It gets class of root object and asks for JAXB to create context by providing it. So it supports only simple/default JAXB contexts.

Its suggested more sophisticated procedure.
1. try to use default/simple context
2. if it does not work,  to collect all JAXB related classes used in instance object and its properties/subobjects by reflection and to create context by array.

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


[jira] Commented: (TUSCANY-2346) weaks in databinding-jaxb plug-in

Posted by "Simon Nash (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600433#action_12600433 ] 

Simon Nash commented on TUSCANY-2346:
-------------------------------------

 recently added code in JAXBTypeHelper that does something similar to this.  It's used to create a JAXB context for use in Java to WSDL runtime schema generation.  Ideally this code would be combined so that there's only one copy.

I'd like to experiment with doing this.  Can you attach a test case that demonstrates the current failure, so that I can verify that the combined code works OK in your scenario?

> weaks in databinding-jaxb plug-in
> ---------------------------------
>
>                 Key: TUSCANY-2346
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2346
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime, Java SCA OSGi Integration
>    Affects Versions: Java-SCA-1.2
>         Environment: databinding-jaxb, OSGi (but i think it should affects non-OSGi version too)
>            Reporter: Ivan Churkin
>         Attachments: JAXBDataBinding.java
>
>
> There is a JAXB feature to create JAXB context by specifying the whole array of all mapping classes. Tuscany databinding-jaxb plug-in unable to work with.
> As a result, when application uses SCA for transmitting objects created by specifying complex JAXB context  it crashes.
> This plug-in (databinding-jaxb) creates context for marshalling on very simple way. It gets class of root object and asks for JAXB to create context by providing it. So it supports only simple/default JAXB contexts.
> Its suggested more sophisticated procedure.
> 1. try to use default/simple context
> 2. if it does not work,  to collect all JAXB related classes used in instance object and its properties/subobjects by reflection and to create context by array.

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


[jira] Commented: (TUSCANY-2346) weaks in databinding-jaxb plug-in

Posted by "Ivan Churkin (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601976#action_12601976 ] 

Ivan Churkin commented on TUSCANY-2346:
---------------------------------------

It looks like this problem may occurs only in OSGi application, because multiple classloaders.
I tested with simple application and all was ok.

Please look at the workspace attached. Its not complete testcase but it create required JAXB object.

Unit test is in the bundle "org.eclipse.eilf.jaxbsample.test"

It creates JAXB object by loading classes from two different bundles
"org.eclipse.eilf.jaxbsample.root" and "org.eclipse.eilf.jaxbsample.sub"

The classloader of the second bundle able to load all classes
but the classloader of root class located in the first bundle and unable to see classes located in the second bundle.
That is the problem

Is you will try to pass object through SCA it will cause error mentioned.


> weaks in databinding-jaxb plug-in
> ---------------------------------
>
>                 Key: TUSCANY-2346
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2346
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime, Java SCA OSGi Integration
>    Affects Versions: Java-SCA-1.2
>         Environment: databinding-jaxb, OSGi (but i think it should affects non-OSGi version too)
>            Reporter: Ivan Churkin
>         Attachments: JAXBDataBinding.java, workspace.rar
>
>
> There is a JAXB feature to create JAXB context by specifying the whole array of all mapping classes. Tuscany databinding-jaxb plug-in unable to work with.
> As a result, when application uses SCA for transmitting objects created by specifying complex JAXB context  it crashes.
> This plug-in (databinding-jaxb) creates context for marshalling on very simple way. It gets class of root object and asks for JAXB to create context by providing it. So it supports only simple/default JAXB contexts.
> Its suggested more sophisticated procedure.
> 1. try to use default/simple context
> 2. if it does not work,  to collect all JAXB related classes used in instance object and its properties/subobjects by reflection and to create context by array.

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


[jira] Updated: (TUSCANY-2346) weaks in databinding-jaxb plug-in

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

Ivan Churkin updated TUSCANY-2346:
----------------------------------

    Environment: databinding-jaxb, OSGi  (was: databinding-jaxb, OSGi (but i think it should affects non-OSGi version too))

> weaks in databinding-jaxb plug-in
> ---------------------------------
>
>                 Key: TUSCANY-2346
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2346
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime, Java SCA OSGi Integration
>    Affects Versions: Java-SCA-1.2
>         Environment: databinding-jaxb, OSGi
>            Reporter: Ivan Churkin
>         Attachments: JAXBDataBinding.java, workspace.rar
>
>
> There is a JAXB feature to create JAXB context by specifying the whole array of all mapping classes. Tuscany databinding-jaxb plug-in unable to work with.
> As a result, when application uses SCA for transmitting objects created by specifying complex JAXB context  it crashes.
> This plug-in (databinding-jaxb) creates context for marshalling on very simple way. It gets class of root object and asks for JAXB to create context by providing it. So it supports only simple/default JAXB contexts.
> Its suggested more sophisticated procedure.
> 1. try to use default/simple context
> 2. if it does not work,  to collect all JAXB related classes used in instance object and its properties/subobjects by reflection and to create context by array.

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


[jira] Updated: (TUSCANY-2346) weaks in databinding-jaxb plug-in

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

Ivan Churkin updated TUSCANY-2346:
----------------------------------

    Attachment: JAXBDataBinding.java

Patch (not complete implementation)

> weaks in databinding-jaxb plug-in
> ---------------------------------
>
>                 Key: TUSCANY-2346
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2346
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime, Java SCA OSGi Integration
>    Affects Versions: Java-SCA-1.2
>         Environment: databinding-jaxb, OSGi (but i think it should affects non-OSGi version too)
>            Reporter: Ivan Churkin
>         Attachments: JAXBDataBinding.java
>
>
> There is a JAXB feature to create JAXB context by specifying the whole array of all mapping classes. Tuscany databinding-jaxb plug-in unable to work with.
> As a result, when application uses SCA for transmitting objects created by specifying complex JAXB context  it crashes.
> This plug-in (databinding-jaxb) creates context for marshalling on very simple way. It gets class of root object and asks for JAXB to create context by providing it. So it supports only simple/default JAXB contexts.
> Its suggested more sophisticated procedure.
> 1. try to use default/simple context
> 2. if it does not work,  to collect all JAXB related classes used in instance object and its properties/subobjects by reflection and to create context by array.

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


[jira] Updated: (TUSCANY-2346) weaks in databinding-jaxb plug-in

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

Ivan Churkin updated TUSCANY-2346:
----------------------------------

    Attachment: workspace.rar

eclipse workspace

> weaks in databinding-jaxb plug-in
> ---------------------------------
>
>                 Key: TUSCANY-2346
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2346
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime, Java SCA OSGi Integration
>    Affects Versions: Java-SCA-1.2
>         Environment: databinding-jaxb, OSGi (but i think it should affects non-OSGi version too)
>            Reporter: Ivan Churkin
>         Attachments: JAXBDataBinding.java, workspace.rar
>
>
> There is a JAXB feature to create JAXB context by specifying the whole array of all mapping classes. Tuscany databinding-jaxb plug-in unable to work with.
> As a result, when application uses SCA for transmitting objects created by specifying complex JAXB context  it crashes.
> This plug-in (databinding-jaxb) creates context for marshalling on very simple way. It gets class of root object and asks for JAXB to create context by providing it. So it supports only simple/default JAXB contexts.
> Its suggested more sophisticated procedure.
> 1. try to use default/simple context
> 2. if it does not work,  to collect all JAXB related classes used in instance object and its properties/subobjects by reflection and to create context by array.

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