on 04-01-2010 7:59 AM
Hi Experts,
I am getting a ClassCastException in the very first line of the code mentioned below
IUWLService uwlService =(IUWLService) WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);
when I am trying to get the UWL Service in a web dynpro DC maintained on NWDI track. I have created an external Library DC to put the following jars-
bc.uwl.service.api_api.jar
com.sap.security.api.jar
com.sap.security.api.perm.jar
prtapi.jar
And, have also created J2EE Library to deploy the jars in the External Library by adding dependency using public parts and used the Def public part of this J2EE Library in my target application. Apart from adding in the used DC I have put the following entries in the Web Dynpro References>Library References as well:
tckmcbc.uwl~api
bhi.com~bhmdm_uwl_j2eelib (where bhmdm_uwl_j2eelib is the J2EE Library and bhi.com is the vendor name)
The same set of code works all fine when I follow the same approach for Local Development Component (not on track).
Can you suggest me the possible reasons for it?
I am not sure if I have missed any jars as in compile time as well as in runtime it is working for Local DCs (not on track)
Regards,
Tushar S
Hi,
Nothing is missing, you have all the jar files, as per the error Object Typecasting getting problem at the line
IUWLService uwlService =(IUWLService) WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);
please check the return type of the below line ( open the WDPortalUtils class and check the return type of getServiceReference(XX) method )
WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);
And then Typecast with super class
Thanks,
Sreeni.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tushar,
1) Add Used DCs tc/kmc/bc.uwl/api added from sap.com_UWLJWF SC. Dependency can be Build Time.
2) in web Dynpro projects Library refrences ensure that you have
a) tckmcbc.uwl~api
b) entry for your external library DC something like tc/wd/libraryproject
try adding additional libraries in your library dc
1) bc.rf.framework_api.jar
2) bc.util.public_api.jar
Regards !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.