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



> On May 19, 2016, at 8:21 AM, Ress, David A <[email protected]> wrote:
> 
> All,
> 
> I followed Sunil's advice for a new Mac OS X 10.11.4 development installation 
> (Thank you Sunil!) and went with Java 1.8, the latest binary Wonder, Eclipse 
> Mars 4.5.2 and WOLips 4.4.  I setup the directory environment by following 
> the steps documented in Markus Ruggiero's Learning the Wonders (I like this 
> directory structure much better than the older style with /Library and 
> /System/Library).
> 
> But, I am hitting a runtime error now, as the subject line says. I researched 
> this and found potential solution and tried:
> 
> Class mainClass = _NSUtilities.classWithName(Main.class, "Main");
> NSLog.out.appendln("Main class is: " + mainClass.getClass() );
> --> outputs:  "Main class is: com.gdit.elmpv.Main"  which is correct
> 
> I also tried the "patching" suggestion with ERXPatcher.setClassForName(), but 
> that does not appear to be helping either.
> 
> From a verbal perspective, the error in the subject line is sort-of correct, 
> as Main is defined as:
> 
> public class Main extends CSSComponent (located in main project)
> where 
> public class CSSComponent extends WOComponent (located in an external 
> framework)
> 
> Thus, I feel I am having path issues but I am not seeing any problems as the 
> external framework is installed in 
> /Development/Libraries/WOnder/Library/Frameworks/
> 
> I am also seeing a strange message in the console making me think the paths 
> are wrong:
> 
> <main> Couldn't load properties file: /Users/daress/WebObjects.properties at 
> path /Users/daress/
> 
> which puzzles me as I have wolips.properties at:
> /Users/daress/Library/Application Support/WOLips/wolips.properties
> 
> Suggestions anyone as to what I have done wrong?  I know I am tired from 
> working two jobs, but this getting down right embarrassing...
> 
> David
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/speery%40me.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to