Hey Farrukh,

On Jan 25, 2011, at 1:31 AM, Farrukh Ijaz wrote:

> What about the generated entity classes? Did you move them to the new 
> framework as part of refactoring or they are part of the application?

Yeah, all the EO classes were moved to the framework along with the model.

> Just trying to guess what could be the reason as we have many frameworks 
> which contain models and we have re-factored some of them and found no 
> problem at all.

Exactly. This is the way I've always done things, yet for this app, it is broke.

Grrr...

Dave



> 
> Farrukh
> 
> On 2011-01-25, at 9:20 AM, David Avendasora wrote:
> 
>> Hi Farrukh,
>> 
>> I did not have it checked, and checking it made no difference. As far as I 
>> know, the only things you really need to mark for export are .jar libraries 
>> that you want to make sure are included in the build. I don't think that 
>> makes any difference when you are running in Eclipse. But maybe I'm wrong...
>> 
>> Dave
>> 
>> 
>> On Jan 25, 2011, at 1:08 AM, Farrukh Ijaz wrote:
>> 
>>> Hi Dave,
>>> 
>>> Is your framework is checked under Order and Export tab of the Java Build 
>>> Path? May be that would be the reason for this NoClassDefFoundError.
>>> 
>>> <Screen shot 2011-01-25 at 9.06.37 AM.png>
>>> 
>>> Farrukh
>>> 
>>> On 2011-01-25, at 9:00 AM, David Avendasora wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> I've been refactoring/modernizing a rather large app that has had the 
>>>> model as part of the application. I've split out the Model, the model 
>>>> classes and a bunch of supporting classes that are required by the model 
>>>> classes into a new Wonder Framework project.
>>>> 
>>>> I've gotten everything to compile correctly in both the new framework 
>>>> project and the original application in eclipse, but when I the 
>>>> application it in eclipse, the app fails stating that it can't initialize 
>>>> the model files. (see stack trace below)
>>>> 
>>>> I know that this is almost certainly a classpath issue, but the Framework 
>>>> is added to the build path just as the Wonder and WebObjects frameworks 
>>>> are. The framework only exists as source code in the Eclipse workspace, 
>>>> and I have tried it with bundles enabled, and disabled and I get the exact 
>>>> same results.
>>>> 
>>>> Why would an app not be able to find classes at runtime, when it can find 
>>>> them in the source code? It's got to be something incredibly simple that 
>>>> I'm just overlooking.
>>>> 
>>>> Dave
>>>> 
>>>> 
>>>> com.webobjects.foundation.NSForwardException 
>>>> [java.lang.NoClassDefFoundError] Could not initialize class 
>>>> com.mycompany.ac.model.GlobalLU:java.lang.NoClassDefFoundError: Could not 
>>>> initialize class com.mycompany.ac.model.GlobalLU
>>>>    at 
>>>> com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:43)
>>>>    at 
>>>> com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1140)
>>>>    at 
>>>> com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324)
>>>>    at 
>>>> com.webobjects.appserver.WOApplication.valueForKey(WOApplication.java:5575)
>>>>    at 
>>>> com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447)
>>>>    at 
>>>> com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:216)
>>>>    at 
>>>> com.webobjects.appserver.WOApplication.valueForKeyPath(WOApplication.java:5645)
>>>>    at 
>>>> com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueForKeyPath(NSKeyValueCodingAdditions.java:149)
>>>>    at 
>>>> com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:217)
>>>>    at 
>>>> com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804)
>>>>    at 
>>>> com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
>>>>    at 
>>>> er.extensions.components._private.ERXWOString.appendToResponse(ERXWOString.java:70)
>>>>    at 
>>>> com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
>>>>    at 
>>>> com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136)
>>>>    at 
>>>> com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122)
>>>>    at 
>>>> com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574)
>>>>    at 
>>>> com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543)
>>>>    at 
>>>> com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538)
>>>>    at 
>>>> com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:278)
>>>>    at 
>>>> com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158)
>>>>    at 
>>>> er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:124)
>>>>    at 
>>>> com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
>>>>    at 
>>>> er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984)
>>>>    at 
>>>> er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1949)
>>>>    at com.mycompany.ac.Application.dispatchRequest(Application.java:178)
>>>>    at 
>>>> com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
>>>>    at 
>>>> com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
>>>>    at java.lang.Thread.run(Thread.java:680)
>>>> Caused by: java.lang.NoClassDefFoundError: Could not initialize class 
>>>> com.mycompany.ac.model.GlobalLU
>>>>    at com.mycompany.ac.Application.currentProgram(Application.java:90)
>>>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>    at 
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>    at 
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>    at java.lang.reflect.Method.invoke(Method.java:597)
>>>>    at 
>>>> com.mycompany.ac.KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAccessor.java:35)
>>>>    at 
>>>> com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
>>>>    ... 26 more
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list      ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to