• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EOQualifier timestamp comparison help [i.e., exception]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOQualifier timestamp comparison help [i.e., exception]


  • Subject: Re: EOQualifier timestamp comparison help [i.e., exception]
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 18 Aug 2005 15:41:13 -0700

Based on the stack trace:
java.lang.NullPointerException
at com.webobjects.eoaccess.EOAttribute.adaptorValueByConvertingAttributeV alue(EOAttribute.java:2020)
at com.webobjects.jdbcadaptor.JDBCColumn.takeInputValue (JDBCColumn.java:562)
at com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindings AndExecute(JDBCChannel.java:226)
at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression (JDBCChannel.java:303)

I'd look in the model for the problem. Missing a column name, wrong external data type, wrong value type? Something wrong at the entity level?



Chuck


On Aug 18, 2005, at 3:32 PM, LD wrote:

Hi again,

I still can't figure out why the qualifier (below) is causing a java.lang.NullPointerException. If I specify null for the qualifier in the FetchSpecification - it works without a problem - but utilising the ( EOQualifier )recentPurchasesQualifier below causes a RuntimeException.

Any help?

the toString output of my qualifier is as follows:
((timestamp > (com.webobjects.foundation.NSTimestamp)'2005-07-06 00:00:15 Etc/GMT') and (accountsInvoiceNumber = null) and (deliveryConsignmentNumber = null))


Thanks.

On 19/08/2005, at 7:26 AM, LD wrote:


<...>
(Below is the FetchSpecification used and the runtime exception, though there's nothing special in Main that's worth seeing seeing as it's the qualifier causing the problems).


public class Purchase extends EOGenericRecord {
    <...>
    static EOQualifier recentPurchasesQualifier() {
        NSMutableArray args;

args = new NSMutableArray();
args.addObject( "timestamp" );
args.addObject( recentPurchasePeriodTimestamp() );
args.addObject( "accountsInvoiceNumber" );
args.addObject( EOKeyValueCoding.NullValue );
args.addObject( "deliveryConsignmentNumber" );
args.addObject( EOKeyValueCoding.NullValue );
return EOQualifier.qualifierWithQualifierFormat( "%s > %@ AND %s = %@ AND %s = %@", args );
}
static NSArray purchaseSortOrderings() {
return new NSArray( EOSortOrdering.sortOrderingWithKey ( "timestamp", EOSortOrdering.CompareAscending ) );
}
public static EOFetchSpecification FetchSpecification() {
return new EOFetchSpecification( "Purchase", recentPurchasesQualifier(), purchaseSortOrderings() );
}
<...>
}


[2005-08-19 06:51:48 EST] <main> Creating LifebeatThread now with: BFMOnlineStore 55555 localhost/127.0.0.1 1085 30000
Welcome to BFMOnlineStore!
sharedEditingContext is set...
Initializing PostgresqlPlugin
Refetch error for entity: Purchase
java.lang.NullPointerException
at com.webobjects.eoaccess.EOAttribute.adaptorValueByConvertingAttribute Value(EOAttribute.java:2020)
at com.webobjects.jdbcadaptor.JDBCColumn.takeInputValue (JDBCColumn.java:562)
at com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBinding sAndExecute(JDBCChannel.java:226)
at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression (JDBCChannel.java:303)
at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression (JDBCChannel.java:261)
at com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes (JDBCChannel.java:185)
at com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificati onEditingContext(EODatabaseChannel.java:879)
at com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpeci fication(EODatabaseChannel.java:216)
at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificat ionEditingContext(EODatabaseContext.java:3206)
at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecificati on(EODatabaseContext.java:3347)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpe cification(EOObjectStoreCoordinator.java:539)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecificati on(EOEditingContext.java:4075)
at com.webobjects.eocontrol.EOSharedEditingContext.objectsWithFetchSpeci fication(EOSharedEditingContext.java:349)
at Application.refetchSharedRecordsForNamedEntity (Application.java:98)
at Application.<init>(Application.java:60)
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: 274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at com.webobjects.appserver.WOApplication.main (WOApplication.java:323)
at Application.main(Application.java:24)
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:324)
at com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java: 71)
[2005-08-19 06:51:48 EST] <main> The URL for webserver connect is:
http://localhost/cgi-bin/WebObjects/BFMOnlineStore.woa/-55555
The URL for direct connect is:
http://localhost:55555/cgi-bin/WebObjects/BFMOnlineStore.woa
[2005-08-19 06:51:48 EST] <main> null
[2005-08-19 06:51:48 EST] <main> Waiting for requests...



with regards, --

LD


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


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





_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: EOQualifier timestamp comparison help [i.e., exception]
      • From: LD <email@hidden>
References: 
 >EOQualifier timestamp comparison help (From: LD <email@hidden>)
 >Re: EOQualifier timestamp comparison help [i.e., exception] (From: LD <email@hidden>)

  • Prev by Date: Re: EOQualifier timestamp comparison help [i.e., exception]
  • Next by Date: Re: EOQualifier timestamp comparison help [i.e., exception]
  • Previous by thread: Re: EOQualifier timestamp comparison help [i.e., exception]
  • Next by thread: Re: EOQualifier timestamp comparison help [i.e., exception]
  • Index(es):
    • Date
    • Thread