I'm trying to create a very simple bot following the accjbot example, that does nothing except log each event in AccEventListener interface.
After having some problems getting the native library to load (you have to configure the DYLD_LIBRARY_PATH environment variable on OSX) I was able to get the program to link and run, but I'm getting a mysterious exception when trying to execute AccSession.signOn();
I've checked and double checked that my password is correct, which leads me to believe that I have something misconfigured somewhere.
I did find this thread: http://dev.aol.com/node/995 but I'm not sure if that's related.
here is my class:
package net.tfs.league.shell.aim;
import com.aol.acc.*;
import static org.apache.commons.lang.StringUtils.join;
import java.lang.reflect.*;
public class SendMessage {
public static void main(String[] args) throws AccException {
String key = "GameOn Leagues (Key:XXXXXXXX)";
String name = "gamexonbot";
AccSession session = new AccSession();
AccClientInfo info = session.getClientInfo();
info.setDescription(key);
session.setIdentity(name);
session.setEventListener(AIMListener.create());
session.signOn("XXXXX");
for (;;) {
try {
AccSession.pump(50);
} catch (Exception e) {
e.printStackTrace();
}
try {
Thread.sleep(50);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
private static class AIMListener implements InvocationHandler {
public static AccEvents create() {
return (AccEvents) Proxy.newProxyInstance(AIMListener.class.getClassLoader(), new Class[] {AccEvents.class}, new AIMListener());
}
public Object invoke(Object o, Method method, Object[] objects) throws Throwable {
System.out.printf("%s(%s)\n", method.getName(), join(objects, ","));
return Void.TYPE;
}
}
}
and it receives the following exception:
Exception in thread "main" com.aol.acc.AccException: IAccSession_SignOn at com.aol.acc.AccSession.SignOn(Native Method) at com.aol.acc.AccSession.signOn(AccSession.java:113) at net.tfs.league.shell.aim.SendMessage.main(SendMessage.java:53)
What am I misconfiguring? Is there a way to get at the error of the underlying native library?
Also, here is the files which are in my java.library.path and also my DYLD_LIBRARY_PATH. It's just the release directory of the download for OSX.
gandalf:~/devlibs/accsdk_macosx_univ_1_6_7/C++ cowboyd$ ls -l dist/release/ total 27480 -rwxr-xr-x 1 cowboyd cowboyd 580416 Mar 4 10:37 accbuddy -rw-r--r-- 1 cowboyd cowboyd 157790 Mar 4 10:35 accjwrap.jar -rwxr-xr-x 1 cowboyd cowboyd 1930516 Mar 4 10:35 libacccore.dylib -rwxr-xr-x 1 cowboyd cowboyd 1085312 Mar 4 10:35 libaccjwrap.jnilib -rwxr-xr-x 1 cowboyd cowboyd 4818100 Mar 4 17:18 libcoolcore52.dylib -rwxr-xr-x 1 cowboyd cowboyd 671116 Mar 3 11:48 libfreebl3.dylib -rwxr-xr-x 1 cowboyd cowboyd 533544 Mar 3 11:48 libnspr4.dylib -rwxr-xr-x 1 cowboyd cowboyd 1091616 Mar 3 11:48 libnss3.dylib -rwxr-xr-x 1 cowboyd cowboyd 631640 Mar 3 11:48 libnssckbi.dylib -rwxr-xr-x 1 cowboyd cowboyd 138528 Mar 3 11:48 libplc4.dylib -rwxr-xr-x 1 cowboyd cowboyd 128816 Mar 3 11:48 libplds4.dylib -rwxr-xr-x 1 cowboyd cowboyd 347176 Mar 3 11:48 libsmime3.dylib -rwxr-xr-x 1 cowboyd cowboyd 766232 Mar 3 11:48 libsoftokn3.dylib -rwxr-xr-x 1 cowboyd cowboyd 366592 Mar 3 11:48 libssl3.dylib -rwxr-xr-x 1 cowboyd cowboyd 793444 Mar 4 17:18 libxprt6.dylib

Unknown Error
Thanks,
The errorCode of the exception is:
I'm not sure if that sheds any light on the issue.