Re: Converting woa to eclipse, have the strangest of errors...

From: Chuck Hill (chil..lobal-village.net)
Date: Wed Jul 18 2007 - 21:09:08 EDT

  • Next message: Lachlan Deck: "Refactoring question"

    On Jul 18, 2007, at 5:02 PM, Joshua Archer wrote:

    > Here's the output -- is it picking up the bundle when it's finding
    > one of my external jars, and then trying to create the bundle again
    > later?

    I don't know. I can't see why it thinks it is already loaded. Have
    you changed the classpath in the launch config at all? What is the
    working directory set to?

    Chuck

    >
    > /Users/jarcher/Development/APOLLOCoreServices/build/
    > APOLLOCoreServices.framework/Resources/Java
    > *** --> Does not Exist!
    > /Users/jarcher/Development/APOLLODataServices/build/
    > APOLLODataServices.framework/Resources/Java
    > *** --> Does not Exist!
    > /Users/jarcher/Development/APOLLOAppServices/build/
    > APOLLOAppServices.framework/Resources/Java
    > *** --> Does not Exist!
    > /Users/jarcher/Development/pachyderm/branches/2.1.x/Plugins/
    > AssetDBSupport/build/AssetDBSupport.framework/Resources/Java
    > *** --> Does not Exist!
    > /Users/jarcher/Development/SimpleAuthenticationSupport/build/
    > SimpleAuthenticationSupport.framework/Resources/Java
    > *** --> Does not Exist!
    > /Users/jarcher/Development/pachyderm/branches/2.1.x/Frameworks/
    > PXFoundation/build/PXFoundation.framework/Resources/Java
    > *** --> Does not Exist!
    > /Users/jarcher/Development/pachyderm/branches/2.1.x/vendor/jdom.jar
    > --> Exists
    > /Users/jarcher/Development/pachyderm/branches/2.1.x/vendor/
    > ostermillerutils_1_05_00_for_java_1_4.jar
    > --> Exists
    > /Library/Frameworks/PXFoundation.framework/Resources/Java/jdom.nmc.jar
    > --> Exists
    > /Users/jarcher/Development/pachyderm/branches/OKIOSID/vendor/
    > jdom.nmc.jar
    > --> Exists
    > /Users/jarcher/Development/pachyderm/branches/2.1.x/vendor/
    > dom4j-1.6.1.jar
    > --> Exists
    > /Users/jarcher/Development/pachyderm/branches/2.1.x/vendor/
    > jswiff-1.0rc1+.jar
    > --> Exists
    > /Users/jarcher/Development/pachyderm/branches/2.1.x/vendor/commons-
    > lang-2.1.jar
    > --> Exists
    > /System/Library/Frameworks/JavaWOExtensions.framework/Resources/
    > Java/JavaWOExtensions.jar
    > --> Exists
    > /System/Library/Frameworks/JavaEOAccess.framework/Resources/Java/
    > javaeoaccess.jar
    > --> Exists
    > /System/Library/Frameworks/JavaEOControl.framework/Resources/Java/
    > javaeocontrol.jar
    > --> Exists
    > /System/Library/Frameworks/JavaFoundation.framework/Resources/Java/
    > javafoundation.jar
    > --> Exists
    > /System/Library/Frameworks/JavaJDBCAdaptor.framework/Resources/Java/
    > javajdbcadaptor.jar
    > --> Exists
    > /System/Library/Frameworks/JavaWebObjects.framework/Resources/Java/
    > javawebobjects.jar
    > --> Exists
    > /System/Library/Frameworks/JavaXML.framework/Resources/Java/
    > javaxml.jar
    > --> Exists
    > /System/Library/Frameworks/JavaDirectToWeb.framework/Resources/Java/
    > javadirecttoweb.jar
    > --> Exists
    > /System/Library/Frameworks/JavaDTWGeneration.framework/Resources/
    > Java/javadtwgeneration.jar
    > --> Exists
    > /System/Library/Frameworks/JavaEOProject.framework/Resources/Java/
    > javaeoproject.jar
    > --> Exists
    > /Users/jarcher/Development/Pachyderm2/build/Pachyderm2.woa/Contents/
    > Resources/Java
    > *** --> Does not Exist!
    > /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
    > Classes/.compatibility/14compatibility.jar
    > --> Exists
    >
    > [2007-07-18 16:58:40 PDT] <main> A fatal exception occurred: null
    > [2007-07-18 16:58:40 PDT] <main> java.lang.ExceptionInInitializerError
    > at
    > com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys
    > (WOProperties.java:187)
    > at com.webobjects.appserver.WOApplication._initWOApp
    > (WOApplication.java:5081)
    > at com.webobjects.appserver.WOApplication.<init>
    > (WOApplication.java:551)
    > at org.nmc.pachyderm.authoring.Application.<init>(Application.java:
    > 107)
    > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    > Method)
    > at sun.reflect.NativeConstructorAccessorImpl.newInstance
    > (NativeConstructorAccessorImpl.java:39)
    > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
    > (DelegatingConstructorAccessorImpl.java:27)
    > at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    > at java.lang.Class.newInstance0(Class.java:350)
    > at java.lang.Class.newInstance(Class.java:303)
    > at com.webobjects.appserver.WOApplication.main(WOApplication.java:
    > 323)
    > at org.nmc.pachyderm.authoring.Application.main(Application.java:91)
    > Caused by: java.lang.IllegalStateException:
    > <com.webobjects.foundation.NSBundle> warning: There is already a
    > unique instance for Bundle named 'PXFoundation'. Use
    > NSBundle.bundleForName(PXFoundation) to access it:
    > <com.webobjects.foundation.NSBundle name:'PXFoundation'
    > bundlePath:'/Users/jarcher/Development/pachyderm/branches/2.1.x/
    > Frameworks/PXFoundation/build/PXFoundation.framework'
    > packages:'("org.nmc.pachyderm.foundation",
    > "org.nmc.pachyderm.document.file", "com.webobjects.foundation",
    > "org.nmc.pachyderm.foundation.metadata")' 102 classes >
    > at com.webobjects.foundation.NSBundle.CreateBundleWithPath
    > (NSBundle.java:825)
    > at
    > com.webobjects.foundation.NSBundle._bundleWithPathShouldCreateIsJar
    > (NSBundle.java:487)
    > at com.webobjects.foundation.NSBundle.LoadBundlesFromClassPath
    > (NSBundle.java:742)
    > at com.webobjects.foundation.NSBundle.<clinit>(NSBundle.java:365)
    > ... 12 more
    >
    >
    > On Jul 18, 2007, at 4:48 PM, Chuck Hill wrote:
    >
    >> Sorry, that should be
    >>
    >>>
    >>> NSArray classPathComponents =
    >>> NSArray.componentsSeparatedByString(classpath, pathSeparator);
    >>
    >>
    >> Chuck
    >>
    >>
    >> On Jul 18, 2007, at 4:37 PM, Joshua Archer wrote:
    >>
    >>> what's the value of propertyName in line 6?
    >>>
    >>> On Jul 18, 2007, at 3:30 PM, Chuck Hill wrote:
    >>>
    >>>>
    >>>> On Jul 18, 2007, at 3:03 PM, Joshua Archer wrote:
    >>>>
    >>>>>
    >>>>> On Jul 18, 2007, at 2:03 PM, Chuck Hill wrote:
    >>>>>
    >>>>>
    >>>>>>
    >>>>>> Delayed Caffeine Reaction kicks in.
    >>>>>>
    >>>>>> blah blah blah /build/ blah blah blah
    >>>>>>
    >>>>>> /build/ ==> Xcode cruft. It is finding the Xcode built
    >>>>>> version of the framework and loading it too.
    >>>>>>
    >>>>>> rm -r /Users/jarcher/Development/pachyderm/branches/2.1.x/
    >>>>>> Frameworks/PXFoundation/build
    >>>>>>
    >>>>>> And try again.
    >>>>>>
    >>>>>> Chuck
    >>>>>
    >>>>> It appears this directory is getting built by the framework
    >>>>> each time in Eclipse. I deleted it, reinstalled the framework,
    >>>>> and the errors came back, as did the build dir.
    >>>>
    >>>> Hmm, that is probably something from the incremental builder.
    >>>>
    >>>> Try adding this to your main:
    >>>>
    >>>> StringBuffer output = new StringBuffer();
    >>>>
    >>>> Properties systemProperties = System.getProperties();
    >>>> String classpath= systemProperties.getProperty
    >>>> ("java.class.pathr");
    >>>> String pathSeparator = systemProperties.getProperty
    >>>> ("path.separator");
    >>>>
    >>>> NSArray classPathComponents =
    >>>> NSArray.componentsSeparatedByString(systemProperties.getProperty
    >>>> (propertyName),
    >>>>
    >>>> pathSeparator);
    >>>> Enumeration classpathEnumeration =
    >>>> classPathComponents.objectEnumerator();
    >>>> while (classpathEnumeration.hasMoreElements())
    >>>> {
    >>>> String jarPath = (String)
    >>>> classpathEnumeration.nextElement();
    >>>> output.append(jarPath + "\n");
    >>>> try
    >>>> {
    >>>> File jarFile = new File(jarPath);
    >>>> output.append((jarFile.isFile() ? " --
    >>>> > Exists\n" : "*** --> Does not Exist!\n"));
    >>>> }
    >>>> catch (Throwable t)
    >>>> {
    >>>> output.append("Exception validating
    >>>> classpath: " + t + "\n");
    >>>> }
    >>>> }
    >>>> }
    >>>>
    >>>> System.out.println(output).
    >>>>
    >>>>
    >>>> Chuck
    >>>>
    >>>>
    >>>> --
    >>>>
    >>>> Practical WebObjects - for developers who want to increase their
    >>>> overall knowledge of WebObjects or who are trying to solve
    >>>> specific problems.
    >>>> http://www.global-village.net/products/practical_webobjects
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>
    >>> --------------------------------------------------------------------
    >>> ---------
    >>> Joshua Archer
    >>> Software Engineer, CSU - Center for Distributed Learning
    >>> Phone: 707.664.2085, Fax: 707.664.4350
    >>> --------------------------------------------------------------------
    >>> ---------
    >>>
    >>>
    >>>
    >>>
    >>
    >> --
    >>
    >> Practical WebObjects - for developers who want to increase their
    >> overall knowledge of WebObjects or who are trying to solve
    >> specific problems.
    >> http://www.global-village.net/products/practical_webobjects
    >>
    >>
    >>
    >>
    >>
    >>
    >
    > ----------------------------------------------------------------------
    > -------
    > Joshua Archer
    > Software Engineer, CSU - Center for Distributed Learning
    > Phone: 707.664.2085, Fax: 707.664.4350
    > ----------------------------------------------------------------------
    > -------
    >
    >
    >
    >

    -- 
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Wed Jul 18 2007 - 21:10:13 EDT