• 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
Re-factoring Main component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re-factoring Main component


  • Subject: Re-factoring Main component
  • From: "Andrew R. Kinnie" <email@hidden>
  • Date: Mon, 8 Sep 2008 08:28:16 -0400

OK, I have been having major problems trying to get refactoring to work with WOLips/Eclipse (I have tried it with Wonder and with vanilla WO).  I can create a WO and/or a Wonder app from the template and it will work.  I previously was able to do this with an earlier incarnation, but now it just doesn't seem to want to let me re-factor the main component.

Now, I create a new app, do nothing other than refactor the name of the packages to be my app's name (this works in isolation), refactor the name of the Main component (and class) to become "PageWrapper" and run it as a WO Application and it doesn't work .  I have deleted my entire install as well as my workspace and reinstalled (twice), it does exactly the same thing.  

I am running WO 5.4 (as of 7/11/08), WOLips nightly and Eclipse 3.4 (both installed this morning and updated).  To refactor, I right-clicked the component, selected refactor... -> rename WO Component... and typed in the new name.  The component is renamed, as is the class.  I need to change the DirectAction class's method to load the new component class in the default action:

public WOActionResults defaultAction() {
return pageWithName(PageWrapper.class.getName());
}

I have also tried to then create another component and call it Main.  The app works, but loads the second component.  Below is the exception I get with a wonder app.  (the WO exception is similar)

I presume I am missing something here.  It is not that big of a deal as I could obviously just use the name "Main" instead of PageWrapper but I would just like to know what is happening and why.  Any insight would be appreciated.

Andrew

Application:MyApp
Error:java.lang.IllegalArgumentException: Class 'Main' exists but is not a subclass of WOComponent.
Reason:<com.webobjects.appserver._private.WOComponentDefinition> Class 'Main' exists but is not a subclass of WOComponent.
Stack trace:
FileLine#MethodPackage

WOComponentDefinition.java496_componentClasscom.webobjects.appserver._private
WOComponentDefinition.java504componentClasscom.webobjects.appserver._private
WOComponentDefinition.java510_componentInstanceInContextcom.webobjects.appserver._private
WOComponentDefinition.java642componentInstanceInContextcom.webobjects.appserver._private
WOApplication.java2332pageWithNamecom.webobjects.appserver
WOComponentRequestHandler.java284_dispatchWithPreparedSessioncom.webobjects.appserver._private
WOComponentRequestHandler.java332_dispatchWithPreparedApplicationcom.webobjects.appserver._private
WOComponentRequestHandler.java369_handleRequestcom.webobjects.appserver._private
WOComponentRequestHandler.java442handleRequestcom.webobjects.appserver._private
WOApplication.java1687dispatchRequestcom.webobjects.appserver
ERXApplication.java1588dispatchRequestImmediatelyer.extensions.appserver
ERXApplication.java1552dispatchRequester.extensions.appserver
WOWorkerThread.java144runOncecom.webobjects.appserver._private
WOWorkerThread.java226runcom.webobjects.appserver._private
Thread.java613runjava.lang

NA : Non applicable, JIT activated


 _______________________________________________
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: Re-factoring Main component
      • From: David Avendasora <email@hidden>
  • Prev by Date: Re: war deployment
  • Next by Date: Re: Re-factoring Main component
  • Previous by thread: Re: war deployment
  • Next by thread: Re: Re-factoring Main component
  • Index(es):
    • Date
    • Thread