ClassCastException when Untyped Component with Java interface gets its non-Java implementation

While reading about Service Component Architecture (SCA) interfaces in Interfaces of the WebSphere Enterprise Service Bus, Version 7.0 information center, I came across the following paragraph:

All components have interfaces of the WSDL type. Only Java components support Java-type interfaces. If a component, import or export, has more than one interface, all interfaces must be the same type.

Leaving aside the typo – missing ‘of’ in the ‘must be the same type’, let’s trun our attention to the other parts of the quotation.

There’re 7 different types of SCA component supported by IBM WebSphere Process Server (WPS) V7 and, a feature of IBM WebSphere Integration Developer (WID), a single Untyped Component for a component with no type assigned (it’s useful during modeling/designing when it’s not known what type should the component be of).

WID7 SCA components palette

The certificate IBM Certified Integration Developer – WebSphere Process Server V7.0 I’m aiming at lists Design and use WSDL interfaces as a requirement (cf. Objectives), but while I was previously attempted to pass the exam (for 6.1 and 6.2) I run across a few questions about difference between components as far as what interface types are supported and their use cases.

When you implement a component, say Process, you may be asked for an interface. As it was stated above, only WSDL type is supported. The tooling – WID, won’t let you pick the other – a Java interface.

When you create a Java component, you’re able to pick an interface of any type – WSDL and/or Java.

WID’s even as sophisticated as limiting the choice of a Java component interface type to the type of already selected interface.

Alas, it can’t handle a use case when a Untyped Component has an interface of Java type assigned and a wrong implementation is chosen.

Select any component but Java and you’ll get punched with the following java.lang.ClassCastException: incompatible with (when Process has been selected)

or the error for Human Task.

Nothing wrong and frankly helps me greatly remembering all these options, but I’d very much like when the popup window “Implement As…” showed the component types compatible for a given component and its interface type only. My wish for the following fix pack.

Be Sociable, Share!
This entry was posted in WebSphere.

Leave a Reply

%d bloggers like this: