On Mar 10, 2007, at 10:58 AM, Francis Labrie wrote:
> Hi Chuck,
>
> Chuck Hill wrote:
>> The launcher config has its own classpath. Check there, that is
>> likely where the problem lies.
>
>
> That's where I strongly suspect a problem, but the configuration
> seems normal (i.e. selecting the "Restore Default Entries" button
> in "Classpath" tab). See below:
>
> <pastedGraphic.gif>
Try deleting the WO Frameworks entry and add and configure a new one
(under Advanced).
> If I add the "WebObjects Frameworks" library in the "Bootstrap
> Entries" above the JRE, I get this exception at launch instead:
>
> Exception in thread "main" java.lang.NoClassDefFoundError
> at com.webobjects.foundation._NSUtilities.<clinit>
> (_NSUtilities.java:154)
> at com.webobjects.appserver.WOApplication.<clinit>
> (WOApplication.java:165)
No, that will definitely give you class loader errors.
> No classpath change seems to fix my problem... :-( Is there
> anything else I can do?
Check for stray jars in /Library/Java/Extensions.
Log out the classpath from main():
output.append("Classpath\n");
String pathSeparator = systemProperties.getProperty
("path.separator");
NSArray classPathComponents =
NSArray.componentsSeparatedByString(systemProperties.getProperty
("java.class.path"),
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");
}
}
Chuck
>>
>> On Mar 9, 2007, at 8:14 PM, Francis Labrie wrote:
>>
>>> Hi,
>>>
>>>
>>> I was able to build and run a WebObjects application from Eclipse
>>> up to recently. I've added some resources (EOModel, etc.) and now
>>> I can still build, but I just can't run or debug this application
>>> in Eclipse anymore, I always get a NoClassDefFoundError:
>>>
>>> Exception in thread "main" java.lang.NoClassDefFoundError: com/
>>> webobjects/foundation/NSCoding
>>> at java.lang.ClassLoader.findBootstrapClass(Native Method)
>>> [...]
>>>
>>> It seems Eclipse / WOLips just can't find
>>> JavaFoundation.framework. I've checked my "build.properties", my
>>> "build.xml" and my "woproject" files, and all seems ok. I've
>>> deleted both "build" and "dist" directory, and rebuilt the
>>> application, without success.
>>>
>>> Strangely, I can run my application int the "dist" directory from
>>> the command line without error.
>>>
>>> Does someone have an idea about the way to fix this problem? Thanks.
>
> --
> Francis Labrie
> Saint-Bruno-de-Montarville, Québec, Canada
>
--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 : Sat Mar 10 2007 - 19:56:56 EST