#73 jsmoothcmd throws a NullPointerException

open
nobody
5
2007-11-01
2007-11-01
Anonymous
No

I created a .jsmooth configuration file in the GUI, and when I run it inside the GUI (JSmoothGen) it works well. When I try to run the same file using JSmoothCmd, I get a NullPointerException as below:

java.lang.NullPointerException at net.charabia.jsmoothgen.application.PropertiesBuilder
.makeProperties(PropertiesBuilder.java:79)
at net.charabia.jsmoothgen.application.ExeCompiler
.compile(ExeCompiler.java:162)
at net.charabia.jsmoothgen.application.cmdline
.CommandLine.main(CommandLine.java:81)

Discussion

  • Logged In: NO

    it is due to the following line in CommandLine.java:
    File basedir = prj.getParentFile();

    getParentFile() will return null if the pathname does not name a parent directory.
    so doing: jsmooth myconfig.jsmooth on windows XP triggers this exception where as jsmooth c:\folder\myconfig.jsmooth does not...

     
  • I have encountered the same issue. The follow up on 2008-03-02 16:44 is correct. Using an absolute path to the project file resolved my issue.

     
  • Any ideas on this problem? I have the same issue--cannot figure out how to get the project to rebuild using jsmoothcmd.exe.

    I rebuilt the .smooth project file several times with different parms. Another project I have builds correctly using jsmoothcmd.exe. It seems like it works at times--I found the solution to be specifying the complete path for the .jsmooth project file.

    Thanks.