• 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: Tutorial
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tutorial


  • Subject: Re: Tutorial
  • From: David LeBer <email@hidden>
  • Date: Wed, 12 Mar 2008 19:33:12 -0400


On 12-Mar-08, at 6:02 PM, Gustavo Pizano wrote:

aha ok...

you will kill me but this time i swear i google it.
Im having this
<WorkerThread0> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:
java.lang.NullPointerException
[2008-3-12 16:58:45 COT] <WorkerThread0> java.lang.NullPointerException
at com.nhlpm.pages.AddEdit.saveChanges(AddEdit.java:47)
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.NSKeyValueCoding$ValueAccessor $1.methodValue(NSKeyValueCoding.java:636)
at com.webobjects.foundation.NSKeyValueCoding $_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
at com.webobjects.foundation.NSKeyValueCoding $DefaultImplementation.valueForKey(NSKeyValueCoding.java:1293)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java: 1686)
at com.webobjects.foundation.NSKeyValueCoding $Utility.valueForKey(NSKeyValueCoding.java:447)
at com.webobjects.foundation.NSKeyValueCodingAdditions $ DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java: 212)
at com .webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java: 1754)
at com .webobjects .appserver ._private .WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
at com .webobjects .appserver._private.WOSubmitButton.invokeAction(WOSubmitButton.java: 81)
at com .webobjects .appserver ._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com .webobjects .appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java: 115)
at com.webobjects.appserver._private.WOForm.invokeAction(WOForm.java:141)
at com .webobjects .appserver ._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com .webobjects .appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java: 115)
at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java: 1078)
at com .webobjects .appserver ._private .WOComponentReference.invokeAction(WOComponentReference.java:127)
at com .webobjects .appserver ._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com .webobjects .appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java: 115)
at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java: 1078)
at com.webobjects.appserver.WOSession.invokeAction(WOSession.java: 1357)
at com .webobjects.appserver.WOApplication.invokeAction(WOApplication.java: 1736)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedPage(WOComponentRequestHandler.java:206)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369)
at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:442)
at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1678)
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:613)


when I pusch the save changes....
it pointein to this line of code
displayBoard().setBigImage(uploadedImageData());

Well. Something there is null that shouldn't be.

Try adding this before that line:

	NSLog.out.appendln("Display Board: " + displayBoard());
	NSLog.out.appendln("Image Data: " + uploadedImageData());

And then work back from there.

in the AddEddit.java in the saveChanges() method.

I am following the tutorial...

Gus


On Mar 12, 2008, at 4:57 PM, David LeBer wrote:


On 12-Mar-08, at 5:40 PM, Gustavo Pizano wrote:

Ok i dunno if I understand good, but as for teh 7 tips you post I think I following them, as for the line... well the veogen generated this

public DisplayBoard localInstanceIn(EOEditingContext editingContext) {
DisplayBoard localInstance = (DisplayBoard)EOUtilities.localInstanceOfObject(editingContext, this);
if (localInstance == null) {
throw new IllegalStateException("You attempted to localInstance " + this + ", which has not yet committed.");
}
return localInstance;
}


and I guess if I put the new line you suggest I must implement the newDisplayBoard (EOEditingContext) and formt here call the localInstanceIn()method which resieds int he _DisplayBoard class, which it looks for me like a singleton pattern.??

My mistake, in the stock Veogen templates only generate a factory method that takes all of the required attributes:


public static DisplayBoard createDisplayBoard(EOEditingContext editingContext, ...required attributes... ) {
...
}


Just follow the tutorial.

The EOF Commandments are for reference only at this point, just be aware they exist. Both the Veogen templates and Janine's tutorial do the right thing.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org


_______________________________________________ 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: Tutorial
      • From: Gustavo Pizano <email@hidden>
References: 
 >Tutorial (From: Gustavo Pizano <email@hidden>)
 >Re: Tutorial (From: David LeBer <email@hidden>)
 >Re: Tutorial (From: David LeBer <email@hidden>)
 >Re: Tutorial (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Re: New Tool: Click to Open
  • Next by Date: Re: Tutorial
  • Previous by thread: Re: Tutorial
  • Next by thread: Re: Tutorial
  • Index(es):
    • Date
    • Thread