database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
ㆍLDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
LDAP Q&A 795 게시물 읽기
No. 795
java object넣기...
작성자
작성일
2001-07-12 12:45
조회수
7,650

지난번..objectclass에 대한 만복님 답변이 도움이 많이 되었습니다..^^

 

결국 전 ldap에 java object를 넣을려고 했는데요.

conf화일에...java.schema인가.하여튼 고놈을 include했고요..

 

java jndi tutorial에 나오는 예를 실행했는데...

잘 안되네요.. ldap에서 이 object를 받아 들이지 않는거 같은데..

 

import javax.naming.*;

import java.util.Hashtable;

import java.awt.Button;

 

/**

* Demonstrates how to bind a Serializable object to a directory.

* (Use Unbind to remove binding.)

*

* usage: java SerObj

*/

 

class SerObj {

public static void main(String[] args) {

 

// Set up environment for creating initial context

Hashtable env = new Hashtable(11);

env.put(Context.INITIAL_CONTEXT_FACTORY,

"com.sun.jndi.ldap.LdapCtxFactory");

env.put(Context.PROVIDER_URL, "ldap://localhost:389");

 

try {

// Create the initial context

Context ctx = new InitialContext(env);

 

// Create object to be bound

Button b = new Button("Push me");

 

// Perform bind

ctx.bind("cn=Button", b);

 

// Check that it is bound

Button b2 = (Button)ctx.lookup("cn=Button");

System.out.println(b2);

 

// Close the context when we're done

ctx.close();

} catch (NamingException e) {

System.out.println("Operation failed: " + e);

}

}

}

 

를 실행하면...

Operation failed: javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'cn=Button' Process Exit...

 

라고 나오는군요....no such object라...

참고로...제..slapd.conf는요..

 

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.4 2000/08/26 17:06:18 kurt Exp $

#

# See slapd.conf(5) for details on configuration options.

# This file should NOT be world readable.

#

include schema/core.schema

include schema/java.schema

 

# Define global ACLs to disable default read access.

 

# Do not enable referrals until AFTER you have a working directory

# service AND an understanding of referrals.

#referral ldap://root.openldap.org

 

pidfile slapd.pid

argsfile slapd.args

 

# Load dynamic backend modules:

# modulepath %MODULEDIR%

# moduleload back_ldap.la

# moduleload back_ldbm.la

# moduleload back_passwd.la

# moduleload back_shell.la

 

#######################################################################

# ldbm database definitions

#######################################################################

 

database ldbm

suffix "dc=my-domain, dc=com"

#suffix "o=My Organization Name, c=US"

rootdn "cn=Manager, dc=my-domain, dc=com"

#rootdn "cn=Manager, o=My Organization Name, c=US"

# Cleartext passwords, especially for the rootdn, should

# be avoid. See slappasswd(8) and slapd.conf(5) for details.

# Use of strong authentication encouraged.

rootpw secret

# The database directory MUST exist prior to running slapd AND

# should only be accessable by the slapd/tools. Mode 700 recommended.

directory %LOCALSTATEDIR%/openldap-ldbm

# Indices to maintain

index objectClass eq

 

입니다...

 

질문이 넘 기초적인거 같은데...^^ 부탁드립니다.

[Top]
No.
제목
작성자
작성일
조회
804우주최강 Java 초보용 LDAP 예제좀 부탁드려요..
HelloWorld
2001-07-13
6651
806┕>자바 사이트에 가시면 튜토리얼이 있습니다
하만복
2001-07-13 13:26:33
7456
799netscape.ldap.LDAPException??
신원식
2001-07-12
7361
800┕>Re: netscape.ldap.LDAPException??
송상준
2001-07-12 22:33:43
8429
803 ┕>감사합니다.. 근데, 아직두 dn개념과 objectclass 의 attribute 개념 잡는 힘드네요??
신원식
2001-07-13 09:45:43
7230
805  ┕>Re: 감사합니다.. 근데, 아직두 dn개념과 objectclass 의 attribute 개념 잡는 힘드네요??
하만복
2001-07-13 11:11:47
7734
798공짜로 컨설팅부탁드립니다. :)
류경문
2001-07-12
6818
801┕>Re: 공짜로 컨설팅부탁드립니다. :)
송상준
2001-07-12 22:36:44
7803
802 ┕>Re: Re: 공짜로 컨설팅부탁드립니다. :)
류경문
2001-07-13 01:22:51
7704
822  ┕>Re: Re: Re: 공짜로 컨설팅부탁드립니다. :)
송상준
2001-07-19 00:37:17
7584
795java object넣기...
2001-07-12
7650
808┕>Re: java object넣기...
하만복
2001-07-13 13:29:42
8134
815 ┕>Re: Re: java object넣기...
2001-07-13 17:39:58
8359
816  ┕>Re: Re: Re: java object넣기...
하만복
2001-07-13 19:28:36
8107
793ASP에서 LDAP의 정보를 받을수 있나요?
장대호
2001-07-11
7497
797┕>Re: ASP에서 LDAP의 정보를 받을수 있나요?
송상준
2001-07-12 20:33:27
8642
792[긴급]Netscape Directory Server 설치시 Error
안진희
2001-07-11
7130
796┕>예비군 훈련다녀오고 첨 답변을 씁니다.
송상준
2001-07-12 20:29:25
8022
809┕>Re: [긴급]Netscape Directory Server 설치시 Error
서호정
2001-07-13 13:53:57
7669
788ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
이지온
2001-07-10
6695
789┕>Re: ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
이창훈
2001-07-11 09:39:15
7754
790 ┕>Re: Re: ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
이지온
2001-07-12 07:22:01
7371
791  ┕>Re: Re: Re: ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
정재익
2001-07-11 16:19:51
7660
794   ┕>Re: Re: Re: Re: ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
이지온
2001-07-12 07:41:06
7485
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.020초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다