Re: ERXModelGroup(EOModelGroup).fetchSpecificationNamed(String, String)
Anders Peterson <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc,gmane.comp.web.webobjects.devel |
|---|---|
| Organization | Optimatika |
| Message-ID | <[email protected]> |
In ERXModelGroup there is a method:
/**
* Overridden to use our model class in the runtime.
*/
public EOModel addModelWithPathURL(URL url) {
EOModel model = null;
if(patchModelsOnLoad) {
model = new Model(url);
} else {
model = new EOModel(url);
}
addModel(model);
return model;
}
The second time "new EOModel(url)" is called, with the URL to the
QsdCoreData eomodel, it fails. I can't see what's going on inside that
constructor...
(Kind of assume that means it is not a WONDER problem.)
Did a CVS diff on QsdCoreData compared to one month ago and three months
ago. Nothing has changed.
The full stack trace I get is:
5828 [main] WARN NSLog - A fatal exception occurred: null
[2006-10-25 18:28:46 CEST] <main>
com.webobjects.foundation.NSForwardException for
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
com.webobjects.foundation._NSUtilities._classWithPartialName(_NSUtilities.java:307)
at
com.webobjects.foundation._NSUtilities.classWithName(_NSUtilities.java:291)
at
com.webobjects.eoaccess.EOModel._setEntityForEntityNameClassName(EOModel.java:1242)
at
com.webobjects.eoaccess.EOModel._addFakeEntityWithPropertyList(EOModel.java:1280)
at
com.webobjects.eoaccess.EOModel._initWithTableOfContentsPropertyListPathURL(EOModel.java:1092)
at com.webobjects.eoaccess.EOModel.<init>(EOModel.java:802)
at er.extensions.ERXModelGroup.addModelWithPathURL(ERXModelGroup.java:305)
at
er.extensions.ERXModelGroup.loadModelsFromLoadedBundles(ERXModelGroup.java:108)
at er.extensions.ERXExtensions.defaultModelGroup(ERXExtensions.java:82)
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:585)
at
com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:120)
at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:225)
at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:158)
at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:365)
at
com.webobjects.eoaccess.EOModelGroup.modelGroupForObjectStoreCoordinator(EOModelGroup.java:887)
at com.webobjects.eoaccess.EOUtilities.modelGroup(EOUtilities.java:1007)
at
com.webobjects.eoaccess.EOUtilities.objectsWithFetchSpecificationAndBindings(EOUtilities.java:112)
at
se.optimatika.quesada.eo.QCDRemoteServer.fetchInstance(QCDRemoteServer.java:319)
at
se.optimatika.quesada.com.SuperCommunicator.<init>(SuperCommunicator.java:27)
at
se.optimatika.quesada.com.SuperCommunicator.<init>(SuperCommunicator.java:23)
at
se.optimatika.quesada.com.SystemCommunicator.<init>(SystemCommunicator.java:37)
at Application.<init>(Application.java:43)
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 er.extensions.ERXApplication.main(ERXApplication.java:98)
at Application.main(Application.java:24)
Caused by: java.lang.NullPointerException
at
com.webobjects.eoaccess.EOModelGroup.fetchSpecificationNamed(EOModelGroup.java:597)
at
com.webobjects.eoaccess.EOUtilities.objectsWithFetchSpecificationAndBindings(EOUtilities.java:113)
at
se.optimatika.quesada.eo.QCDRemoteServer.fetchInstance(QCDRemoteServer.java:319)
at
se.optimatika.quesada.com.SuperCommunicator.<init>(SuperCommunicator.java:27)
at
se.optimatika.quesada.com.SuperCommunicator.<init>(SuperCommunicator.java:23)
at
se.optimatika.quesada.com.SystemCommunicator.<init>(SystemCommunicator.java:37)
at se.optimatika.quesada.eo.QCDProfile.<clinit>(QCDProfile.java:678)
... 36 more
Anders Peterson wrote:
> Hi,
>
> I get a NullPointerException at
> ERXModelGroup(EOModelGroup).fetchSpecificationNamed(String, String)
> line: 597
>
> this => <EOModelGroup (("QsdBase",
> "file:/Users/apete/Developer/eclipse3_ws/QsdOptApp/build/QsdOptApp.woa/Contents/Resources/QsdBase.eomodeld"))>
>
> fetchSpecName => FetchAll
>
> entityName => QRemoteServer
>
> The problem seems to be that I have two eomodels; one called QsdBase and
> one called QsdCoreData. QsdBase contains a prototype entity only. The
> QRemoteServer entity is in the QsdCoreData eomodel. The QsdCoreData
> eomodel is missing from the EOModelGroup.
>
> A couple of weeks ago this application/project worked just fine. I
> continuously update to the latest version of ERExtensions and WOLips,
> and nothing else has changed for several months with this project.
>
> WOLips building seems to work as expected. Both the eomodels are in the
> 'build' directory.
>
> /Anders
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
http://ojalgo.org/
Mathematics, Linear Algebra and Optimisation with Java
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642