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: | File | Line# | Method | Package |
| WOComponentDefinition.java | 496 | _componentClass | com.webobjects.appserver._private | WOComponentDefinition.java | 504 | componentClass | com.webobjects.appserver._private | WOComponentDefinition.java | 510 | _componentInstanceInContext | com.webobjects.appserver._private | WOComponentDefinition.java | 642 | componentInstanceInContext | com.webobjects.appserver._private | WOApplication.java | 2332 | pageWithName | com.webobjects.appserver | WOComponentRequestHandler.java | 284 | _dispatchWithPreparedSession | com.webobjects.appserver._private | WOComponentRequestHandler.java | 332 | _dispatchWithPreparedApplication | com.webobjects.appserver._private | WOComponentRequestHandler.java | 369 | _handleRequest | com.webobjects.appserver._private | WOComponentRequestHandler.java | 442 | handleRequest | com.webobjects.appserver._private | WOApplication.java | 1687 | dispatchRequest | com.webobjects.appserver | ERXApplication.java | 1588 | dispatchRequestImmediately | er.extensions.appserver | ERXApplication.java | 1552 | dispatchRequest | er.extensions.appserver | WOWorkerThread.java | 144 | runOnce | com.webobjects.appserver._private | WOWorkerThread.java | 226 | run | com.webobjects.appserver._private | Thread.java | 613 | run | java.lang |
| NA : Non applicable, JIT activated |
|
|