james-server-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "joni santoso" <str...@plasa.com>
Subject Creating/Adding/Changing User (Password)
Date Thu, 08 May 2003 05:01:01 GMT
Hi,

I read some postings on the archive about adding users but 
I still couldn't find some snippets.

So I tried coding by myself.

I wonder why every time I run the codes it keeps producing 
error like this :

C:\>java test
test
Exception in thread "main" java.lang.NullPointerException
         at 
org.apache.james.mailrepository.AvalonMailRepository.list(AvalonMailR
epository.java:385)
         at test.main(test.java:25)


I use win2k advanced server and james 2.1.2.


if anyone can share his/her codes about adding/changing 
users, I would be very thankful.

here the codes :

import org.apache.james.*;
import org.apache.mailet.*;
import org.apache.james.userrepository.*;
import org.apache.james.remotemanager.*;
import org.apache.james.mailrepository.*;
import java.util.Iterator;

public class test {
public static void main(String[] args) {
System.out.println("test");
/*try {
RemoteManager rm = new RemoteManager() ;
rm.initialize();
UsersFileRepository ufr = new UsersFileRepository();
Iterator i = ufr.list();
while (i.hasNext()) {
System.out.println(i.next());
}
System.out.println("done");
} catch (Exception e) {
System.out.println("Error : " + e);
}
*/
AvalonMailRepository amr = new AvalonMailRepository();
Iterator i = amr.list();
while (i.hasNext()) {
System.out.println(i.next());
}
System.out.println("done");
}
}
===========================================================================================
"TELKOMNet Instan memberikan diskon 40% untuk akses malam hari dari pukul 23.00 sampai 06.00.
Berlaku untuk wilayah Jawa Timur mulai 1 Mei 2003 sampai 30 Juni 2003."
===========================================================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Mime
View raw message