Page 1 of 1

Cannot generate my own naive agent

PostPosted: Fri Apr 18, 2014 10:32 pm
by Sergio
Hi all,

I'm trying to generate my own naive agent. The aim is to get the same agent as the provided one from the website, just for checking whether it works, but I am finding some problems. When I try to run my "ABSoftware.jar" file (I've removed the previous one obtained by the unzipped file downloaded) generated and compiled by ant1.7 (as ABDoc1.7 shows), I've found the next exception:

$ java -jar ABSoftware.jar -na 1

You are trying to connect to an unknown host!
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NullPointerException
at ab.demo.other.ClientActionRobot.configure(Unknown Source)
at ab.demo.ClientNaiveAgent.run(Unknown Source)
at ab.demo.ClientNaiveAgent.main(Unknown Source)
... 5 more

I have not changed/modified any lane of any *.java, just compiled and generated the jar file. I also have seen the content of both ABSoftware.jar are different.

I would like to know if possible if someone else has had the same problem as me. If so... how could I generate it correctly? where is my problem?

Thanks a lot.

Re: Cannot generate my own naive agent

PostPosted: Fri Apr 18, 2014 11:08 pm
by Gary
Hello Sergio

Can you please try the following:

open build.xml

replace "<attribute name="Rsrc-Main-Class" value="ab.demo.ClientNaiveAgent"/>" with <attribute name="Rsrc-Main-Class" value="ab.demo.MainEntry"/>

Sorry for the confusion

Smile
Gary

Re: Cannot generate my own naive agent

PostPosted: Wed Oct 15, 2014 9:19 pm
by Sergio
Hi Gary,

I'm sorry for this late answer. True, It was my problem, thanks. I looked up some information about creating my own build before checking your message and that was the point (I've also seen that you fixed it on the last new version).

I had to study last months and now I want to retake it for having a decent algorithm the next year :)

Cheers.

Re: Cannot generate my own naive agent

PostPosted: Wed Oct 15, 2014 9:29 pm
by Gary
Good luck ! : )