Archiva
  1. Archiva
  2. MRM-329

The Reports link gives an HTTP 500

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0-alpha-1
    • Fix Version/s: 1.0-beta-1
    • Component/s: reporting
    • Labels:
      None

      Description

      Clicking the Reports link in the side navigation menu displays the following (edited/snipped stacktrace):
      HTTP ERROR: 500
      RequestURI=/admin/reports.action
      Caused by: javax.el.PropertyNotFoundException: The class 'org.apache.maven.archiva.reporting.artifact.OldArtifactReport' does not have the property 'groupId'.
      at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:574)
      at javax.el.BeanELResolver.getValue(BeanELResolver.java:280)
      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
      at com.sun.el.parser.AstValue.getValue(AstValue.java:118)
      at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
      at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:974)
      at org.apache.jsp.WEB_002dINF.jsp.reports.reports_jsp._jspx_meth_c_forEach_0(org.apache.jsp.WEB_002dINF.jsp.reports.reports_jsp:143)
      at org.apache.jsp.WEB_002dINF.jsp.reports.reports_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.reports.reports_jsp:85)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)

      1. MRM-329.patch
        64 kB
        Teodoro Cue Jr.
      2. MRM-329-archiva-database-20070725.patch
        4 kB
        Teodoro Cue Jr.
      3. MRM-329-archiva-database-20070801.patch
        11 kB
        Teodoro Cue Jr.
      4. MRM-329-archiva-model-20070727.patch
        0.9 kB
        Teodoro Cue Jr.
      5. MRM-329-archiva-model-20070801.patch
        2 kB
        Teodoro Cue Jr.
      6. MRM-329-archiva-webapp-20070725.patch
        14 kB
        Teodoro Cue Jr.
      7. MRM-329-archiva-webapp-20070801.patch
        36 kB
        Teodoro Cue Jr.

        Issue Links

          Activity

          Hide
          Arnaud HERITIER added a comment -

          There's no common interface for reports data
          We can do something like that :
          <c:forEach items="$

          {reports}

          " var="report">
          <h3>
          $

          {report.name}

          </h3>
          <ul>
          <c:forEach items="$

          {report.data}

          " var="result">
          <c:if test="$

          {result.class.name == 'org.apache.maven.archiva.model.RepositoryProblem'}

          ">
          <li>
          <b>$

          {result.groupId}

          :$

          {result.artifactId}

          :$

          {result.version}

          :$

          {result.type}

          : </b>$

          {result.message}

          </li>
          </c:if>
          .....
          </c:forEach>
          </ul>
          </c:forEach>
          But it's not really nice

          Show
          Arnaud HERITIER added a comment - There's no common interface for reports data We can do something like that : <c:forEach items="$ {reports} " var="report"> <h3> $ {report.name} </h3> <ul> <c:forEach items="$ {report.data} " var="result"> <c:if test="$ {result.class.name == 'org.apache.maven.archiva.model.RepositoryProblem'} "> <li> <b>$ {result.groupId} :$ {result.artifactId} :$ {result.version} :$ {result.type} : </b>$ {result.message} </li> </c:if> ..... </c:forEach> </ul> </c:forEach> But it's not really nice
          Hide
          Arnaud HERITIER added a comment -

          The other type used here seems to be : ArchivaArtifact

          Show
          Arnaud HERITIER added a comment - The other type used here seems to be : ArchivaArtifact
          Hide
          Joakim Erdfelt added a comment -

          This is being postponed to 1.0-alpha-2

          Show
          Joakim Erdfelt added a comment - This is being postponed to 1.0-alpha-2
          Hide
          Teodoro Cue Jr. added a comment -

          I've attached a preliminary work of how archiva can use JasperReports as its reporting mechanism. It's functional but there are a lot of aesthetics work to be done.

          Aside from the look, there are a lot of things to discuss:
          1. Do we need to put in the links for the pages? Such as, when using Google, there are a number of links that corresponds to the resulting pages. Example: <1><2><3>...<Last Page>

          2. Do we put in the functionality that a user can choose the resulting number of rows per page? Currently I've hard coded this to 10 rows per page as I don't have a lot of sample to work on. And it's hard to put this number in between pages. It would be better to have the user choose the number first before starting the report. We can't put an editable text field on the JasperReport page. Or I just can't find a sample of it on the web. _

          3. The last page for now is blank. Will work on this maybe tomorrow. Depends on the responds I get from the list or here.

          4. I've queried the DB straight from the action. I understand the DB management quite well but had a hard time understanding the ReportingManager. Would it be better to wrap the DB queries from ReportingManager?

          5. This is related to item 4. As I don't understand the ReportingManager fully and I need to get a limited number of rows. I've added a range constraint that would do this. I'm not sure on this implementation. JPOX documentation says that it's only "implemented efficiently" on a couple of DBs. http://www.jpox.org/docs/1_2/jdo/query.html

          6. Anyone who can point me to a good jrxml document would be helpful. I can't seem to have <staticText> working. So I use <textField> instead.

          Feedback will be greatly appreciated.

          Thanks!

          Show
          Teodoro Cue Jr. added a comment - I've attached a preliminary work of how archiva can use JasperReports as its reporting mechanism. It's functional but there are a lot of aesthetics work to be done. Aside from the look, there are a lot of things to discuss: 1. Do we need to put in the links for the pages? Such as, when using Google, there are a number of links that corresponds to the resulting pages. Example: <1><2><3>...<Last Page> 2. Do we put in the functionality that a user can choose the resulting number of rows per page? Currently I've hard coded this to 10 rows per page as I don't have a lot of sample to work on. And it's hard to put this number in between pages. It would be better to have the user choose the number first before starting the report. We can't put an editable text field on the JasperReport page. Or I just can't find a sample of it on the web. _ 3. The last page for now is blank. Will work on this maybe tomorrow. Depends on the responds I get from the list or here. 4. I've queried the DB straight from the action. I understand the DB management quite well but had a hard time understanding the ReportingManager. Would it be better to wrap the DB queries from ReportingManager? 5. This is related to item 4. As I don't understand the ReportingManager fully and I need to get a limited number of rows. I've added a range constraint that would do this. I'm not sure on this implementation. JPOX documentation says that it's only "implemented efficiently" on a couple of DBs. http://www.jpox.org/docs/1_2/jdo/query.html 6. Anyone who can point me to a good jrxml document would be helpful. I can't seem to have <staticText> working. So I use <textField> instead. Feedback will be greatly appreciated. Thanks!
          Hide
          Teodoro Cue Jr. added a comment -

          Opps... I forgot to attach the model patch.

          Show
          Teodoro Cue Jr. added a comment - Opps... I forgot to attach the model patch.
          Hide
          Maria Odea Ching added a comment -

          Good work on the reports Teody!

          I've applied the patch in my local machine to try it out and here are my comments:
          1. For the number links, I think it would be better to have it that way so that it's easier for the user to browse through the report.
          2. I also agree on giving the user the functionality to choose the resulting number of rows per page.
          3. It would be nice if there is a default message that tells the user that there are no errors to be reported when the user clicks 'Reports' in the navigation menu, instead of just a blank page.
          4. Maybe the report should be renamed to something else other than 'All Problematic Artifacts' (hehe.. I felt like these artifacts were depressed)

          I'm not sure about #4 and #5, I think you should ask Joakim about it.
          For #6, you could try generating a jrxml file using iReport and see how the <staticText> works

          Show
          Maria Odea Ching added a comment - Good work on the reports Teody! I've applied the patch in my local machine to try it out and here are my comments: 1. For the number links, I think it would be better to have it that way so that it's easier for the user to browse through the report. 2. I also agree on giving the user the functionality to choose the resulting number of rows per page. 3. It would be nice if there is a default message that tells the user that there are no errors to be reported when the user clicks 'Reports' in the navigation menu, instead of just a blank page. 4. Maybe the report should be renamed to something else other than 'All Problematic Artifacts' (hehe.. I felt like these artifacts were depressed) I'm not sure about #4 and #5, I think you should ask Joakim about it. For #6, you could try generating a jrxml file using iReport and see how the <staticText> works
          Hide
          Teodoro Cue Jr. added a comment - - edited

          Hi,

          Updated patch(20070801) attached.
          Comments and suggestions will be greatly appreciated.

          Thanks!

          Show
          Teodoro Cue Jr. added a comment - - edited Hi, Updated patch(20070801) attached. Comments and suggestions will be greatly appreciated. Thanks!
          Hide
          Brett Porter added a comment -

          it's normally best not to date the patches - that way the new ones just obsolete the old ones and it's easiest to figure out which ones to apply

          Show
          Brett Porter added a comment - it's normally best not to date the patches - that way the new ones just obsolete the old ones and it's easiest to figure out which ones to apply
          Hide
          Brett Porter added a comment -

          and also one patch from the root directory is easier to apply

          Show
          Brett Porter added a comment - and also one patch from the root directory is easier to apply
          Hide
          Brett Porter added a comment -

          looks good!

          comments from the usage side:

          • what's the use case for searching by artifact ID? I can understand the group filter, but not sure about the others
          • can the repository list easily be a dropdown?
          • I'd put them all in one form, so each field is an additional constraint (and the default is just to show everything)
          • I don't think the final report should be skinned - it doesn't really fit
          • I'd drop the last 3 columns from the table
          • how come a separate java app is started when this is generated? (tanuki WrapperSimpleApp) - or is this just me?

          haven't eval'd the code...

          Show
          Brett Porter added a comment - looks good! comments from the usage side: what's the use case for searching by artifact ID? I can understand the group filter, but not sure about the others can the repository list easily be a dropdown? I'd put them all in one form, so each field is an additional constraint (and the default is just to show everything) I don't think the final report should be skinned - it doesn't really fit I'd drop the last 3 columns from the table how come a separate java app is started when this is generated? (tanuki WrapperSimpleApp) - or is this just me? haven't eval'd the code...
          Hide
          Maria Odea Ching added a comment -

          Thanks for the patch Teody.. the reports definitely looks better now

          I agree with Brett's comments, especially the constraints/fields being grouped together in one form. It'll be easier for the user to use.
          Below are some additional comments:

          • Can the version link in the reports be removed? I think it would always display the 'Unable to find...' error message whenever you click it since the project model is never added to the database once it is found to be invalid
          • Could you provide some unit tests for these?
          • And lastly, what about the reports not being accessible to only those users with admin roles? Should that be included here? Or is that a separate issue?

          Btw, I didn't see the tanuki WrapperSimpleApp started when I executed the reports

          Show
          Maria Odea Ching added a comment - Thanks for the patch Teody.. the reports definitely looks better now I agree with Brett's comments, especially the constraints/fields being grouped together in one form. It'll be easier for the user to use. Below are some additional comments: Can the version link in the reports be removed? I think it would always display the 'Unable to find...' error message whenever you click it since the project model is never added to the database once it is found to be invalid Could you provide some unit tests for these? And lastly, what about the reports not being accessible to only those users with admin roles? Should that be included here? Or is that a separate issue? Btw, I didn't see the tanuki WrapperSimpleApp started when I executed the reports
          Hide
          Joakim Erdfelt added a comment -

          Patches look good.

          Great work Teody!

          Patches applied in revision 562233.

          Show
          Joakim Erdfelt added a comment - Patches look good. Great work Teody! Patches applied in revision 562233.
          Hide
          Teodoro Cue Jr. added a comment -

          Hi Guys,

          I've attached the latest patch with changes in my email yesterday on the dev mailing list.
          Patch is now formatted with Brett's comments taken into consideration. Thanks for the info Brett!

          Changes:
          -Taken out Artifact search

          -Taken out Version link
          -Repository list now a drop down

          -Consolidated all the fields into 1 form

          -Dropped the last 3 columns from the table

          -Unit tests for all the constraints

          Lacking:
          -Unit tests for the actions and the model (can someone help me out as to how to test the action? how do we inject the dao from the test environment?)
          -Form validation (especially the rowCount, which needs a positive number)
          -Profile regarding licensing of JasperReports discussed in the dev mailing list

          Comments are always welcome!

          Show
          Teodoro Cue Jr. added a comment - Hi Guys, I've attached the latest patch with changes in my email yesterday on the dev mailing list. Patch is now formatted with Brett's comments taken into consideration. Thanks for the info Brett! Changes: -Taken out Artifact search -Taken out Version link -Repository list now a drop down -Consolidated all the fields into 1 form -Dropped the last 3 columns from the table -Unit tests for all the constraints Lacking: -Unit tests for the actions and the model (can someone help me out as to how to test the action? how do we inject the dao from the test environment?) -Form validation (especially the rowCount, which needs a positive number) -Profile regarding licensing of JasperReports discussed in the dev mailing list Comments are always welcome!
          Hide
          Brett Porter added a comment -

          couple of tweaks I'd make:

          • if you enter org.apache, look for org.apache*
          • add "(All Repositories)" as the text on the default repository id.
          Show
          Brett Porter added a comment - couple of tweaks I'd make: if you enter org.apache, look for org.apache* add "(All Repositories)" as the text on the default repository id.
          Hide
          Brett Porter added a comment -

          applied, thanks!

          Show
          Brett Porter added a comment - applied, thanks!

            People

            • Assignee:
              Teodoro Cue Jr.
              Reporter:
              Nap Ramirez
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development