cancel
Showing results for 
Search instead for 
Did you mean: 

External Mapping across different WD DCs

Former Member
0 Kudos

Problem Definition -:

I have created three different DCs, one of type Java and two DCs of type Web Dynpro Java.

The java DC's API and SDA definition are present in both the WD DCs in the child component definition. Using external mapping between the two WD DCs I have shared a context node containing an attribute of an object (from one of the class in the java DC).

When I try to use the instance of this object in the child WD DC, I am getting a java.lang.ClassCastException exception. I beleive this is because the two DCs are using different class loader.

Is there any way to share the java class objects across different WD DCs?

Thanks,

Paritosh.

Accepted Solutions (1)

Accepted Solutions (1)

Sigiswald
Contributor
0 Kudos

Hi Paritosh,

The way we solved the same issue is as follows:

1. create a new DC of type Web Dynpro that only defines the public part of type Assembly of your java DC as a used DC; assume the DC is called "mycompany.com/sapwdsv~bol" (meaning Web Dynpro - Service - Business Object Loader)

2. in your 2 WD DCs, only define the public part of type API of your java DC as a used DC

3. in your 2 WD DCs, create a sharing reference to the new DC you created above; in the Web Dynpro Explorer view, right click the WD DC project, choose Properties > Web Dynpro References > Sharing references and add a new entry called "mycompany.com/sapwdsv~bol"

This allows different WD DCs to use the API of a java DC, but deploys the assembly of the java DC only once in a separate WD DC. At runtime the different WD DCs refer to the single WD DC that contains the assembly of the java DC and this ensures only a single class loader is used.

Does anyone know of another solution?

Kind regards,

/Sigiswald

Former Member
0 Kudos

Hi Sigiswald,

Thanks a lot for the quick reply.

Though I did not use the approach of creating the WD DC as a wrapper for my java DC but the reponse helped me to understand how to manipulate the WD DCs with the correct Assembly and APIs.

Thanks Again,

Paritosh

Answers (0)