directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juergen Weber <webe...@gmail.com>
Subject Re: Embedded Server - Sample
Date Mon, 17 Nov 2008 10:17:20 GMT

Hi Felix,

I put the web application sample into a main, but I get an Exception

2008-11-17 11:05:43,895 [main] DEBUG
org.apache.directory.server.core.DefaultDirectoryService  - <---
DefaultDirectoryService initialized
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.directory.server.ldap.LdapProtocolHandler.removeMessageHandler(Ljava/lang/Class;)Lorg/apache/mina/handler/demux/MessageHandler;
	at
org.apache.directory.server.ldap.LdapService.setAbandonHandler(LdapService.java:855)
	at
org.apache.directory.server.ldap.LdapService.installDefaultHandlers(LdapService.java:228)
	at org.apache.directory.server.ldap.LdapService.start(LdapService.java:319)
	at test.DSStarter.startDS(DSStarter.java:35)
	at test.DSStarter.main(DSStarter.java:42)




import java.io.File;

import org.apache.directory.server.core.DefaultDirectoryService;
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.ldap.LdapService;
import org.apache.directory.server.protocol.shared.SocketAcceptor;

public class DSStarter
{
	private DirectoryService directoryService;

	private SocketAcceptor socketAcceptor;
    private LdapService ldapService;

    void startDS() throws Exception
    {
    	directoryService = new DefaultDirectoryService();
        directoryService.setShutdownHookEnabled(true);

        socketAcceptor = new SocketAcceptor(null);
        ldapService = new LdapService();
        ldapService.setSocketAcceptor(socketAcceptor);
        ldapService.setDirectoryService(directoryService);

        ldapService.setIpPort(10389);

        
        String s = System.getProperty("java.io.tmpdir");
        
        directoryService.setWorkingDirectory(new File(s));

        directoryService.startup();
        ldapService.start();

    }
    
	
	public static void main(String[] args) throws Exception
	{
		new DSStarter().startDS();
		Thread.sleep(Long.MAX_VALUE);
		System.out.println("done");
	}
}

The classpath is

D:\java\apacheds-1.5.4\lib\xbean-spring-3.3.jar
D:\java\apacheds-1.5.4\lib\antlr-2.7.7.jar
D:\java\apacheds-1.5.4\lib\apacheds-bootstrap-extract-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-bootstrap-partition-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-core-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-core-avl-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-core-constants-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-core-cursor-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-core-entry-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-core-jndi-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-core-shared-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-jdbm-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-jdbm-store-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-kerberos-shared-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-noarch-installer-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-protocol-changepw-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-protocol-dns-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-protocol-kerberos-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-protocol-ldap-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-protocol-ntp-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-protocol-shared-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-schema-bootstrap-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-schema-extras-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-schema-registries-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-server-jndi-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-server-unit-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-server-xml-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-utils-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-xbean-spring-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-xdbm-base-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-xdbm-search-1.5.4.jar
D:\java\apacheds-1.5.4\lib\apacheds-xdbm-tools-1.5.4.jar
D:\java\apacheds-1.5.4\lib\bootstrapper.jar
D:\java\apacheds-1.5.4\lib\commons-cli-1.1.jar
D:\java\apacheds-1.5.4\lib\commons-collections-3.2.jar
D:\java\apacheds-1.5.4\lib\commons-daemon-1.0.1.jar
D:\java\apacheds-1.5.4\lib\commons-io-1.3.2.jar
D:\java\apacheds-1.5.4\lib\commons-lang-2.3.jar
D:\java\apacheds-1.5.4\lib\jcl104-over-slf4j-1.4.3.jar
D:\java\apacheds-1.5.4\lib\log4j-1.2.14.jar
D:\java\apacheds-1.5.4\lib\mina-core-1.1.6.jar
D:\java\apacheds-1.5.4\lib\mina-filter-ssl-1.1.6.jar
D:\java\apacheds-1.5.4\lib\shared-asn1-0.9.12.jar
D:\java\apacheds-1.5.4\lib\shared-asn1-codec-0.9.12.jar
D:\java\apacheds-1.5.4\lib\shared-bouncycastle-reduced-0.9.12.jar
D:\java\apacheds-1.5.4\lib\shared-ldap-0.9.12.jar
D:\java\apacheds-1.5.4\lib\shared-ldap-constants-0.9.12.jar
D:\java\apacheds-1.5.4\lib\slf4j-api-1.4.3.jar
D:\java\apacheds-1.5.4\lib\slf4j-log4j12-1.4.3.jar
D:\java\apacheds-1.5.4\lib\spring-beans-2.0.6.jar
D:\java\apacheds-1.5.4\lib\spring-context-2.0.6.jar
D:\java\apacheds-1.5.4\lib\spring-core-2.0.6.jar
D:\java\apacheds-1.5.4\lib\wrapper.jar

-- 
View this message in context: http://www.nabble.com/Embedded-Server---Sample-tp20502209p20536859.html
Sent from the Apache Directory Project mailing list archive at Nabble.com.


Mime
View raw message