Obtaining SAP User information from J2EE Application
Hi All,
I am using SAP NetWeaver Developer Studio to create a J2EE Application, which requires accessing user information from SAP coming from Windows Active Directory.
My question is as follows;
Is there a possibility in a J2EE application to use an API to obtain user information (ie. from com.sap.security.api.jar) just like in a regular WebDyn Pro Application?
For Archive Build Info (compile time), do I need to import specific JARs? For runtime, do I need to load any project reference?
Thanks in advance,
Michael
Yes, I have added 'Run time' as well as 'Build time' for the com.sap.security.api.sda DC as well as for com.sap.tc.Logging DC.
I have also added the following references to application-j2ee-engine.xml file:
<application-j2ee-engine>
<reference
reference-type="hard">
<reference-target
provider-name="sap.com"
target-type="library">com.sap.security.api.sda</reference-target>
</reference>
<reference
reference-type="hard">
<reference-target
provider-name="sap.com"
target-type="library">com.sap.tc.Logging</reference-target>
</reference>
<provider-name>srl.com</provider-name>
<fail-over-enable
mode="disable"/>
</application-j2ee-engine>
I am still experiencing the same problem:
java.lang.NoClassDefFoundError: com/sap/tc/logging/Location
at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:178)
at srl.com.birthday.daemon.BirthdaysDaemon.loadEmployeesUser(BirthdaysDaemon.java:114)
at srl.com.birthday.daemon.BirthdaysDaemon.run(BirthdaysDaemon.java:72)
at java.lang.Thread.run(Thread.java:534)
Is there any other JAR I forgot to add to my used DC? Is the security JAR dependant on something else?
Thanks,
Michael
Similar Messages
-
Hello. I just upgraded to Lion OS X 10.7.3. I was previously running 10.5.7 which included the ENTOURAGE application. how do I retrieve needed information from this application that no longer runs on this new system?
The file you'll be looking for that has most of what you're looking for - messages, address book, etc. is the Entourage Database. The verison of Microsoft Office I run (on Lion) is Office 2008. By default the Entourage Database for this verison is at user/Documents/Microsoft User Data/Office 2008 Identities/Main Identity/Database. That folder (Main Identitty) also has your rules, signatures, and such. You'll have to recover this file from whatever backup you have. If you have a different version of Entourage, the file location will be a little diffferent.
Good luck
srb -
How can I change LDAT user attbibutes from my application ???
how can I change user attbibutes from my application!!!!
It always tries to create a new user but I need to change only values (like tel number!!!) of EXSISTING user!!!
I can not find any class/method to change the value of existing User attribute !!!
I am totally pissed off, please help!!!
I tried this :
AMUser user = amsc.getUser(userDN);
user.setStringAttribute("givenname", "test");chek this out----
String lastName = req.getParameter("lastname");
storeUserAttributes("sn", lastName, userAttributeMap);
private void storeUserAttributes(String attribute, String value, Map userMap)
Set userSet = new HashSet();
userSet.add(value);
userMap.put(attribute, userSet);
AMPeopleContainer ampc = conn.getPeopleContainer(ouDN);
AMPeopleContainer ampc = conn.getPeopleContainer(ouDN);
if(ampc !=null)
/*My code for create users with Sun Portal Desktop service*/
Set serviceNamesSet = new HashSet();
Set userSet = new HashSet();
serviceNamesSet.add("SunPortalDesktopService");
userSet = ampc.createUsers(userMap1, serviceNamesSet);
this will help u
http://lokeshpant.blogspot.com -
Failed to obtain image version information from Aperture library
Mac OS X 10.10.1 (yes, Yosemite...)
Aperture 3.6
Lightroom 5.7,1 (CC version)
When trying to import some libraries from aperture I get this immediate response "Failed to obtain image version information from Aperture library".
In the plug-in import window, Number of image/video files is "undetermined", as well as Disk space required.
Tried with different Aperture libraries, but with the same negative result.
The plug-in worked in previous Lightroom version or when it was a stand alone plug-in.
Thnak you
StefanoOK, here is the workaround I did to migrate all my images.
1. I broke down my Aperture library into separate libraries based on year (highlight all the 2014 projects, for example, right click, and "export to library")
2. Import each separate library into Lightroom, one at a time.
3. Delete the year-based libraries - and leave your original library on the drive (in case you need it in the future).
I found I had one project in my 2013 photos which was causing Lightroom's scan of my database to fail. So I ended up creating metadata riders for that one project and imported it after I got the rest of my images imported. -
Unable to edit user information from User Admin applet
Hi
I'm unable to update user information from user admin applet. After selecting a particular user, i'm updating his full name and trying to save the details. When i click on save i'm getting below error
"Unable to execute service EDIT_USER and function addUserAttributes",(System Error: Unable to execute query 'uUsersClassifiedMarkings(UPDATE Users SET uClassifiedMarkings='No Markings'WHERE(uClassifiedMarkings is null OR uClassifiedMarkings="))'.ORA-00904:"UCLASSIFIEDMARKINGS":invalid Identifier java.sql.SQLSyntaxException: ORA-00904:"UCLASSIFIEDMARKINGS": invalid identifier)
Kindly let know what is issue or how to resolve this errorOk,lets give it a shot. Can you please check if you have any Security Classifications added by navigating to Records->Configure->Security->Security Classification
If you do not see any entries here, then use the Add button to add the following
- No Markings
- Secret
- Top Secret
- Confidential
Now try to update the user info using the admin applet. In the edit window assign Security Classification to "No Markings" and try submitting the update. Let us know what is the outcome.
I completely agree with William on his analysis. Please try these steps if you are working on a Dev/POC instance.
Regards,
- Anand -
Find sap user id from release code and release group
does anyone know any FM that can get sap user id from certain release code and release group?
ex: if i input rel code 40, rel group N1 , then it should be sap user id A
i would prefer FM rather than tables and tcode.Hello,
Please find attached list of tables
T16FB Release Indicator: Purchasing Document
T16FC Release Codes
T16FD Description of Release Codes
T16FE Descriptions of Release Indicators: Purcha
T16FG Release Groups
T16FH Descriptions of Release Groups
T16FK Release Statuses
T16FL Release Indicators: Service Entry Sheet
T16FM Descriptions of Release Indicators for Ser
T16FS Release Strategies
T16FT Descriptions of Release Strategies
T16FV Release Prerequisites
T16FW Assignment of Role to Release Code
Thanks & Regards,
Mihir Popat -
HT1766 How can I bring back the information from an application that was mistakenly deleted?
How can I bring back the information from an application that was mistakenly deleted?
Only if you backed up the phone before that and did not back up after that. App settings and data are part of the backup. But all other data will be set back as well, you can't choose a single app to be restored from the backup.
-
How to get user information from ldap - bpm11g
hi all,
i need know how to do get information from ldap, but using adf bean for show user data in adf form.
anyone knows about this ?
tks.Neal wrote:
>
Hi,
I am using WLS default authentication to protect my JSP pages. Can someone tell
me if it is possible to add more fields to the default login box (in addition
to login and password boxes, I want to ask user the department name). In additional,
can WLS propogate this information (department name) along with other security
credentails to other J2EE components such as EJBs? In my EJBs I want to be able
to get the department name that user provided during login and then use that for
conditional business logic.
Any insights on this subject will be greatly appreciated.
TIA,
-NealYou can't do this with the default simple authentication. That can only handle a
username / password combination.
You should be able to do this with JAAS. You could write a LoginModule that
populates the department as a Principal or public Credential on the Subject in
addition to the normal authentication. You would have to do a callback handler
that passed through the department info to it.
This link has more on WLS's stab at JAAS:
http://e-docs.bea.com/wls/docs61/security/prog.html#1039659
Once you have associated the Subject with the access control context by invoking
a doAs() you should be able to get it back at any point with
Subject.getSubject(AccessController.getContext()) to get access to the
department info.
It will all be a bit of a chore, mind. -
Calling a Web Service from J2EE application running on WebSphere
This may have been answered before, but could not find using multiple searches that I did on this forum.
We are just in the process of using the newly installed SAP WAS 6.40 with J2EE engine and I understand from SAP's documentation that all BAPIs and remotely callable RFCs should be invokable via a Web Service call from remote applications. Couple of questions on this:
1. Is there a documentaion that describes steps to enable BAPIs or RFCs as web services?
2. Is there a documentation that describes steps to invoke a web service that in turn uses BAPI or RFC (code sample).
We are J2EE literates but not familiar with SAP WAS, and not sure if calling/invoking the WS would be similar to calling any other WS from other WS Containers.
Appreciate a response or suggestions.Hi Bharat,
see this weblog , where it gives the steps to create a RFC and convert it into web service.
/people/thomas.jung3/blog/2005/01/05/develop-a-web-service-that-sends-an-email--in-abap
Invoking WS is similar to calling any other WS from other containers. Either you have to give the WSDL file location or the external UDDI Server address in WebService creation wizard.
The WebService exapmles is also avaliable in help.sap.com -
Copy information from another application
Hello Experts,
I'm facing some issue, and I've tried a lot of approachs and still without a answer.
There is two application, one of Sales and another of Production.
After planned the Sales, based in the volume of sales, we project the production applying another measures.
So, what I need is after planned Sales, copy the informations of volume, from Sales to Prodution, changing just one member, that is a master data.
I've tried to use script logic, LOOKUP (script below), and use BADI with this [document|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0480970-894f-2d10-f9a5-d4b1160be203?QuickLink=index&overridelayout=true]. But the point is, that with this document, we start from the app source to the app destination, and what I'm looking for is the opposite.
Well, if somebody could help me. Thank you a lot.Hi, thanks for your reply.
Ok, let me explain better. What I need is this, in the source application we have this data.
APP:SALES
CATEGORY=PLAN1
ENTITY=1000
INPUTCURRENCY=NONE
MATERIAL=E00000778
TIME=2012.JAN
UNIT=KG
P_ACCT=0002
SIGNNEDDATA=1050,000
And I need to copy this values to another app, but, changing the P_ACCT and adding the CostCenter, like this:
APP:PROD
CATEGORY=PLAN1
ENTITY=1000
COSTCENTER=NONE ***
INPUTCURRENCY=NONE
MATERIAL=E00000778
TIME=2012.JAN
UNIT=KG
P_ACCT=0012 ***
SIGNNEDDATA=1050,000
The script is the folowing. I'd done this based in some threads that I saw.
//Production APP
//Take informations from SALES
*LOOKUP SALES
*DIM SALES1:CATEGORY="PLAN1"
*DIM SALES1:ENTITY = "1000"
*DIM SALES1:INPUTCURRENCY = "NONE"
*DIM SALES1:P_ACCT = "0002"
*DIM SALES1:UNIT = "KG"
*DIM SALES1:MATERIAL = "E00000778"
*ENDLOOKUP
*WHEN LOOKUP(SALES1)
*IS > 0
*BEGIN
*REC(P_ACCT="0012",EXPRESSION=%VALUE%)
*END
*NEXT
*NEXT
Thanks!
Edited by: Lucas Gabriel Corrêa da Costa on Jan 6, 2012 12:45 PM -
Users for the j2ee application
hi friends,
i want to create the users for J2EE applications.
can i create the users only for j2ee engine ?
how can i create these users?
if i want to implement the sap
is it necessary to buy the licence for j2ee users?
thanks®ards,
srinivas.Hi
To create the users in J2EE applications is not an issue, but the licensing is always applicable as it is applicable for ABAP applications.
There are two ways depends on configurations:
1. If the UME store is ABAP, then you can create the users at ABAP side using SU01 and at java side using http://<hostname>:5<Systemnumber>00/useradmin
2. If the UME store is JAVA, then you can only create using http://<hostname>:5<Systemnumber>00/useradmin
The licensing for JAVA applications depends as ABAP is having, if you use it as production you have to pay the charges. Please contact your local SAP representative for further details -
Obtaining remote user information for Medrec in Wls 10.3
I am trying to get the remote user information by invoking the getRemoteUser() method on the following request object
faces.context.MyHttpServletRequestWrapper
from within the MedRec application. This has always worked in the past on previous versions of Weblogic and Medrec.
Does anybody know what has changed in 10.3?
I can fetch the ip and url from the same object successfully.
thanks
MikeI think error message tells everything you need to know.
Please set in weblogic-ejb-jar.xml deployment descriptor because parameter object is not serializable.
<enable-call-by-reference>True</enable-call-by-reference>
With this it will allow to invoke EJB locally.
jayesh@yagna -
Hi,
I am getting the error while uploading images to SAP Mobile Documents from custom iOS(iPad )application using ObjectiveCMIS library.
My Custom method is as follows:
- (void)createSalesOrderRouteMapImageInFolder:(NSString*)salesOrderRouteMapFolderId routeMapImageTitle:(NSString *)imageTitle routeMapContent:(NSData *)imageData
NSInputStream *inputStream = [NSInputStream inputStreamWithData:imageData];
NSMutableDictionary *properties = [NSMutableDictionary dictionary];
[properties setObject:[NSString stringByAppendingFileExtension:imageTitle] forKey:@"cmis:name"];
[properties setObject:@"cmis:document" forKey:@"cmis:objectTypeId"];
[self.session createDocumentFromInputStream:inputStream
mimeType:@"image/png"
properties:properties
inFolder:salesOrderRouteMapFolderId
bytesExpected:[imageData length]
completionBlock:^(NSString *objectId, NSError *error) {
NSLog(@"Object id is %@",objectId);
if(error == nil) {
[inputStream close];
NSLog(@"Uploading Sales order route map successfully.");
[[NSNotificationCenter defaultCenter] postNotificationName:SaveOrderSuccessNotification object:nil];
} else {
[inputStream close];
NSLog(@"Uploading sales order route map failed.");
[[NSNotificationCenter defaultCenter] postNotificationName:SaveOrderFailedNotification object:error];
} progressBlock:^(unsigned long long bytesUploaded, unsigned long long bytesTotal) {
NSLog(@"uploading... (%llu/%llu)", bytesUploaded, bytesTotal);
OBjectiveCMIS Method in which i am getting error during upload:
- (void)sendAtomEntryXmlToLink:(NSString *)link
httpRequestMethod:(CMISHttpRequestMethod)httpRequestMethod
properties:(CMISProperties *)properties
contentInputStream:(NSInputStream *)contentInputStream
contentMimeType:(NSString *)contentMimeType
bytesExpected:(unsigned long long)bytesExpected
cmisRequest:(CMISRequest*)request
completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock
progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock
// Validate param
if (link == nil) {
CMISLogError(@"Must provide link to send atom entry");
if (completionBlock) {
completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeInvalidArgument detailedDescription:nil]);
return;
// generate start and end XML
CMISAtomEntryWriter *writer = [[CMISAtomEntryWriter alloc] init];
writer.cmisProperties = properties;
writer.mimeType = contentMimeType;
NSString *xmlStart = [writer xmlStartElement];
NSString *xmlContentStart = [writer xmlContentStartElement];
NSString *start = [NSString stringWithFormat:@"%@%@", xmlStart, xmlContentStart];
NSData *startData = [NSMutableData dataWithData:[start dataUsingEncoding:NSUTF8StringEncoding]];
NSString *xmlContentEnd = [writer xmlContentEndElement];
NSString *xmlProperties = [writer xmlPropertiesElements];
NSString *end = [NSString stringWithFormat:@"%@%@", xmlContentEnd, xmlProperties];
NSData *endData = [end dataUsingEncoding:NSUTF8StringEncoding];
// The underlying CMISHttpUploadRequest object generates the atom entry. The base64 encoded content is generated on
// the fly to support very large files.
[self.bindingSession.networkProvider invoke:[NSURL URLWithString:link]
httpMethod:httpRequestMethod
session:self.bindingSession
inputStream:contentInputStream
headers:[NSDictionary dictionaryWithObject:kCMISMediaTypeEntry forKey:@"Content-type"]
bytesExpected:bytesExpected
cmisRequest:request
startData:startData
endData:endData
useBase64Encoding:YES
completionBlock:^(CMISHttpResponse *response, NSError *error) {
if (error) {
CMISLogError(@"HTTP error when sending atom entry: %@", error.userInfo.description);
if (completionBlock) {
completionBlock(nil, error);
} else if (response.statusCode == 200 || response.statusCode == 201 || response.statusCode == 204) {
if (completionBlock) {
NSError *parseError = nil;
CMISAtomEntryParser *atomEntryParser = [[CMISAtomEntryParser alloc] initWithData:response.data];
[atomEntryParser parseAndReturnError:&parseError];
if (parseError == nil) {
completionBlock(atomEntryParser.objectData, nil);
} else {
CMISLogError(@"Error while parsing response: %@", [parseError description]);
completionBlock(nil, [CMISErrors cmisError:parseError cmisErrorCode:kCMISErrorCodeRuntime]);
} else {
CMISLogError(@"Invalid http response status code when sending atom entry: %d", (int)response.statusCode);
CMISLogError(@"Error content: %@", [[NSString alloc] initWithData:response.data encoding:NSUTF8StringEncoding]);
if (completionBlock) {
completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeRuntime
detailedDescription:[NSString stringWithFormat:@"Failed to send atom entry: http status code %li", (long)response.statusCode]]);
progressBlock:progressBlock];
Attaching the logs:
ERROR [CMISAtomPubBaseService sendAtomEntryXmlToLink:httpRequestMethod:properties:contentInputStream:contentMimeType:bytesExpected:cmisRequest:completionBlock:progressBlock:] HTTP error when sending atom entry: Error Domain=org.apache.chemistry.objectivecmis Code=260 "Runtime Error" UserInfo=0x156acfa0 {NSLocalizedDescription=Runtime Error, NSLocalizedFailureReason=ASJ.ejb.005044 (Failed in component: sap.com/com.sap.mcm.server.nw) Exception raised from invocation of public void com.sap.mcm.server.service.AbstractChangeLogService.updateChangeLog(java.lang.String,boolean) throws com.sap.mcm.server.api.exception.MCMException method on bean instance com.sap.mcm.server.nw.service.NwChangeLogService@4e7989f3 for bean sap.com/com.sap.mcm.server.nw*annotation|com.sap.mcm.server.nw.ejb.jar*annotation|NwChangeLogService in application sap.com/com.sap.mcm.server.nw.; nested exception is: javax.ejb.EJBTransactionRolledbackException: ASJ.ejb.005044 (Failed in component: sap.com/com.sap.mcm.server.nw) Exception raised from invocation of public com.sap.mcm.server.model.ChangeLog com.sap.mcm.server.dao.impl.ChangeLogDaoImpl.findByUserId(java.lang.String) method on bean instance com.sap.mcm.server.dao.impl.ChangeLogDaoImpl@2852b733 for bean sap.com/com.sap.mcm.server.nw*annotation|com.sap.mcm.server.nw.ejb.jar*annotation|ChangeLogDaoImpl in application sap.com/com.sap.mcm.server.nw.; nested exception is: javax.persistence.NonUniqueResultException: More than 1 objects of type ChangeLog found with userId=25f8928e-8ba0-4edd-b08e-43bf6fb78f1a; nested exception is: javax.ejb.EJBException: ASJ.ejb.005044 (Failed in component: sap.com/com.sap.mcm.server.nw) Exception raised from invocation of public com.sap.mcm.server.model.ChangeLog com.sap.mcm.server.dao.impl.ChangeLogDaoImpl.findByUserId(java.lang.String) method on bean instance com.sap.mcm.server.dao.impl.ChangeLogDaoImpl@2852b733 for bean sap.com/com.sap.mcm.server.nw*annotation|com.sap.mcm.server.nw.ejb.jar*annotation|ChangeLogDaoImpl in application sap.com/com.sap.mcm.server.nw.; nested exception is: javax.persistence.NonUniqueResultException: More than 1 objects of type ChangeLog found with userId=25f8928e-8ba0-4edd-b08e-43bf6fb78f1a}
2015-03-12 04:08:31.634 Saudi Ceramics[4867:351095] Uploading sales order route map failed.Hi Sukalyan,
Have you checked the below links?
These will give you step by step implementation procedure.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a099a3bd-17ef-2b10-e6ac-9c1ea42af0e9?quicklink=index&overridelayout=true
http://wiki.sdn.sap.com/wiki/display/WDJava/KmuploadusingWebdynproapplication
Regards,
Sandip -
Initial load of user data from differnet applications
How can we match the different IDs from different applications when we load first time.
Have we to do this manually or is there any functionality to do this automatilliy like CUA.
Thanks
GabiHi Matthias,
It's slightly an opne ended question. It depends a lot on which systems you are consolidating from. Is it just ABAP systems?
As a general concept - you need to decide which will be your unique identifier for the identity (Employee ID, ID number, social security code, etc). After you've done that you need to adjust each import/consolidation job and map the proper attributes.
If you have 1 field that is identical for the user in all you systems, you have most of the work cut out for you.
Regards,
Eric -
How to access SAP Solution Manager from webDynpro Application.
Hi to all,
I have to retrieve some informations from SAP Solution Manager. and update some recordes there itself. How could i do it??
If anybody have codes related to it please send the same.
Please help its urgent.
Waiting for reply.
Thanks and Regards;
Pankaj Kumar.Hi
See this help
http://help.sap.com/saphelp_nw2004s/helpdata/en/5b/6e8c42c398173be10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/4c/758c42d781d665e10000000a155106/frameset.htm
Kind Regards
Mukesh
Maybe you are looking for
-
Finder "broken" under 10.6??
Since I have installed 10.6 I have a weird finder problem - Mail works fine but themn although iCal and Safarai show open in the dock - I can NOT open a window on either. Firefix, however, runs totally normally. I suspect I have some login etc that i
-
I bought scanner today if I print from comp.it prints great but when I scan to print to paper the preview is showing a page filled with all black or all color depending which I want and that's what it prints it won't print whats in the scanner
-
The macro attempted to modify a key figure that is not locked
Hi In my planning area I choosen detailed lock, keyfigure specific lock and do not lock read only keyfig after that In interactive DP, I have 2 Planning Books A and B .when I load the selection for book A itu2019s loaded well because all are editable
-
Is there an issue with the Forum Search feature? Searching on the word "Camino" which I used in a post a few hours ago brings back no results.
-
I update the FF browser few days ago and since then whenever I use the FF browser my screen starts flikering. I am a web developer by profession and I relied heavily on FF for many of my works. Any good solution for this issue ? Thanks in advance. Re