centreformicrosimulation / SimPaths

SimPaths is an open-source microsimulation framework for life course analysis, developed and maintained by CeMPA at the University of Essex
6 stars 16 forks source link

Database build failure #13

Closed dkopasker closed 11 months ago

dkopasker commented 11 months ago

While attempting to build the databases to start SimPaths I encounter the following error message:

"ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console... Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.io.BufferedWriter.flush()" because "bufferWriter" is null at simpaths.experiment.SimPathsStart.constructAggregateTaxDonorPopulationCSVfile(SimPathsStart.java:503) at simpaths.experiment.SimPathsStart.runGUIdialog(SimPathsStart.java:272) at simpaths.experiment.SimPathsStart.main(SimPathsStart.java:77)"

Reducing the number of policy years fails to resolve the issue.

justin-ven commented 11 months ago

While attempting to build the databases to start SimPaths I encounter the following error message:

"ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console... Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.io.BufferedWriter.flush()" because "bufferWriter" is null at simpaths.experiment.SimPathsStart.constructAggregateTaxDonorPopulationCSVfile(SimPathsStart.java:503) at simpaths.experiment.SimPathsStart.runGUIdialog(SimPathsStart.java:272) at simpaths.experiment.SimPathsStart.main(SimPathsStart.java:77)"

Reducing the number of policy years fails to resolve the issue.

It would be useful to describe the steps taken to replicate this issue - I have gone through a fair few alternatives, without encountering the problem. The steps I followed are:

  1. Download the "main" branch from https://github.com/centreformicrosimulation/SimPaths/archive/refs/heads/main.zip
  2. Extract the zip folder to a temp directory
  3. Open the model using IntelliJ
  4. Trust the project (if a warning appears)
  5. Allow IntelliJ to complete its initialisation
  6. Under "Frameworks detected", select "Configure" and choose "OK" (I also skipped this step without problem)
  7. Open "Project", select "SimPaths-main">src>main>java>simpaths>experiment>SimPathsStart, right-click and choose "Debug"
  8. Select "Run SimPaths GUI <= Select policies <= Load input data" (third option from top - I also re-ran through this procedure choosing the other options without encountering an issue)
  9. Press "Next"
  10. Choose "United Kingdom" from top drop down of the Country and Start Year window (there is only 2017 option in second drop down)
  11. Press "Next"
  12. Press "Build new Policy Schedule"

From there the model should run all the way through.

The revised model structure is now designed to run without the need to obtain