Menu

#17 repository object is not valid

open
nobody
None
5
2014-08-21
2008-08-21
Anonymous
No

We use Maven 2.0.9 with statscm 1.1.0.
For "some" projects we got a error like this here:

[INFO] Output Directory :d:\ws_sid\spice-sid\sid-base\sid-base-report\target\generated-site\xdoc\statscm\ [INFO] scm log > d:\ws_sid\spice-sid\sid-base\sid-base-report\target\generated-site\xdoc\statscm\scm.log
[INFO] d:\ws_sid\spice-sid\sid-base\sid-base-report\target\generated-site\xdoc\statscm\scm.log EOF.
[INFO] scm log ...; exitValue: 0
Aug 21, 2008 12:16:19 PM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: Parsing SVN log 'd:\ws_sid\spice-sid\sid-base\sid-base-report\target\generated-site\xdoc\statscm\scm.log' exclude
pattern '**/test/**/*.java'
Aug 21, 2008 12:16:19 PM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: Scheduled 0 svn diff calls on 0 threads.
Aug 21, 2008 12:16:20 PM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: Generating report for SID Base Reporting into d:\ws_sid\spice-sid\sid-base\sid-base-report\target\generated-site\x
doc\statscm\ Aug 21, 2008 12:16:20 PM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: Using default CSS file (statcvs.css)
Aug 21, 2008 12:16:20 PM net.sf.statsvn.util.JavaUtilTaskLogger error
SEVERE: The repository object is not valid. Please check your settings.
Is the log file empty? Do you run from a checked out directory? Do you have non-committed items?

The log is not empty, contains the "normal" svn log xml-content. I try stats svn direct for this project ... working fine.

any idea?

regards
andreas

Discussion

  • Nobody/Anonymous

    I am getting the same error. It causes the mvn release:perform of my project to fail....
    My scenario is, when doing site-deploy (or site:stage) on a SNAPSHOT version from trunk than everithing is ok, but when doing the same on a checkedout tag from repos. than the site-deploy fails....

    Please help

     
  • Florian Kirchmeir

    Hi!
    I just had the same issue, and had a look at the code:
    net.sf.statsvn.Main.validate()
    [code]
    if (config.getRepository() == null || config.getRepository().getRoot() == null || config.getRepository().getDirectories() == null) {
    String cr = System.getProperty("line.separator");
    printErrorMessageAndExit("The repository object is not valid. Please check your settings." + cr + "Possible reasons:" + cr
    + "1/ Did you use the option -v to create the SVN log" + cr + "2/ Is the log file empty?" + cr
    + "3/ Do you run from a checked out directory (you should)?" + cr + "4/ Do you have non-committed items?");
    }
    [/code]

    In our case, this happened when there are no entries in the SVN log file for the project (i.e. you had no changes within the report period).
    This is currently treated as a fatal error.
    In my opinion, the entire "validate" method should be skipped, and cases where the Repository root or directories are empty should be handled gracefully (producing empty reports). In fact, they don't seem to be used in too many places in the code anyway!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.