basigek / simbrain

Automatically exported from code.google.com/p/simbrain
0 stars 0 forks source link

starting from sources in eclipse #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Just discovered this very interesting project and tried to start simbrain from 
the sources in eclipse ...

I checked it out via SVN.

First I got a lot of errors because of missing jars, so I added all the jars 
from /lib to the properties/Java Build Path/Libraries in the eclipse project.

After this I got it to work and Simbrain started ...

But when I want to open an existing Workspace "ChasingAmy.zip"  I get the 
following error messages in the console:

Exception in thread "AWT-EventQueue-1" 
com.thoughtworks.xstream.converters.ConversionException: No such field 
org.simbrain.workspace.ArchiveContents.components
---- Debugging information ----
message             : No such field 
org.simbrain.workspace.ArchiveContents.components
cause-exception     : 
com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : No such field 
org.simbrain.workspace.ArchiveContents.components
class               : org.simbrain.workspace.ArchiveContents
required-type       : org.simbrain.workspace.ArchiveContents
path                : /Workspace/Component
-------------------------------
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:63)
    at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:117)
    at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:29)
    at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:846)
    at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:833)
    at com.thoughtworks.xstream.XStream.fromXML(XStream.java:789)
    at org.simbrain.workspace.WorkspaceSerializer.deserialize(WorkspaceSerializer.java:181)
    at org.simbrain.workspace.WorkspaceSerializer.deserialize(WorkspaceSerializer.java:141)
    at org.simbrain.workspace.Workspace.openWorkspace(Workspace.java:681)
    at org.simbrain.workspace.gui.SimbrainDesktop.openWorkspace(SimbrainDesktop.java:876)
    at org.simbrain.workspace.actions.OpenWorkspaceAction.actionPerformed(OpenWorkspaceAction.java:55)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: 
com.thoughtworks.xstream.converters.reflection.ObjectAccessException: No such 
field org.simbrain.workspace.ArchiveContents.components
    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.field(FieldDictionary.java:57)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getFieldType(PureJavaReflectionProvider.java:139)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.writeValueToImplicitCollection(AbstractReflectionConverter.java:227)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:206)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
    ... 40 more

Thanks a lot!

Original issue reported on code.google.com by m...@psyron.com on 25 Apr 2011 at 9:24

GoogleCodeExporter commented 9 years ago
Thanks for the note, and for initiating the use of the issue tracker!  There is 
a wiki page describing how to configure Ecliipse to run Simbrain, which 
addresses the first problem you ran in to, and then overcame (adding jars to 
the build path in Eclipse).   The exception you got is because the persistence 
scheme is still changing, and so the stored simulation files won't work with 
the current code.   I'm holding off checking in updated files until persistence 
has stabilized.   Actually I'm not even sure the simulation files should be in 
the repository to begin with (if you or anyone else knows of a "best practices" 
document on this I'd be interested).  For now I can either send you some 
working workspace files offline, or update the files in the repository, with 
the understanding that I may have to do so again, possibly several times, 
before the final release of Simbrain 3.  Any suggestions?

Original comment by jeffyosh...@gmail.com on 25 Apr 2011 at 8:12

GoogleCodeExporter commented 9 years ago
Hi Jeff Yoshimi,
thanks for the quick reply ... first I want to say that this neural network 
simulator looks really good ... I am interested in an easy to use simulator 
with a 2D world and was just on the way to code my own one based on the MARS 
framework in flash (www.marsframework.com).

Ah, I understand, the xml files changed, ok, this is not a big problem. I 
thought that there is a missing library or so. I guess it's then enough to 
mention it somewhere in the description, that the xml files may not be 
compatible at the moment. (yes, or maybe remove them completely).

Beside of loading those incompatible files everything else is working fine.

I studied computer science and psychology and I am interested in modelling an 
autonomous agent with a neural network learning through satisfaction of 
different needs (energy, water, certainty). I guess this framework should be 
very appropriate for this.
My main inspiration comes from a german psychologist Prof.Dietrich Dörner from 
the university of Bamberg, he wrote a book "Bauplan für eine Seele" (blueprint 
of a soul), very interesting, but unfortunately only in german. But I heard 
that there is an author who wrote a book based on that book called "PRINCIPLES 
OF SYNTHETIC INTELLIGENCE". 
I guess I will go a bit into the code the coming days to get familiar with it.
Thanks and nice to meet you,
Markus Stoehr

Original comment by m...@psyron.com on 25 Apr 2011 at 9:12

GoogleCodeExporter commented 9 years ago
Hi Markus,

Glad you like it.   I did not know about Dörner and will try to have a look.  
If you get in to the code and have questions, email me and I'll try to provide 
an answer and / or improve relevant docs.

How about this for a solution to the problem you raised: I'll delete the files 
from the simulation folder, and will put in a README that explains why those 
folders are currently empty.  

Original comment by jeffyosh...@gmail.com on 26 Apr 2011 at 12:02

GoogleCodeExporter commented 9 years ago
Hi Jeff,
that sounds very good, I will come back to you for questions,
Thanks a lot

Original comment by m...@psyron.com on 26 Apr 2011 at 11:52

GoogleCodeExporter commented 9 years ago
Ok, I've removed all non-working files and added a README to explain, as part 
of revision -r 2337.  Thanks for raising the issue and keep in touch.

Original comment by jeffyosh...@gmail.com on 26 Apr 2011 at 5:17