Re: java.lang.IllegalStateException: Trying to check out a session twice in one RR loop
Re: java.lang.IllegalStateException: Trying to check out a session twice in one RR loop
- Subject: Re: java.lang.IllegalStateException: Trying to check out a session twice in one RR loop
- From: Raymond NANEON <email@hidden>
- Date: Fri, 06 Dec 2013 08:30:44 +0000 (GMT)
Hi Samuel and Chuck,
Here is how the exception is occured.
When I use the directAction link generated by my apps to access to a specific page all is fine.
Example of my DA :
public WOActionResults visaProjectAction() {
directVisa = true;
WOActionResults nextPage = null;
String login = "";
String password = "";
NSDictionary actionParams = getParamsFromRequest(request(), null);
String projetId = (String) actionParams.valueForKey(PROJET_ID_KEY);
String directVisa = (String) actionParams.valueForKey(DIRECTVISA);
NSMutableDictionary params = new NSMutableDictionary();
if (!MyStringCtrl.isEmpty(projetId)) {
params.put(PROJET_ID_KEY, new Integer(projetId));
}
if (!MyStringCtrl.isEmpty(directVisa)) {
if (directVisa.equals("O") || directVisa.equals("OUI")) {
params.put(DIRECTVISA, new Boolean(true));
params.put(DIRECTVALIDATE, new Boolean(false));
}
}
laSession().setActionParams(params.immutableClone());
if (useCasService()) {
return loginCASPage();
} else {
nextPage = pageWithName(DAVisaMain.class.getName());
return nextPage;
}
}
And then When I go to my apps Home, I get the Exception :
Example myHome method :
public WOActionResults myHome() {
mySession().resetAll();
ERXRedirect redirect = (ERXRedirect) pageWithName(ERXRedirect.class
.getName());
//mySession().reset();
redirect.setComponent(mySession().myHome());
return redirect;
}
public Session mySession() {
if (sess == null) {
try {
sess = (Session) session();
} catch (Exception e) {
sess = new Session();
e.printStackTrace();
}
}
return sess;
}
The Exception occur when to go my apps Home, my apps re-call the session before display homePage.
Important : My app use Wrapper.
Before using DirectAction to access to my app I never had this kind of exception.
Exception :
java.lang.IllegalStateException: Trying to check out a session twice in one RR loop: tjRpYltVknbeqG0Eimzt1M
at er.extensions.appserver.ERXApplication.restoreSessionWithID(ERXApplication.java:2389)
at com.webobjects.appserver.WOContext.session(WOContext.java:364)
at com.webobjects.appserver.WOComponent.session(WOComponent.java:1324)
at utt.rec.projet.server.components.MonComposant.mySession(MonComposant.java:117)
at utt.rec.projet.server.components.EnseignantsChercheursView.<init>(EnseignantsChercheursView.java:52)
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:513)
at com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:640)
at com.webobjects.appserver._private.WOComponentDefinition._componentInstanceInContext(WOComponentDefinition.java:544)
at com.webobjects.appserver._private.WOComponentDefinition.componentInstanceInContext(WOComponentDefinition.java:642)
at com.webobjects.appserver.WOApplication.pageWithName(WOApplication.java:2332)
at com.webobjects.appserver.WOComponent.pageWithName(WOComponent.java:1346)
at utt.rec.projet.server.Session.myHome(Session.java:4265)
at utt.rec.projet.server.components.EditNextProject.annuler(EditNextProject.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:597)
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:1324)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736)
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:1804)
at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
at com.webobjects.appserver._private.WOHyperlink.invokeAction(WOHyperlink.java:98)
at er.extensions.components._private.ERXHyperlink.invokeAction(ERXHyperlink.java:60)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
at er.extensions.components._private.ERXWOForm.invokeAction(ERXWOForm.java:218)
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.WOComponentContent.invokeAction(WOComponentContent.java:38)
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.WOConditional.invokeAction(WOConditional.java:86)
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.WOConditional.invokeAction(WOConditional.java:86)
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.WOHTMLURLValuedElement.invokeAction(WOHTMLURLValuedElement.java:149)
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:1079)
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:1079)
at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1357)
at com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java:1745)
at er.extensions.appserver.ajax.ERXAjaxApplication.invokeAction(ERXAjaxApplication.java:119)
at er.extensions.appserver.ERXApplication.invokeAction(ERXApplication.java:1988)
at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157)
at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235)
at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268)
at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302)
at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:375)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2109)
at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2074)
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:695)
Thanks for help
Envoyé depuis iCloud
Le 5 déc. 2013 à 21:44, Samuel Pelletier <email@hidden> a écrit :
Hi,
I suggest you put some code and a stack trace, maybe the action method. With the information you provided, it is impossible to help, we only know you have a problem with Session.
Samuel
Le 2013-12-05 à 04:01, Raymond NANEON <
email@hidden> a écrit :
Hi List,
I get this Exception "java.lang.IllegalStateException : Trying to check out a session twice in one RR loop " after using a specific method in my DirectAction, then close the page and go to my apps home.
I don't understand what going on.
Thanks for your help
_______________________________________________
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