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 808 게시물 읽기
No. 808
Re: java object넣기...
작성자
하만복
작성일
2001-07-13 13:29
조회수
8,124

에러 메시지를 보니까

binding 은 성공했는데, lookup 과정에서 에러가 난듯 합니다

lookup할때 rdn 말고 dn을 사용해서 해보세요

"cn=Button" 말고, "cn=Button,ou=java,o=test" 처럼요

아, 그 소스를 한번 더 돌리시면,

얼레디 이그지스트 익셉션도 나겠군요 ^^

 

>>곰 님께서 쓰시길<<

 

:: 지난번..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]; re

:: maining 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
6649
806┕>자바 사이트에 가시면 튜토리얼이 있습니다
하만복
2001-07-13 13:26:33
7450
799netscape.ldap.LDAPException??
신원식
2001-07-12
7358
800┕>Re: netscape.ldap.LDAPException??
송상준
2001-07-12 22:33:43
8419
803 ┕>감사합니다.. 근데, 아직두 dn개념과 objectclass 의 attribute 개념 잡는 힘드네요??
신원식
2001-07-13 09:45:43
7223
805  ┕>Re: 감사합니다.. 근데, 아직두 dn개념과 objectclass 의 attribute 개념 잡는 힘드네요??
하만복
2001-07-13 11:11:47
7725
798공짜로 컨설팅부탁드립니다. :)
류경문
2001-07-12
6813
801┕>Re: 공짜로 컨설팅부탁드립니다. :)
송상준
2001-07-12 22:36:44
7792
802 ┕>Re: Re: 공짜로 컨설팅부탁드립니다. :)
류경문
2001-07-13 01:22:51
7698
822  ┕>Re: Re: Re: 공짜로 컨설팅부탁드립니다. :)
송상준
2001-07-19 00:37:17
7577
795java object넣기...
2001-07-12
7646
808┕>Re: java object넣기...
하만복
2001-07-13 13:29:42
8124
815 ┕>Re: Re: java object넣기...
2001-07-13 17:39:58
8353
816  ┕>Re: Re: Re: java object넣기...
하만복
2001-07-13 19:28:36
8094
793ASP에서 LDAP의 정보를 받을수 있나요?
장대호
2001-07-11
7495
797┕>Re: ASP에서 LDAP의 정보를 받을수 있나요?
송상준
2001-07-12 20:33:27
8628
792[긴급]Netscape Directory Server 설치시 Error
안진희
2001-07-11
7126
796┕>예비군 훈련다녀오고 첨 답변을 씁니다.
송상준
2001-07-12 20:29:25
8014
809┕>Re: [긴급]Netscape Directory Server 설치시 Error
서호정
2001-07-13 13:53:57
7661
788ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
이지온
2001-07-10
6688
789┕>Re: ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
이창훈
2001-07-11 09:39:15
7745
790 ┕>Re: Re: ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
이지온
2001-07-12 07:22:01
7355
791  ┕>Re: Re: Re: ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
정재익
2001-07-11 16:19:51
7650
794   ┕>Re: Re: Re: Re: ftp 서버로 ldap을 활용할수 있는 방법이 있나요?
이지온
2001-07-12 07:41:06
7471
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.023초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다