• 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: Class Main exists but is not a subcomponent of WOComponent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class Main exists but is not a subcomponent of WOComponent


  • Subject: Re: Class Main exists but is not a subcomponent of WOComponent
  • From: Steve Peery <email@hidden>
  • Date: Thu, 19 May 2016 11:31:23 -0400

Could be. I have also seen this error when Eclipse gets confused and then all that will fix it is a bunch of restarts, refreshes, and rebuilds.  Did you try creating a new Wonder Application and running it to see what happens?


Steve




On May 19, 2016, at 10:51 AM, Ress, David A <email@hidden> wrote:

Thanks for the suggestion Steve. I implemented the override but now I am getting:

 

Class 'NewMain' exists but is not a subcomponent of WOComponent

Must be something with the application not seeing the external framework.  
 
David
 
 
From: Steve Peery email@hidden
Subject: Re: Class Main exists but is not a subcomponent of WOComponent
 
I have had numerous projects where there is a name conflict with the Main component. If this is what your problem is, an easy fix is to just change the name of your main component.  
Here is a my override in Application to change the name of my main component from Main to VCAT2Main:
 
public WOComponent pageWithName(String aName, WOContext aContext) {
// there is a conflict with the object name Main. 
// It is caused by the batik.jar file (and maybe others) in the Libraries directory 
// convert null or Main to VCAT2Main
if (aName == null) {
aName = VCAT2Main.class.getSimpleName();
} 
else if (aName.equals("Main")) {
aName = VCAT2Main.class.getSimpleName();
}
return super.pageWithName(aName, aContext);
}

There may be a better solution, but this has worked for me.

Steve




 _______________________________________________
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: Class Main exists but is not a subcomponent of WOComponent
      • From: "Ress, David A" <email@hidden>
References: 
 >Class Main exists but is not a subcomponent of WOComponent (From: "Ress, David A" <email@hidden>)
 >Re: Class Main exists but is not a subcomponent of WOComponent (From: Steve Peery <email@hidden>)
 >Re: Class Main exists but is not a subcomponent of WOComponent (From: "Ress, David A" <email@hidden>)

  • Prev by Date: Re: Class Main exists but is not a subcomponent of WOComponent
  • Next by Date: Re: Class Main exists but is not a subcomponent of WOComponent
  • Previous by thread: Re: Class Main exists but is not a subcomponent of WOComponent
  • Next by thread: Re: Class Main exists but is not a subcomponent of WOComponent
  • Index(es):
    • Date
    • Thread