You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by ko...@accenture.com on 2010/12/08 06:57:30 UTC

TypeHelper ClassCastException - WESB and Tuscany incompatibility?

Hi All,

I'm using WID 7.0.3 to access WSRR and keep getting the following Tuscany SDO exception.
Went through the archives and also incorporated the usage of "DataObjectUtil.initRuntime()", which hasn't resolved the issue.

Error:
Caused by: java.lang.ClassCastException: com.ibm.xml.sdo.helper.TypeHelperImpl incompatible with org.apache.tuscany.sdo.helper.TypeHelperImpl
      at org.apache.tuscany.sdo.util.SDOUtil.createType(SDOUtil.java:379)
      at com.ibm.sr.sdo.helper.impl.BSRSDOHelperImpl.<clinit>(BSRSDOHelperImpl.java:128)
      at java.lang.J9VMInternals.initializeImpl(Native Method)
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)

Calling Code:
DataObjectUtil.initRuntime();
GraphQuery query = (GraphQuery) DataFactory.INSTANCE.create(TypeConstants.SR_URI, TypeConstants. TYPE_GRAPHQUERY);

This looks very similar to a number of related "ClassCastException" posts, but I haven't been able to resolve it with DataObjectUtil.initRuntime.
Would greatly appreciate any pointers!

Thanks,
K.S


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

Re: TypeHelper ClassCastException - WESB and Tuscany incompatibility?

Posted by Simon Laws <si...@googlemail.com>.
>
> Hi
>
> It looks like  org.apache.tuscany.sdo.helper.TypeHelperImpl it getting
> confused for some IBM code of the same name (but different package).
> Looking at the SDO code base I don't immediately see that
> TypeHelperImpl is specified declaratively so I'll have to take a
> closer look and see if I can work out what's going on an how the wrong
> implementation is being loaded.
>
> Simon
>
> --
> Apache Tuscany committer: tuscany.apache.org
> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>

Not being an SDO expert I was looking in the wrong place. The sdo-api
has a bit of bootstrap code in

commonj.sdo.impl.HelperProvider

It looks in

- a property called "commonj.sdo.impl.HelperProvider"
- META-INF/services/commonj.sdo.impl.HelperProvider

For the name of the class implementing the helper provider and then
loads it. If the Tuscany SDO jar is in you environment it's possible
that this is kicking in by mistake.

Do you by any chance have the Tuscany SDO jars in the environment
alongside all the IBM stuff?

Regards

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Re: TypeHelper ClassCastException - WESB and Tuscany incompatibility?

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Dec 8, 2010 at 5:57 AM,  <ko...@accenture.com> wrote:
> Hi All,
>
>
>
> I’m using WID 7.0.3 to access WSRR and keep getting the following Tuscany
> SDO exception.
>
> Went through the archives and also incorporated the usage of
> “DataObjectUtil.initRuntime()”, which hasn’t resolved the issue.
>
>
>
> Error:
>
> Caused by: java.lang.ClassCastException:
> com.ibm.xml.sdo.helper.TypeHelperImpl incompatible with
> org.apache.tuscany.sdo.helper.TypeHelperImpl
>
>       at org.apache.tuscany.sdo.util.SDOUtil.createType(SDOUtil.java:379)
>
>       at
> com.ibm.sr.sdo.helper.impl.BSRSDOHelperImpl.<clinit>(BSRSDOHelperImpl.java:128)
>
>       at java.lang.J9VMInternals.initializeImpl(Native Method)
>
>       at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
>
>
>
> Calling Code:
>
> DataObjectUtil.initRuntime();
>
> GraphQuery query = (GraphQuery)
> DataFactory.INSTANCE.create(TypeConstants.SR_URI, TypeConstants.
> TYPE_GRAPHQUERY);
>
>
>
> This looks very similar to a number of related “ClassCastException” posts,
> but I haven’t been able to resolve it with DataObjectUtil.initRuntime.
>
> Would greatly appreciate any pointers!
>
>
>
> Thanks,
>
> K.S
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.

Hi

It looks like  org.apache.tuscany.sdo.helper.TypeHelperImpl it getting
confused for some IBM code of the same name (but different package).
Looking at the SDO code base I don't immediately see that
TypeHelperImpl is specified declaratively so I'll have to take a
closer look and see if I can work out what's going on an how the wrong
implementation is being loaded.

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com