Re: com.webobjects.eoaccess.EOGeneralAdaptorException: Object value '10348' for column 7 is not an instanceof String
Lenny Marks <[email protected]> Tue, 25 Mar 2003 23:37:01 -0500 (EST)
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <Pine.GSO.4.44.0303252327510.26573-100000@kirk> |
In my eomodel, OutManCorr inherits the manuscriptId from ManCorr and the
'manuscript' relationship is flattened from the parent ManCorr.
{
definition = "mancorr.manuscript";
internalInfo = {"_nameInObjectStore" = "mancorr_manuscript"; };
joinSemantic = EOInnerJoin;
name = manuscript;
}
The snippet below is also from OutManCorr.plist
-lenny
On Tue, 25 Mar 2003, Chuck Hill wrote:
> How is the 'manuscript' relationship from OutManCorr to the Manuscript entity
> defined?
>
>
>
> Lenny Marks wrote:
>
> > com.webobjects.eoaccess.EOGeneralAdaptorException: Object value '10348'
> > for column 7 is not an instanceof String
> >
> > Ignoring the fact that my time is not set, does anyone know what could be
> > the cause of this error.(full stack trace below) It occurs when I run the
> > following code. The value '10348' is the manuscriptId.
> >
> > I have an entity OutManCorr(OutCorrespondence) which is a subclass of
> > ManCorr(Manuscript Correspondence). Single table mapping is used.
> > ManCorr has a non class property manuscriptId which is
> > used in the 'manuscript' relationship to the Manuscript entity.
> > {
> > columnName = "MANUSCRIPT_ID";
> > externalType = NUMBER;
> > name = manuscriptId;
> > valueClassName = NSNumber;
> > valueType = i;
> > },
> >
> > We are using EOGenerator to generate a subclass that presents the public
> > interface and houses all business logic. (hence the
> > setMethod(ManCorr.Method.Email) method). I have already checked to make
> > sure that all the external types in my eomodel match the database schema.
> > All the value types and value classes are set correctly.
> >
> > WebObjects 5.2 with Oracle 8i
> >
> > Thanks,
> > Lenny Marks
> >
> > public TestSendCorr(WOContext context)
> > {
> > super(context);
> > EOEditingContext ec = session().defaultEditingContext();
> >
> > Manuscript manuscript = (Manuscript)
> > EOUtilities.objectMatchingKeyAndValue
> > (ec, "Manuscript", "accode", "LX8437");
> >
> > CorrCode corrCode = (CorrCode)
> > EOUtilities.objectMatchingKeyAndValue
> > (ec, "CorrCode", "code", "OK");
> >
> > OutManCorr outCorr = (OutManCorr)
> > EOUtilities.createAndInsertInstance(ec, "OutManCorr");
> >
> > //relationships
> > outCorr.setManuscript(manuscript);
> > outCorr.setCorrcode(corrCode);
> >
> > outCorr.setMethod(ManCorr.Method.EMAIL);
> > outCorr.setSentBy(((Session)session()).user());
> > outCorr.setSubject("test");
> >
> > ec.saveChanges();
> >
> > }
> >
> > #################################
> >
> >
> > [1970-01-14 01:21:16 EST] <WorkerThread0>
> > <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception
> > occurred while handling request:
> > com.webobjects.foundation.NSForwardException
> > [com.webobjects.eoaccess.EOGeneralAdaptorException] null
> > [1970-01-14 01:21:16 EST] <WorkerThread0>
> > com.webobjects.foundation.NSForwardException for
> > com.webobjects.eoaccess.EOGeneralAdaptorException: Object value '10348'
> > for column 7 is not an instanceof String.
> > at
> > com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContextInformationAdded(EODatabaseContext.java:4656)
> > at
> > com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseContext.java:6319)
> > at
> > com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:411)
> > at
> > com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3130)
> > at TestSendCorr.<init>(TestSendCorr.java:40)
> > at java.lang.reflect.Constructor.newInstance(Native Method)
> > at
> > com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:529)
> > at
> > com.webobjects.appserver._private.WOComponentDefinition._componentInstanceInContext(WOComponentDefinition.java:462)
> > at
> > com.webobjects.appserver._private.WOComponentDefinition.componentInstanceInContext(WOComponentDefinition.java:572)
> > at
> > com.webobjects.appserver.WOApplication.pageWithName(WOApplication.java:1889)
> > at
> > com.webobjects.appserver.WOComponent.pageWithName(WOComponent.java:1205)
> > at Main.toTestSendCorr(Main.java:94)
> > at java.lang.reflect.Method.invoke(Native Method)
> > at
> > KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAccessor.java:54)
> > at
> > com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
> > at
> > com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268)
> > at
> > com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1544)
> > at
> > com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:498)
> > at
> > com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
> > at
> > com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1605)
> > at
> > com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:46)
> > at
> > com.webobjects.appserver._private.WOHyperlink.invokeAction(WOHyperlink.java:76)
> > at
> > com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101)
> > at
> > com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110)
> > at
> > com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:950)
> > at
> > com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1136)
> > at
> > com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java:1313)
> > at
> > com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:196)
> > at
> > com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:287)
> > at
> > com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:322)
> > at
> > com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:358)
> > at
> > com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:432)
> > at
> > com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1244)
> > at
> > com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:167)
> > at
> > com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:248)
> > at java.lang.Thread.run(Thread.java:491)
> >
> >
> > _______________________________________________
> > EOF mailing list
> > [email protected]
> > http://www.omnigroup.com/mailman/listinfo/eof
> >
>
>
> --
>
> Chuck Hill [email protected]
> Global Village Consulting Inc. http://www.global-village.net
>
>
>
> _______________________________________________
> EOF mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/eof
>