How to debug an error with JavaTDDPlugin?

Hi, First, thanks for a great piece of software. I am planning to use it for automated testing/grading in a second year course I am teaching in September. I have successfully installed, created an assignment and graded an assignment on an installation on my laptop where I have admin privledges. I am now trying to get Web-CAT installed on one of our undergrad servers where it runs in user space. I have successfully installed Web-CAT and can create an assignment. However, when I try to auto-grade the assignment, I receive the following error from the JavaTddPlugin:  GraderQueueProcessor: technicalFault(): [Grader] Grading error: murphy #1 INFO [GraderQueueProcessor] GraderQueueProcessor: An error occurred stderr output was produced by (1): JavaTddPlugin  Does anyone have any suggestions of how to debug what might be going wrong with the plugin? I'm running Java 1.7.  Thanks in advance for any hints, Gail.

Groups:

Comments

Stephen Edwards

Welcome, and glad you're

Welcome, and glad you're planning to use Web-CAT this fall.  If you run into any early troubles, just ask and I'll help how I can.

The message you describe is relatively uninformative to most people, so don't feel bad.  But really what is means is that something the plug-in couldn't handle happened (possibly a configuration issue, who knows?), and so it dumped some diagnostics on stderr and quit.  Web-CAT should have sent an e-mail (or tried) with a message to that effect.  The e-mail would have been sent to the administrator e-mail address you configured, if the smtp server setting is OK.

Anyway, the real question is: where the heck can you find out what the plug-in produced on stderr, since that isn't shown?  Well, a plain text file containing the stderr contents would have been attached to that e-mail message to the administrator.  However, if you don't have the e-mail handy (or it didn't make it through), then you can still poke around in the file system and find it.  

Go into the file system on your server where Web-CAT is saving uploaded submissions and results. This would be the "grader storage" location you specified during installation. Within that directory, if you look into its subdirectories, you'll find one named after the login institution you set up, with a subdirectory inside it named after the semester you created, with a subdirectory inside it named after the course offering ID you used, then subdirectories for each assignment you created, and inside those, subdirectories for each user name that has submitted to the assignment.

Go all the way inside there and look at the folder for the highest submission number (the most recent one).  In there, you'll find the original submission (a zip file or whatever you uploaded), as well as a "Results" subdirectory that contains all of the info generated by plug-in(s) during processing.  There will be a file in there with "stderr" in the name--check it out and see what it says.  That will hopefully give you info about what was not working or misconfigured.

Let us know what you find out ...

GailMurphy

Contents of stderr

Hi,

 

Thanks for the reply and how to get to the error file. I am not receiving email so will need to work on the setup some more...

The stderr file has only "mismatched tag 'coverage''" in it. Any hints on that erorr (or I will dig through the source code... :) )

Gail

GailMurphy

Success without coverage on

Hi,

I changed the assignment to not include coverage and that seems to grade correctly.

 

Any clues on what might be going wrong with the coverage part? Seems potentially a parser error on one of the xml files associated with clover?

 

Gail

 

 

Stephen Edwards

> The stderr file has only

@GailMurphy,

> The stderr file has only "mismatched tag 'coverage'"

OK, here is what is going on.  The JavaTddPlugin is using Clover (a code coverage tool) to instrument the student code to collect coverage data, and then to generate an XML report summarizing that data.  It sounds like the XML report file that Clover is generating is only partial/truncated (probably due to the real problem/error), and so the plug-in is dying with this message because it cannot read the incomplete Clover XML report file (which, therefore, has a missing closing element for the top level "coverage" tag that appears in the report XML).

So, the question is what is causing Clover to die, part way through producing its results?  In that same directory, please take a look at the ant.log file (which should include any error messages that Clover produced) and the clover.xml file (which should contain the truncated output).  You can post whatever parts of those files you believe are relevant here ...

GailMurphy

Nothing obviously wrong in

Nothing obviously wrong in ant.log files.

 

A new problem has surfaced however on a re-install. The default JavaTDDPlugin has disappeared. Files exist in the UserScripts directory in the submissions area.  How do I get Web-CAT to recognize them? Is there a system setting to check?

 

Sorry for all of the questions. I feel as if I am on the cusp of having it all work.

 

 

Stephen Edwards

@GailMurphy: > Nothing

@GailMurphy:

> Nothing obviously wrong in ant.log files.

Please confirm: you were looking in the ant.log for a submission where you had test coverage enabled, and where the plug-in died with stderr output, correct?  Did the clover.xml report file appear "truncated"?  If both of these are true, can you send me the clover.xml file along with the submission that you used, so I can check further?

Regarding the re-install problem, you've found a "bug" when performing a non-clean reinstall.  If the specified storage area exists and contains old content, automatically installed plug-ins won't be installed correctly when you reinstall the server and wipe the database.  Basically, if you re-install the server with a wiped database, you should also wipe the storage area as well.

However, there is a way to fix this.  Try wiping the UserScripts directory in the storage area, and then restart Web-CAT.  It should then correctly re-install the plug-ins.  Basically, what happened was that when it tried to re-install the plug-ins, it internally skipped that process because of the existing copy stored in the file system, but since the plug-in wasn't recorded in the clean/wiped database, Web-CAT ends up without a correctly installed plug-in as a result.

This bug is fixed for the next release of the "Core" subsystem, but that won't be available until a bit later this month.  In the mean time, removing the contents of the UserScripts folder and restarting Web-CAT should allow the plug-in automatic install process to complete successfully.

Amit Semwal_2

I have the same error

I faced the same errod.

 

Here is my stderr file:

 

Can't locate HTML/Entities.pm in @INC (@INC contains: /home/amit/TomCat/webapps/Web-CAT/WEB-INF/Web-CAT.woa/Contents/Library/Frameworks/PerlForPlugins.framework/Resources/lib /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/amit/TomCat/webapps/Web-CAT/WEB-INF/Web-CAT.woa/Contents/Library/Frameworks/PerlForPlugins.framework/Resources/lib/Web_CAT/Utilities.pm line 28.
BEGIN failed--compilation aborted at /home/amit/TomCat/webapps/Web-CAT/WEB-INF/Web-CAT.woa/Contents/Library/Frameworks/PerlForPlugins.framework/Resources/lib/Web_CAT/Utilities.pm line 28.
Compilation failed in require at /home/amit/TomCat/webapps/Web-CAT/WEB-INF/Web-CAT.woa/Contents/Library/Frameworks/PerlForPlugins.framework/Resources/lib/Web_CAT/Beautifier/Core.pm line 21.
BEGIN failed--compilation aborted at /home/amit/TomCat/webapps/Web-CAT/WEB-INF/Web-CAT.woa/Contents/Library/Frameworks/PerlForPlugins.framework/Resources/lib/Web_CAT/Beautifier/Core.pm line 21.
Compilation failed in require at /home/amit/TomCat/webapps/Web-CAT/WEB-INF/Web-CAT.woa/Contents/Library/Frameworks/PerlForPlugins.framework/Resources/lib/Web_CAT/Beautifier.pm line 6.
BEGIN failed--compilation aborted at /home/amit/TomCat/webapps/Web-CAT/WEB-INF/Web-CAT.woa/Contents/Library/Frameworks/PerlForPlugins.framework/Resources/lib/Web_CAT/Beautifier.pm line 6.
Compilation failed in require at /home/amit/TomCat/CSE201_Assignments/UserScripts/IIIT-D/admin/JavaTddPlugin/execute.pl line 19.
BEGIN failed--compilation aborted at /home/amit/TomCat/CSE201_Assignments/UserScripts/IIIT-D/admin/JavaTddPlugin/execute.pl line 19.

Stephen Edwards

OK, this is a system

@Amit, this is a system configuration issue that likely can be fixed.  The problem is that some of the plug-in support code assumes the presence of a fairly common Perl module, but your server doesn't have this module.  I can include this module in the next update so that this error goes away for future users.  In the mean time, if you install the HTML::Entities module from CPAN so that it is acessible in your site_perl directory (or where ever), that should fix the problem for you.

Like I said, I'll see if I can roll this dependency into the support code itself for the next update (probably out before the end of the month).