I tried Nick Malleson's (very nice) tutorial using RepastS v.1.0 and was unable to re-create the problem. The collections jar is already included with RepastS suggesting that something is wrong with the repast install on your machine. If you expand the project and expand the "Referenced Libraries" item, you should see collections-generic-4.01.jar there along with many other libraries which are bundled with RepastS. I suggest re-creating the project again or re-installing, but make sure to backup your project source code (not the project config data) somewhere else.
eric
Eric Tatara, Ph.D.
Assistant Software Engineer
Center for Complex Adaptive Agent Systems Simulation
Decision and Information Sciences Division
Argonne National Laboratory
-----Original Message-----
From:
repast-interest-bounces@... [mailto:
repast-interest-bounces@...] On Behalf Of Stefan Vitz
Sent: Friday, June 20, 2008 5:25 AM
To:
repast-interest@...
Subject: [Repast-interest] RepastS: org.apache.commons.collections15.Predicate needet for DefaultContext (non-GUI Tutorial)
Hi,
I'm trying the Repast Simphony ¿non-GUI¿ Tutorial mentioned on this list before.
(
http://portal.ncess.ac.uk/access/wiki/site/mass/simphony%20tutorial.html)
When implementing the PeopleContext as Extension of DefaultContext<Person> eclipse warns me (at package-definition line):
org.apache.commons.collections15.Predicate cannot be resolved.
It is indirectly referenced from required .class files This must be bevouse auf the extend DefaultContext...
Well. I googled and found out that org.apache.commons.collections15.Predicate
is for example part of collections-generic-4.01.jar
(
http://www.findjar.com/jar/net.sourceforge.collections/jars/collections-generic-4.01.jar.html?all=true)
I downloaded this jar-file and addet it to my project under Properties -> Libaries -> Add external JAR.
Well the warning is gone. but when loading the model to repast and start the simulation
i get the following error message:
Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation
problems: The type org.apache.commons.collections15.Predicate cannot be resolved. It is
indirectly referenced from required .class files Only a type can be imported.
org.apache.commons resolves to a package
at socnets.PeopleContext.<init>(PeopleContext.java:1)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance ...
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance ...
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
So.. what to do?
I need org.apache.commons.collections15.Predicate but where to get/add it?
I don't really feal comfortably with eclipse. So perhaps someone can give me a hint.
one minor second thing:
peopleGeography.move(p, new GeometryFactory().createPoint(
new Coordinate(i,i+1)));
tells me that GeometryFactory() and Coordinate() cannot be resolved for a type.
I first fiddeld around with generic types but endet in leaving everything as mentioned
within the tutorial. but it doesn't work for me either.
Thanks,
Stefan Vitz
--
,---\----/
\____\ / Stefan Vitz Bielefeld public GnuPG key:
_______/ \/
stefan@... Germany
http://w148.de/~svitz/pubkey.asc-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php_______________________________________________
Repast-interest mailing list
Repast-interest@...
https://lists.sourceforge.net/lists/listinfo/repast-interest