metametascape
Welcome, Guest
Please Login or Register.
Lost Password?
Problem running example (1 viewing)
_GEN_GOTOBOTTOM Post Reply

TOPIC: Problem running example

#109
aero (User)
Junior Boarder
Posts: 7
graphgraph
Problem running example 2008/02/13 14:25 Karma: 0  
I'm trying to work through the tutorial and am having a problem when I try to run the prisoners dilemma model using repast. The project builds fine but I get this runtime error:


ERROR [main] 13:17:26,859 saf.core.runtime.Boot - null
java.lang.NullPointerException
at saf.core.runtime.Boot.init(Boot.java:72)
at saf.core.runtime.Boot.main(Boot.java:212)
ERROR [main] 13:17:26,859 saf.core.runtime.Boot - null
java.lang.NullPointerException
at saf.core.runtime.Boot.run(Boot.java:125)
at saf.core.runtime.Boot.main(Boot.java:213)

Suggestions?

Thanks!
  The administrator has disabled public write access.
#111
admin (Admin)
Admin
Posts: 3
graphgraph
Re:Problem running example 2008/02/14 00:32 Karma: 0  
See repast entry..
  The administrator has disabled public write access.
#112
aero (User)
Junior Boarder
Posts: 7
graphgraph
Re:Problem running example 2008/02/14 22:20 Karma: 0  
I followed the updated material but continue to have the same problem.

I've tried re-downloading the repast plugins to a different directory and setting the classpath and string substitution variables to that but I continue to get the runtime error. It builds fine which I assume means it is finding the plugins via the class path variable. I also tried deleting the project and rebuilt it from scratch.

I'm running Eclipse Version: 3.3.1.1 on Windows XP.

What should I look for?

Here is the error message again for completeness:

ERROR [main] 16:08:17,218 saf.core.runtime.Boot - null
java.lang.NullPointerException
at saf.core.runtime.Boot.init(Boot.java:72)
at saf.core.runtime.Boot.main(Boot.java:212)
ERROR [main] 16:08:17,234 saf.core.runtime.Boot - null
java.lang.NullPointerException
at saf.core.runtime.Boot.run(Boot.java:125)
at saf.core.runtime.Boot.main(Boot.java:213)

Thanks for the help!
  The administrator has disabled public write access.
#113
miles (Admin)
Admin
Posts: 59
graph
Re:Problem running example 2008/02/15 00:28 Karma: 1  
No problem, happy to have folks banging on it! Try this.

What OS are you using?

Use the launch configurations instead of the Run As.. menu. "Run: Run Configurations" Click "new" for Repast metaABM Model". Add values that make sense. The launch configuration uses slightly different setup so that might work, but at the least it will help diagnose the issue. If it has the same issue, please:

Go to the "Common" tab. Select "Shared file" and set your project as the location. This should save the launch file to your project. Reply here with the text of that launch file.

thanks!
  The administrator has disabled public write access.
#114
aero (User)
Junior Boarder
Posts: 7
graphgraph
Re:Problem running example 2008/02/15 14:18 Karma: 0  
Hi Miles,
I'm running Eclipse Version: 3.3.1.1 on Windows XP.

Went through the run setup as you suggested. I get the same results. Here is the launch file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.example.repast"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" path="1" type="4"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="REPAST_HOME/plugins/repast.simphony.runtime/bin" path="3" type="3"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="REPAST_HOME/plugins/repast.simphony.runtime/lib/saf.core.runtime.jar" path="3" type="3"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="REPAST_HOME/plugins/repast.simphony.runtime/lib/commons-logging-1.0.4.jar" path="3" type="3"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="REPAST_HOME/plugins/repast.simphony.runtime/lib/javassist-3.1.jar" path="3" type="3"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="REPAST_HOME/plugins/repast.simphony.runtime/lib/jpf.jar" path="3" type="3"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="REPAST_HOME/plugins/repast.simphony.runtime/lib/jpf-boot.jar" path="3" type="3"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="REPAST_HOME/plugins/repast.simphony.runtime/lib/log4j-1.2.13.jar" path="3" type="3"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="REPAST_HOME/plugins/repast.simphony.runtime/lib/xpp3-1.1.3.4d_b4_min.jar" path="3" type="3"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="REPAST_HOME/plugins/repast.simphony.runtime/lib/xstream-1.1.3.jar" path="3" type="3"/> "/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="saf.core.runtime.Boot"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="Cocuments and SettingsLyle WallisMy DocumentsEclipseUML Experimentsorg.example.repast/DemographicPrisonersDilemma.rs ${repast_home}/plugins/repast.simphony.runtime/"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.example.repast"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512M"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${repast_home}/plugins/repast.simphony.runtime/"/>
<stringAttribute key="org.metaabm.gen.metaABMFile" value="DemographicPrisoner_sDilemma.metaabm"/>
</launchConfiguration>


Has anyone made this work on a windows machine? I'm not experienced at reading these but I'm wondering about some of the path names. Some have forward-slash and some have backward-slash. The repast plugins live at "Crogram FilesRepastPlugins"

Thanks for your help. I'd really like to make this work
Lyle
  The administrator has disabled public write access.
#115
miles (Admin)
Admin
Posts: 59
graph
Re:Problem running example 2008/02/15 18:15 Karma: 1  
Aha!

I believe this is the offending line:

<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="Cocuments and SettingsLyle WallisMy DocumentsEclipseUML Experimentsorg.example.repast/DemographicPrisonersDilemma.rs ${repast_home}/plugins/repast.simphony.runtime/"/>

Somehow all of the qualifiers have been removed. This probably has something to do with an EMF/Eclipse path coercion, but can you confirm that by changing the "Cocuments and SettingsLyle WallisMy DocumentsEclipseUML Experimentsorg.example.repast/DemographicPrisonersDilemma.rs" bit to a reasonable value? And then we'll try to determine why this happened.

The seperators obviously need to be added back in. What is happening is that as Windows uses , but that is the escape character in all normal OSs. So you will need to do or / -- Windows is IIRC fine w/ that.

You can't have those spaces alone, but I *believe* that you can simply surround the whole path bit with a quote by putting an " at the start and end. So I *think* the path should look something like this:

<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value=""C:/Documents and Settings/Lyle Wallis/My Documents/EclipseUML Experiments/org.example.repast/DemographicPrisonersDilemma.rs" ${repast_home}/plugins/repast.simphony.runtime/"/>

But first, try a *relative* path..

<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="DemographicPrisonersDilemma.rs ${repast_home}/plugins/repast.simphony.runtime/"/>
  The administrator has disabled public write access.
_GEN_GOTOTOP Post Reply
© Copyright 2007 Best of Joomla, Powered by FireBoardget the latest posts directly to your desktop