• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ClassCastException trying to show WOStats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ClassCastException trying to show WOStats


  • Subject: ClassCastException trying to show WOStats
  • From: Paul Hoadley <email@hidden>
  • Date: Wed, 10 Dec 2008 19:03:10 +1030

Hello,

I'm using WO 5.4.3, and some Wonder frameworks, though this particular app does not extend ERXApplication.  The following happens in development (OS X) and deployment (CentOS, JavaMonitor).

I've got -WOStatisticsPassword set.  When I hit wa/WOStats, I get this:

Application.handleException: Handling an Exception:
java.lang.ClassCastException: java.util.HashMap
at com.webobjects.woextensions.WOStatsPage._initIvars(WOStatsPage.java:81)
at com.webobjects.woextensions.WOStatsPage.appendToResponse(WOStatsPage.java:94)
at com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574)
at com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543)
at com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538)
at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:278)
at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:613)

The offending lines up to and including 81 in WOStatsPage._initIvars() are:

        statsDict = WOApplication.application().statistics();
        pagesDict = (NSDictionary)statsDict.objectForKey("Pages");
        directActionsDict = (NSDictionary)statsDict.objectForKey("DirectActions");
        detailsDict = (NSDictionary)statsDict.objectForKey("Details");
        transactions = (NSDictionary)statsDict.objectForKey("Transactions");
        memoryDict = (NSDictionary)statsDict.objectForKey("Memory");
        sessionsDict = ((NSDictionary)statsDict.objectForKey("Sessions")).mutableClone();
        sessionMemoryDict = (NSDictionary)sessionsDict.removeObjectForKey("Avg. Memory Per Session");

So it's just trying to pull stuff out of WOApplication.statistics().  Why are we getting the class mismatch here, and, more importantly, does anyone know how to fix/work around it?

Google shows a few references to this problem, but, as far as I could find, no solution.


-- 
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ClassCastException trying to show WOStats
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: How to use WODisplayGroup
  • Next by Date: Re: PDF generator/converter
  • Previous by thread: Wonder: Attempting to lock editing context that was previously locked error
  • Next by thread: Re: ClassCastException trying to show WOStats
  • Index(es):
    • Date
    • Thread