on 12-01-2008 2:31 PM
Hi guys,
To be honest I normally develop in ABAP Webdynpro but have had to change to Java Webdynpro for one specific piece of development.
Here goes....I am debugging my application in Eclipse with the code being deployed remotely to the server. Here is the code snippet that is not working:
IWDClientUser wdClientUser =WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
sapUser.getAccessibilityLevel();
com.sapportals.portal.security.usermanagement.IUser ep5User =
com.sapportals.wcm.util.usermanagement.WPUMFactory.getUserFactory().getEP5User(sapUser);{code}
The BOLD line above always raises an NULLPOINTER exception.
The application is not in an iView yet on the Portal as I am still coding....but surely I can test like this?
Reason I need the user is that I need to upload files to KM......
I have all the correct JAR files installed......I think.....
1) \lib\prtapi.jar
2) Portal user management API - \portalapps\com.sap.portal.usermanagement\lib\com.sap.security.api.e p5.jar
3) \portalapps\com.sap.netweaver.bc.rf\lib\bc.rf.framework_api.jar
4) KM Repository Framework APIs - \portalapps\com.sap.netweaver.bc.rf.service\lib\bc.rf.global.service.urlgenerator_api.jar
5) Repository Framework Utility: URL Generator - \portalapps\com.sap.netweaver.bc.sf\lib\bc.sf.framework_api.jar
6)Repository Framework: Repository Services \portalapps\com.sap.netweaver.bc.util\lib\bc.util.public_api.jar
7) com.sap.security.api.perm.jar
This is really holding back my development time.....does anyone have any ideas on why it is throwing a nullpointer exception or how I can get around this error?
Thanks for the help
Lynton
Hi,
If you have already created the application you can set the authentication by double clicking on the application; select the tab Application Properties; click on New a pop up will open up; selected the radio button pre defined; click on Browse; select Autentication from the list; and set the value to true from drop down.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi lynton,
please check the following link it may help you...
http://help.sap.com/saphelp_nw04/helpdata/en/b9/9482887ddb3e47bd1a738c3e900195/frameset.htm
Thanks and Regards
shanto aloor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you enabled authentication for your application?
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do I enable authentication on a Java Webdynpro application? Is there a checkbox somewhere?
If I choose to deploy and run the application from the SAP Netweaver Developer Studio and it runs on a remote SAP Portal server, can I get access to the EP user in code or do I have to stick it into an iView for that?
Also, with teh JAR files I have copied them into the webdynpro folder and am not referencing the ones on the server....would that make a difference?
Thanks again
Lynton
Hi,
How do I enable authentication on a Java Webdynpro application? Is there a checkbox somewhere?
Go to the application properties and select authentication and set the value to true.
If I choose to deploy and run the application from the SAP Netweaver Developer Studio and it runs on a remote SAP Portal server, can I get access to the EP user in code or do I have to stick it into an iView for that?
If you run with the authentication enabled, you will get the logged in user using the WDClientUser API's
Also, with teh JAR files I have copied them into the webdynpro folder and am not referencing the ones on the server....would that make a difference?
If you are using DC's for development make use of references to the respective Dc's instead of adding archives. Hope both the systems are on same patch levels.
Regards
Ayyapparaj
Hi,
Tick will be available only when you create a new application. If the application is already created, you can check if authetication has been set or edit to set it. Double click application name. Go to Application Properties tab. If there is no authentication property set, then click on New button. Select Predefined radio button. Click Browse and choose Authentication. Select value as true or false as required.
Regards,
Harini S
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.