on 04-12-2007 3:26 PM
Hi all,
I cannot access the portal service from my web dynpro dc.
1. I created a Portal Service (say xxxservice) in a DC (say the DC name is testservice and the vendor is xx.com)
2. Created a public part under the testservice DC and added my classes to it.
3. Built and deployed the testservice DC.
Now,
4. I created a web dynpro DC.
5. In the used DC section added the public part of the testservice DC and also the epbc.prtapi._api.jar for build time and runtime with strong qualifier.
6. In the web dynpro "Sharing Reference", I added PORTAL:xx.com/testservice
7. In the component controller, I am calling a method from the Portal Service.
8. Built the web dynpro DC and deployed it.
9. But at the run time it gives, NoClassDefFoundError on the xxxservice.
I looked at many forum threads and tried everything. For eg: changed the Sharing Reference to PORTAL:sap.com/testservice but nothing works.
Please do suggest me if I am missing something
Thanks
Hi Laxmi,
I am sure something wrong at Portal Service DC creation. On webdynpro part you done fine .. by putting PORTAL:sap.com/testservice
Check the below steps:
1. Create DC Portal Applicaiton Stand alone (SDA)
2. Add portal Service for the newly created portal service dc
3. build and activate
4. by default you should be get public part by name API which is compilation dependency
5. here you dont need to do anything else
6. on webdynpro just add the used dc to this API public part of portal service dc
7. add PORTAL:sap.com/testservice sharing reference
If u go by this you shouldnt get any error..
Now, u are saying something like ur own classes .. i think u are trying to put u r own classes to service.. but remeber portal service is to have only IYourService class and YourService class.. other classes should be made to be jar.. and add that jar to External library DC and create PPs compile & Assemble and add that DC to current service dc.
Hope it is clear.. if not pls let me know..
Thanks,
Raags
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raags,
You r awesome. It changed it to "<parfile>.TestService" and it worked like a charm.
Great
Thanks a ton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am getting a new error i.e., NullPointerException.
The service being returned is null.
I am using the following statement to get the service
ITestService testserv = (ITestService) WDPortalUtils.getServiceReference(ITestService.KEY);
Dont know why it returns a null testserv object
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No luck.
Now I am getting an error saying my ITestService class cannot be found.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Right now I am not using NWDI for this web dynpro DC. I just created a DC under my NWDS and deployed it.
Please let me know if I need to add any jar to the external library and expose that library as used DC in my web dynpro DC.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Thank u for all of ur response.
I created exactly the way you guys mentioned.
The problem is:
I created a custom method in my portal service say readProperties() and added the signatur of the method in the ITestService interface too..
In my web dynpro DC when I try accessing this method, I get an error saying:
java.lang.NoClassDefFoundError: com/sapportals/portal/prt/service/IService
Am I missing any jars which should be added to my web dynpro DC?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems SCA files are not checked in your NWDI Track. Usuall that IService class should be availble to you. As you are building using DC, Those classes should come thru SCA on your track like JTEC, PRT, etc SCAs.
pls check in your track whether these scas are checked in. you can see it in the transport studio of track on CMS page.
Thanks,
Raags
Hi Laxmi,
I think you have to add the "testservice" to the library references instead of sharing references of your webdynpro DC.
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After deploying the portal service, does the server needs a restart?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no need to do that.. u can check by going to the portal -> system administration -> support -> portal runtime -> Application Console -> here look for your TestService in the dropdown.. Now click show
Under Portal Service Items - you would see its started or stopped .. also allows u to restart the service..
Thanks,
Raags
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.