Fetching from LDAP using JDNI with WebObjetcs,/ EOF, failing.
Hello.
I have been working on a WebObjects app that connects to a LDAP server, I create the EOModel (reverse engineered) from EOModeler in eclipse, but I cant set up relationships because in the LDAP server there are no such attributes that references the parents and sons. . i.e I have
-XWS (root)
-Contacts (objClass=XWSContactsGroup)
-Apple.(objClass=XWSContactsGroup)
-Gustavo Pizano
-XWS(objClass=XWSContactsGroup)
-Veronica Pizano
-Carolina Pizano
-PhotoCenter(objClass=XWSContactsGroup)
-Gilbert Pizano
And I want to get all the Contacts from a certain group (right now due the inability to do it via relationships, Im doing qualifiers) .. but Im getting weird results...
I can get an NSArray from the XWS group which has 2 elements. but those 2 elements are the same. :S
Any help I will appreciate it.
Thanks
Gustavo
Dude wrote:
You don't need the extra exit. Not using an explicit exit command ran into an old SQL*Plus bug with v7 and prior - where eof was ignored and input read until an explicit exit was encountered.
Despite this bug not being there in the SQL*Plus 7.1 version I was using, I was made very aware by my senior Oracle colleagues that it was non-negotiable and that an exit statement was expected in all the SQL*Plus scripts I wrote.
A practise I still follow and encourage today. Relying on implicit behaviour is not a characteristic of robust code. Explicitly defining behaviour is. Rather code an exit statement than ignoring it and trusting the s/w to understand your intent and behave accordingly.
Similar Messages
-
Need help in retrieving attributes from LDAP using JNDI
I am trying to retrieve attributes from LDAP using JNDI, but I'm getting the following error when I try to run my Java program.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/naming/NamingException
I have all the jar files in my classpath: j2ee.jar, fscontext.jar and providerutil.jar. The interesting thing is that it gets compiled just fine but gives an error at run-time.
Could anyone tell me why I'm getting this error? Thanks!
Here's my code:
import javax.naming.*;
import javax.naming.directory.*;
import java.util.*;
import java.io.*;
class Getattr {
public static void main(String[] args) {
// Identify service provider to use
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
// user info
String userName = "username";
String password = "password";
// LDAP server specific information
String host = "ldaphostname";
String port = "portnumber";
String basedn = "o=organization,c=country";
String userdn = "cn=" + userName + "," + basedn;
env.put(Context.PROVIDER_URL, "ldap://" + host + ":" + port + "/" + basedn);
env.put(Context.SECURITY_PRINCIPAL, userdn);
env.put(Context.SECURITY_CREDENTIALS, password);
try {
System.setErr(new PrintStream(new FileOutputStream(new File("data.txt"))));
// Create the initial directory context
DirContext ctx = new InitialDirContext(env);
// Ask for all attributes of the object
Attributes attrs = ctx.getAttributes("cn=" + userName);
NamingEnumeration ne = attrs.getAll();
while(ne.hasMore()){
Attribute attr = (Attribute) ne.next();
if(attr.size() > 1){
for(Enumeration e = attr.getAll(); e.hasMoreElements() ;) {
System.err.println(attr.getID() + ": " + e.nextElement());
} else {
System.err.println(attr.getID() + ": " + attr.get());
// Close the context when we're done
ctx.close();
} catch(javax.naming.NamingException ne) {
System.err.println("Naming Exception: " + ne);
} catch(IOException ioe) {
System.err.println("IO Exception: " + ioe);That doesn't work either. It seems its not finding the NamingException class in any of the jar files. I don't know why? Any clues?
-
How i get user info from ldap using java after authenticating user with SSO
Hi
I have one jsp/bean application as a partner application with SSO.
It works fine.
Now i need to get other attributes of user from LDAP who has logged into the application through SSO.
using SSO java APIs i only get username, userDN, subscriber info.
To get user's other attribute i have to user LDAP APIs for that i have to create on Directory Context, for the same i need userpassword.
so here i my question, how do i get user password after he has logged in thro SSO.
regards..
and thanking u in advance
samirValentina,
there's no way to get the password value from the directory (it's one way). Of course you can get the hashed (MD4,MD5,SHA-1) base64 encoded value (i.e. the value you see in OiD) but not the 'password'.
--Olaf -
Retrieve parameters from LDAP using authentication module
I have existing LDAP that contains organization people and their attributes. I have several web applications that use existing LDAP for authentication and authorization. My goal is to deploy single sign-on with openSSO so that users are authenticated against existing LDAP. Changing of the existing LDAP is forbidden.
I deployed newest stable OpenSSO and Apache2 + newest policy agents to web service servers.
OpenSSO server uses LDAP authentication module to authenticate users against existing LDAP. It uses flat file data repository and realm attributes -> user profile is ignored.
This basic setup works fine. The next step is to integrate existing web applications to single sign-on system. The authentication part works fine. I just disabled old mechanism from web applications that did the LDAP authentication. OpenSSO and Apache Policy agent are handling that part.
The existing web applications are still querying existing LDAP other attributes there than uid and userpassword. Is it possible to configure OpenSSO to forward LDAP attributes to web application as cookie or header value? Or is the forwarding feature only for attributes in Data Store?
If the forwarding is not possible what is the next best alternative ?OpenSSO forum is quite silent so I'm back with you guys.
I managed to solve the agent error log problem I mentioned before. The problem was about nonexisting attributes in AMAgent.properties com.sun.am.policy.agents.config.profile.attribute.map. I removed extra attributes and the authentication against LDAP started to work again.
The problem is that no attributes are forwarded from LDAP to web application. I have tried HTTP_COOKIE and HTTP_HEADER settings in AMAgent.properties and com.sun.am.policy.agents.config.profile.attribute.map is set to cn|common-name,mail|email.
My LDAP looks like this:
# testuser, pollo.fi
dn: cn=testuser,dc=pollo,dc=fi
cn: testuser
objectClass: organizationalPerson
objectClass: inetOrgPerson
givenName: Test
sn: User
ou: People
uid: testuser
mail: [email protected]
And my datastore configuration:
LDAP server->localhost:389
LDAP bind DN->cn=admin,dc=pollo,dc=fi
LDAP organization DN->dc=pollo,dc=fi
Attribute name mapping->empty
LDAP3 Plugin supported types and operations->agent,group,realm,user all read,create,edit,delete
LDAP3 Plugin search scope->scope_sub
LDAP Users Search Attribute->uid
LDAP Users Search Filter->(objectclass=inetorgperson)
LDAP User Object Class->organizationalPerson
LDAP User Attributes->uid, userpassword
Create User Attribute Mapping->empty
Attribute Name of User Status->inetuserstatus
User Status Active Value->Active
User Status Inactive Value->inactive
LDAP Groups Search Attribute->cn
LDAP Groups Search Filter->(objectclass=groupOfUniqueNames)
LDAP Groups container Naming Attribute->ou
LDAP Groups Container Value->groups
LDAP Groups Object Class->top
LDAP Groups Attributes->cn,description,dn,objectclass
Attribute Name for Group Membership->empty
Attribute Name of Unqiue Member->uniqueMember
Attribute Name of Group Member URL->memberUrl
LDAP People Container Naming Attribute->ou
LDAP People Container Value->people
LDAP Agents Search Attribute->uid
LDAP Agents Container Naming Attribute->ou
LDAP Agents Container Value->agents
LDAP Agents Search Filter->(objectClass=sunIdentityServerDevice)
LDAP Agents Object Class->sunIdentityServerDevice,top
LDAP Agents Attributes->empty
Identity Types That Can Be Authenticated->Agent,User
Authentication Naming Attribute->uid
Persistent Search Base DN->dc=pollo,dc=fi
Persistent Search Filter->(objectclass=*)
Persistent Search Maximum Idle Time Before Restart->0
Should I enable some setting still to get the forwarding going on? Any ideas for debugging? -
Retrieving user and group information from LDAP using j_securrity_check
Hi
I am using j_security_check to authenticate users against LDAP. I have made all necessary configuration for the server to perform LDAP group search as well as mentioned in the WAS documentation of LDAP settings. Now, how can I retrieve the user and the user group info after the j_secuirty_check. Apart from the UserPrincipal object which I can get from the request which just has the user name, is there any other object which will give me the user and user group info by which I need to connect to LDAP using my java code to retrieve these informations?
Regards
DeepakHi
I am using j_security_check to authenticate users
against LDAP. I have made all necessary configuration
for the server to perform LDAP group search as well
as mentioned in the WAS documentation of LDAP
settings. Now, how can I retrieve the user and the
user group info after the j_secuirty_check.
Apart
from the UserPrincipal object which I can get from
the request which just has the user name, is there
any other object which will give me the user and user
group info by which I need to connect to LDAP using
my java code to retrieve these informations?Hmm, you don't need the user group info to connect to the LDAP server, right? You would need the user's Id (which you have) and password (which you don't). You could use the LDAP credentials and bind as that to look up the user info via the user id. Or if the server is set up to allow anonymous bind you could do it without credentials. But if all you want is group info then you should be able to call Security.getCurrentSubject().getPrincipals() to get the user principal as well as all groups (this is true in BEA WebLogic at least).
Good Luck
Lee -
Using tBridge with Tuxedo /Q fail
when I config the tBridge example :Using tBridge with Tuxedo /Q fallow:
bea81/weblogic81/samples/server/examples/src/examples/wtc/tbridge/package-summary.html
I get a error below:
<2003-10-28 ÏÂÎç15ʱ50·Ö13Ãë GMT+08:00> <Error> <WTC> <BEA-180097> <Due to a tra
nslation error, tBridge has redirected the message to the wlsErrorDestination.>
who can tell me why??There are many ways that this error message will be sent to the WLS log.
You need to turn on the WTC tracing to get a better idea of when it is
failing. Messages from/to a JMS queue need to be converted from/to
a buffer type that is usable for the Tuxedo queue/service. Conversions
occur for STRING,FML,FML32 or CARRAY buffer types. Check to make
sure that the buffer types that your application is using, on both WLS and
TUX sides,
is consistent with the configuration settings and your expectations.
Set the trace level above 15000 for tBridge. Above 65000 will print out
all the tracing.
Bob Finan
"xcjing" <[email protected]> wrote in message
news:3f9e2134$[email protected]..
>
when I config the tBridge example :Using tBridge with Tuxedo /Q fallow:
bea81/weblogic81/samples/server/examples/src/examples/wtc/tbridge/package-su
mmary.html
>
I get a error below:
<2003-10-28 ÏÂÎç15ʱ50·Ö13Ãë GMT+08:00> <Error> <WTC> <BEA-180097> <Due toa tra
nslation error, tBridge has redirected the message to thewlsErrorDestination.>
>
who can tell me why?? -
Accessing an iPhone backup from OSX using Bootcamp with XP
Hi guys,
Something has gone horribly wrong with the OSX partition on my Macbook Pro. It seems like something has become corrupted, and I can no longer reboot into OSX. I can however continue to use my XP partition and can access all my files from there. I'm planning on eventually backing up all the data, and just doing a complete reinstall but I'm heading off to the states from the UK in 10 days and need to restore my iphone to a backup I had on the mac partition - it contains all my US contacts and data. Is there any way I can access the backup via bootcamp?
Thanks,
James.sure navigate to the path and copy out the files
http://www.iphonefaq.org/archives/97899 -
Where should I start from to use HP4145B with LabView?
I am not familiar with LabView, but I have to set up LabView to make it work with HP4145B.
I downloaded the driver from NI, placed it at the correct directory, and can see VI's in function palette.
Also, when I run MAX, it shows "Instrument 0" under GPIB0.
When I click on "Scan for Instrument", it says something about IDN query, but now I know HP4145B is too old to understand IDN query.
I saw a lot of posts that say they can write to the instrument but cannot read.
However, I don't even know how to test whether my labview can write to 4145B or not.
My questions are....
1. 4145B manual says it has "ID" code.
I tried testing it by using "Interactive Control"
And I got this by NI Spy
1. ibsic(GPIB0)
Process ID: 0x00000C1C Thread ID: 0x00000EB4
Start Time: 15:23:22.485 Duration 00:00:00.000
ibsta: 0x160 iberr: 0 ibcntl: 0(0x0)
2. ibsre(GPIB0, 1)
Process ID: 0x00000C1C Thread ID: 0x00000EB4
Start Time: 15:23:26.070 Duration 00:00:00.000
ibsta: 0x160 iberr: 1 ibcntl: 0(0x0)
3. ibcmd(GPIB0, "@?1", 3 (0x3))
Process ID: 0x00000C1C Thread ID: 0x00000EB4
Start Time: 15:24:18.606 Duration 00:00:00.000
ibsta: 0x178 iberr: 0 ibcntl: 3(0x3)
4. ibwrt(GPIB0, "ID", 2 (0x2))
Process ID: 0x00000C1C Thread ID: 0x00000EB4
Start Time: 15:24:30.242 Duration 00:00:00.010
ibsta: 0x168 iberr: 0 ibcntl: 2(0x2)
5. ibcmd(GPIB0, "? Q", 3 (0x3))
Process ID: 0x00000C1C Thread ID: 0x00000EB4
Start Time: 15:25:12.333 Duration 00:00:00.010
ibsta: 0x174 iberr: 0 ibcntl: 3(0x3)
> 6. ibrd(GPIB0, "", 20 (0x14))
> Process ID: 0x00000C1C Thread ID: 0x00000EB4
> Start Time: 15:25:23.289 Duration 00:00:16.784
> ibsta: 0xc164 iberr: 6 ibcntl: 0(0x0)
There are four LED's on the front panel of HP4145B.
It shows status of HP4145B whether it is talker or listener.
LED changes properly to my command. (So I don't think there is any problem with harware connection)
But, I still get nothing but EABO error when I want to read something.
What am I doing wrong?
How can I test "ID" code?
(I do not have ultra-fast typing speed so I think I gave 4145 enough time to respond before I typed new command)
2. I tried to use driver I downloaded from NI.
Other posts say that people used "HP 4145 Example.vi" for testing.
However when I put "HP 4145 Example.vi" on the block diagram, I cannot run it.
How do I test with "HP 4145 Examble.vi"?
3. I tried testing other vi's such as "HP 4145 source setup.vi".
I put that vi on the block diagram window, added constant of 17 to GPIB address,
and other constants to other inputs and run it.
A new window popped up, so I ran it again.
However it does not seem to work since I see no change when I go into source set up menu directly from HP4145 front panel.
Again, LED indicator changes to LTN(which means HP4145B is in listener mode) when I run vi.
What would be the problem?
I'm experiencing a lot of trouble with this HP4145B, and I know too little to solve this by myself.
Somebody please help me with this.
Thanks in advance.My 4145b uses address 17.
I checked switch setting on the backpanel of 4145b and CRT on the front panel says "HPIB(17, COMMA, EOI)". Also, when I change address to 16 and execute vi file, it gives me an error message of "HP 4145 Define Channel; HP 4145 Send Message"
When I change back to 17 and execute, error message disappears(and no more error message comes in when I send command to 4145b), but nothing happens on 4145b.
As I said eariler, LEDs on 4145b seems to be saying that 4145b understands basic command such as "change to listener" or "change to talker".
In addition, when I try to read from 4145b from "HP4145 example.vi", for example by clicking on "Display Graphics and Plot" and execute, I get error message "HP 4145 Take Measurement; Wait for Interrrupt (GPIB)". However, reading is not the problem to think right now because I don't even know how to read.
I have Newport 1830-C with me, and I checked this instrument with same GPIB-USB-HS and same PC I am using with HP4145b.
It works with 1830C. Therefore, it doesn't look like there is something wrong with my PC and GPIB-USB-HS.
Anyway, thank you for your attention.
메시지가 06-25-2008 01:28 AM에 Min Yoon에 의해 편집되었음
메시지가 06-25-2008 01:36 AM에 Min Yoon에 의해 편집되었음 -
Help , How to get data from database using recordset with UI API
I want to get a data from database
when I want to create recordset i notice that UI API didn't has record set
so I created recordset using DI API (SAPbobscom.recordset and SAPbobscom.company)
======================================================
Dim oCompanyUI As SAPbouiCOM.Company <<UI API
Dim oRecSet As New SAPbobsCOM.Recordset << DI API
Dim oCompanyDI As New SAPbobsCOM.Company << DI API
'=====================================================
oCompanyDI.Connect
Set oRecSet = oCompanyDI.GetBusinessObject(BoRecordset)
oRecSet.DoQuery ("SELECT T0.CardCode, T0.CardName FROM OCRD T0")
SBO_Application.MessageBox oRecSet.Fields.Item(1).Value
======================================================
but I got an error it said "you are not connected to company"
I'm really don't have an idea about how to get a data from using UI API (exp I want to get a date or costumer code)
can someone help me please, I really need it
Thanksyou need a single sign on
Dim oDICompany As SAPbobsCOM.Company
Dim sCookie As String
Dim sConnStr As String
Dim ret As Integer
oDICompany = New SAPbobsCOM.Company
sCookie = oDICompany.GetContextCookie
sConnStr = SBO_Application.Company.GetConnectionContext(sCookie)
If oDICompany.Connected Then
oDICompany.Disconnect()
End If
ret = oDICompany.SetSboLoginContext(sConnStr)
If Not ret = 0 Then
SBO_Application.MessageBox("set Login Context failed!")
Exit Sub
End If
ret = oDICompany.Connect()
If Not ret = 0 Then
SBO_Application.MessageBox("Company Connect failed!")
End If -
HT6114 Using Gmail with Apple Mail -- Failed!
Help! After installing this update (10.9.2) I lost ALL ability to send or receive any Gmail messages via Apple Mail. Anyone else having this problem? I can still use Gmail via any web browser but can no longer use Apple Mail as I've been doing for the past 2 years.
Hello GrazerF16,
Thank you for using Apple Support Communities.
For more information, take a look at:
OS X Mail: Troubleshooting sending and receiving email messages
http://support.apple.com/kb/ts3276
In Mail, choose Window > Connection Doctor.
Tip: If you see a spinning gear in Mail or the Mail Connection Doctor, choose Window > Activity to learn what Mail is doing.
Have a nice day,
Mario -
Using LDAP from 10.5 Server with Joomla
Has anybody successfully used the LDAP from 10.5 server with Joomla?
Here is another post in Joomla's forums asking the same thing
http://forum.joomla.org/viewtopic.php?f=473&t=260357I've had some success with the LDAP integrated into Joomla 1.5. Although, Joomla currently appears to require an email address during validation. So, if you don't have email addresses in the OSX LDAP database, a user can not fully login even if the username and password is correct).
Here are my sanitized settings
Host: hostname.domain.tld , e.g. [email protected]
Port: 389
LDAPV3: yes
Negotiate TLS: no
Follow Referrals: no
Authorization Method : "Bind and Search"
BaseDN: cn=users,dc=hostname,dc=domain,dc=tld , e.g. dc=myserver,dc=mydomain,tld=com or whatever OD LDAP is set for.
Search String : uid=[search] // I do not know if this is valid.
UserDN: uid=[username],dc=hostname,dc=domain,dc=tld
Connect username:
Connect password:
Map full name: cn
Map email : email
Map userid : uidnumber
When you enable the module, you should see an OD LDAP log entry
Something like
May 29 2008 19:04:33 USER: {0x4230826a3fffffff0000000f0000000a, username} is the current user.
May 29 2008 19:04:33 AUTH2: {0x4135826cffffffff0000000a0000000a, username} CRAM-MD5 authentication succeeded.
May 29 2008 19:24:11 RSAVALIDATE: success.
If you don't get any log messages, LDAP has rejected the query outright.
Regards,
Jay Vicory -
Problem with activesync provisioning user from ldap to red hat
hello,
i am using activesync to provision the user from ldap to red hat linux . i am getting the following error message
An error occurred adding user '#########' to resource 'Red Hat Linux'.
Script failed waiting for " PASSWORD:" in response "passwd: Only one user name may be specified.
_,)#+(:"
Script processor timed out with nothing to read and the following unprocessed text: "passwd: Only one user name may be specified.
_,)#+(:".
when to try to assign redhat resource to a user from the idm the user is getting provisioned to redhat successfully .active sync form is working for all the other resource except the redhat.
can anyone give me solution for the above problem
thanks in advance.Have you set the xhost as ROOT (xhost +hostname), and then as the ORACLE user type "export DISPLAY:0.0" (without the quotes of course) ? This needs to be done prior to running the installer. Try this site for further information - http://www.puschitz.com/OracleOnLinux.shtml
-
Fetch data using structure with full working example
does any body tell me how to fetch data using structure with full working example
the structure name is RSTXT and the field is TXLINE
the data in the form of text is entered from the functional side using t-code ME52N
from there i have to fetch the data
in smartform or in reportusing this code to get text from ME52N this is a structure still not getting output
DATA:BEGIN OF TA_ROW occurs 0,
TXZ01(1000) TYPE C,
END OF TA_ROW.
DATA:BEGIN OF IT_ROW OCCURS 0,
TXZ01(1000) TYPE C,
END OF IT_ROW.
DATA: thread LIKE thead.
DATA: headerid TYPE char24.
DATA: it_text LIKE tline OCCURS 0 WITH HEADER LINE.
data:wa_banfn like eban-banfn.
thread-tdid = 'B01'.
thread-tdname = headerid.
thread-tdobject = 'EBAN'.
select txz01 from eban into corresponding fields of table ta_row
where banfn = wa_banfn.
headerid = ' '.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = thread-tdid
language = sy-langu
name = thread-tdname
object = thread-tdobject
ARCHIVE_HANDLE
= 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
lines = it_text
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
LOOP AT it_text.
CLEAR ta_row.
BREAK-POINT.
FROM THIS POINT TEXT IS COMING
ta_row-txz01 = it_text-tdline.
APPEND ta_row TO it_row.
ENDLOOP. -
Is it possible to retrieve data from an Oracle db with an LDAP query?
Our application uses an LDAP query to retrieve data from Microsoft Active Directory. Is it also possible to retrieve data from an Oracle database with an LDAP query?
if you have Oracle Internet Directory, you will retrieve with ldapsearch data, which are physically stored in the database. But to select * from emp where ename='SCOTT', it is probably not possible.
At least I have never heard of such a product which translate ldap query in sql query. But feel free to write your own one in perl :-) -
How to retrieve all the users along with their password from LDAP
Hello,
Can anyone let me know how to retrieve and list all the user along with their password from LDAP.
ThanksHi Prashant,
I have limited experience with Synchronization, but I agree with you - if you need to synchronize Passwords, you need to have the Password in clear Text.
If you trying to build your own Synchronization Solution using any of the avaliable LDAP APIs, I don't think you can ever retrieve a user's Password in clear text.
However, I did come across an interesting article & I hope you find it useful :-
http://www.oracle.com/technology/obe/obe_as_10g/im/configssl/configssl.htm
I am not sure if SSL is necessary - If you have a look at Metalink Note 277382.1 ( How to Configure OID External Authentication Plug-In for Authentication Via Microsoft Active Directory (MS AD) ), teh question asked by oidspadi.sh for the same is asnwered as "N".
Regards,
Sandeep
Maybe you are looking for
-
Using Metadata to generate view as conventional folder structure
Can Metadata be used to generate a view as the conventional folder drill-down? I have a list with metadata for different projects, releases, content type etc and I would like to view them in folder structure with different hierarchies, i.e. using pro
-
ALV Grid Total Text (OOPS)
Hi All, I have a simple ALV Grid Report(OOPS), I would like to give a Text for Total Row. In REUSE_ALV_GRID we have the option of giving this text, but i am not able to figure it out how to get the same in OOPS. Regards Anup
-
My hard drive (and iTunes) is getting very full with my gazillion CDs, and I am contemplating replacing the drive with a new one, or adding a "slave" drive, preferably the former solution. Are there any major pitfalls awaiting me, i.e. not being able
-
Query for Business Partner Master data
Respected Sir/Madam, I want a Query in Bp Master Data----> "Name" Should Allow Only Capital Letters.Can anyone please helpme out from this.
-
Column-width in SALV with web-dynpro ABAP
Hi there, can anyone help me? I want to set the column width to a fix value e.g. 50px. How can i do this in SAP List Viewer for ABAP Web Dynpro? At the moment i use this code: lo_value->if_salv_wd_table_settings~set_scrollable_col_count( 6 ). lo_