Re: Application Stops Responding - Strange Conditions
Re: Application Stops Responding - Strange Conditions
- Subject: Re: Application Stops Responding - Strange Conditions
- From: Chuck Hill <email@hidden>
- Date: Wed, 20 Apr 2005 13:49:11 -0700
On Apr 19, 2005, at 10:31 PM, Hunter Hillegas wrote:
Chuck,
Thanks for taking a look.
Are we doing something 'very wrong' (tm) here?
Probably :-) but I have no idea what it is. It looks OK to me. The
problem likely lies elsewhere. I can't explain how you managed to get
two session checkouts in one request-response loop.
Chuck
Main.java: awake looks like this:
line 27: Session session = (Session)session();
related code:
public void awake() {
if (contentPage == null) {
Session session = (Session)session();
EOEditingContext ec = session.peerEditingContext();
productsForHomePage =
(NSArray)ec.objectsWithFetchSpecification(EOFetchSpecification.fetchSpe
cificationNamed("productsForHomePage", "Product"));
productCategoryList =
((Application)application()).getProductCategoryList(ec);
contentPage =
(ContentPage)EOUtilities.objectMatchingKeyAndValue(ec, "ContentPage",
"pageID", "home");
}
super.awake();
}
ProductPage.java: chromeObject looks like this:
line 57: ma.addObject( pageWithName( "Main" ));
related code:
public ChromeObject chromeObject() {
chromeObject.setNavArea( Application.NAV_PRODUCTS );
chromeObject.setPageHeader( contentPage.pageName() );
chromeObject.setPageTitle( contentPage.pageTitle() );
chromeObject.setPageCrumbText( contentPage.pageCrumb() );
chromeObject.setMetaKeywords( contentPage.metaKeywords() );
chromeObject.setMetaDescription( contentPage.metaDescription()
);
chromeObject.setDirectAction( "productPage" );
NSMutableArray ma = new NSMutableArray();
ma.addObject( pageWithName( "Main" ));
ma.addObject( this );
chromeObject.setCrumbPages( ma );
return chromeObject;
}
On Apr 19, 2005, at 9:56 PM, Chuck Hill wrote:
This is why your app is not responding:
"WorkerThread4" prio=5 tid=0x0053b5a0 nid=0x1abdc00 in Object.wait()
[f0f0c000..f0f0eac0]
at java.lang.Object.wait(Native Method)
- waiting on <0x65ba3578> (a
com.webobjects.appserver.WOSessionStore$TimeoutEntry)
at java.lang.Object.wait(Object.java:429)
at
com.webobjects.appserver.WOSessionStore.checkOutSessionWithID(WOSessi
onStore.java:207)
- locked <0x65ba3578> (a
com.webobjects.appserver.WOSessionStore$TimeoutEntry)
at
com.webobjects.appserver.WOApplication.restoreSessionWithID(WOApplica
tion.java:1546)
at
er.extensions.ERXApplication.restoreSessionWithID(ERXApplication.java
:835)
at com.webobjects.appserver.WOContext.session(WOContext.java:248)
at
com.webobjects.appserver.WOComponent.session(WOComponent.java:1176)
at Main.awake(Main.java:27)
at
com.webobjects.appserver.WOComponent._awakeInContext(WOComponent.java
:862)
at
com.webobjects.appserver.WOApplication.pageWithName(WOApplication.jav
a:1962)
at
com.webobjects.appserver.WOComponent.pageWithName(WOComponent.java:
1200)
at ProductPage.chromeObject(ProductPage.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAc
cessor.java:54)
at
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObje
ct(NSKeyValueCoding.java:1160)
at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valu
eForKey(NSKeyValueCoding.java:1268)
at
com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:
1539)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyV
alueCoding.java:498)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementa
tion.valueForKeyPath(NSKeyValueCodingAdditions.java:216)
at
com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java
:1600)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueForK
eyPath(NSKeyValueCodingAdditions.java:149)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementa
tion.valueForKeyPath(NSKeyValueCodingAdditions.java:217)
at
com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java
:1600)
at
com.webobjects.appserver._private.WOKeyValueAssociation.valueInCompon
ent(WOKeyValueAssociation.java:46)
at
com.webobjects.appserver.WOAssociation.booleanValueInComponent(WOAsso
ciation.java:278)
at
com.webobjects.appserver._private.WOConditional.invokeAction(WOCondit
ional.java:47)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction
(WODynamicGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynam
icGroup.java:110)
at
com.webobjects.appserver._private.WOConditional.invokeAction(WOCondit
ional.java:55)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction
(WODynamicGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynam
icGroup.java:110)
at
er.extensions.ERXWORepetition.invokeAction(ERXWORepetition.java:238)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction
(WODynamicGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynam
icGroup.java:110)
at
com.webobjects.appserver._private.WOConditional.invokeAction(WOCondit
ional.java:55)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction
(WODynamicGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynam
icGroup.java:110)
at
com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:
945)
at
com.webobjects.appserver._private.WOComponentReference.invokeAction(W
OComponentReference.java:104)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction
(WODynamicGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynam
icGroup.java:110)
at
com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:
945)
at
com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1166)
at
com.webobjects.appserver.WOApplication.invokeAction(WOApplication.jav
a:1375)
at
er.extensions.ERXApplication.invokeAction(ERXApplication.java:592)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatch
WithPreparedPage(WOComponentRequestHandler.java:196)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatch
WithPreparedSession(WOComponentRequestHandler.java:287)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatch
WithPreparedApplication(WOComponentRequestHandler.java:322)
at
com.webobjects.appserver._private.WOComponentRequestHandler._handleRe
quest(WOComponentRequestHandler.java:358)
at
com.webobjects.appserver._private.WOComponentRequestHandler.handleReq
uest(WOComponentRequestHandler.java:435)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.
java:1306)
at
er.extensions.ERXApplication.dispatchRequest(ERXApplication.java:
633)
at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThre
ad.java:173)
at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.j
ava:254)
at java.lang.Thread.run(Thread.java:552)
at
java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
- locked <0x65700190> (a java.lang.ref.Reference$Lock)
"main" prio=5 tid=0x005010d0 nid=0x1804600 in Object.wait()
[f07ff000..f08002c8]
at java.lang.Object.wait(Native Method)
- waiting on <0x6587d790> (a com.webobjects.appserver._WORunLoop)
at
com.webobjects.appserver._WORunLoop._acceptInputBeforeDate(_WORunLoop
.java:217)
at
com.webobjects.appserver._WORunLoop.runBeforeDate(_WORunLoop.java:
71)
- locked <0x6587d790> (a com.webobjects.appserver._WORunLoop)
at
com.webobjects.appserver.WOApplication._runOnce(WOApplication.java:
775)
at
com.webobjects.appserver.WOApplication.run(WOApplication.java:900)
at er.extensions.ERXApplication.run(ERXApplication.java:273)
at
com.webobjects.appserver.WOApplication.main(WOApplication.java:324)
at er.extensions.ERXApplication.main(ERXApplication.java:46)
at Application.main(Application.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java:71)
I can't think of how you have managed that. While handling a
component based request, your request for pageWithName is attempting
to check out that session again. Right now, this makes no sense to
me. What is the code at these locations:
ProductPage.chromeObject(ProductPage.java:57)
Main.awake(Main.java:27)
Chuck
--
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