Re: java.lang.IllegalStateException: Trying to check out a session twice in one RR loop
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
Re: Inheritance and prefetching
In ancient times… (and I mean like, 15 years ago) A back pointing relationship from the subclasses of B to the abstract A (where the to-many relationship ‘toB' is) was necessary for all the plumbing to hook things up when the EOs came back from the prefetch. Ken On Dec 5, 2013, at 3:08 PM, Alexis Tual alexis.t...@gmail.com wrote: Hi, I have 2 single table hierarchies : - B1 inherits from B - A1 inherits from A (abstract), A1 has a to-many relationship to B, let's call it toBs is it possible to prefetch this relationship ? We can't manage to get it work, I'll past the obscure exception tomorrow but can anyone confirm that this kind of prefetch works with EOF ? I've also tried ERXBatchFetchUtilities which seems promising This works much like prefetching with fetch specifications, however this implementation is able to work around inheritance where prefetching fail, but no luck :/ Thanks Alex ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/kenlists%40anderhome.com This email sent to kenli...@anderhome.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: java.lang.IllegalStateException: Trying to check out a session twice in one RR loop
Hi Raymond, I think the problem come from the mySession() method. You are not supposed to create session with new Session(). Why not use the session() method in the DirecAction base class? If the regular session() method throw, there is a problem somewhere else. Samuel Le 2013-12-06 à 03:30, Raymond NANEON rnan...@me.com a écrit : 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
Ajax and ERDirectToWeb Frameworks conflicts?
Hi all. I'm working on an app that uses Ajax and ERExcelLook Frameworks, which requires ERDirectToWeb and a few others. Does anyone know of conflicts with using these together? I can't update AjaxModalDialogs and the wrong objects show when repeatedly using the same AjaxModalDialogs (in a repetition, using the opener). I don't see the problems In a different app that only uses Ajax. TIA. kib Klaus Berkling www.berkling.us | @kiberkli ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Ajax and ERDirectToWeb Frameworks conflicts?
that's weird. I have an wonder app that uses Ajax Modal Openers in a WORepetition and the ERExcelLook framework to create an Excel file. No problems at all. All of the content of my Ajax Modal Dialogs come from a file. Do your modal dialogs work if you remove the ExcelLook? Ted On Dec 6, 2013, at 4:29 PM, Klaus I. Berkling webobje...@berkling.us wrote: Hi all. I'm working on an app that uses Ajax and ERExcelLook Frameworks, which requires ERDirectToWeb and a few others. Does anyone know of conflicts with using these together? I can't update AjaxModalDialogs and the wrong objects show when repeatedly using the same AjaxModalDialogs (in a repetition, using the opener). I don't see the problems In a different app that only uses Ajax. TIA. kib Klaus Berkling www.berkling.us | @kiberkli ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com This email sent to tedp...@yahoo.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Ajax and ERDirectToWeb Frameworks conflicts?
On Dec 6, 2013, at 1:57 PM, Theodore Petrosky tedp...@yahoo.com wrote: that's weird. I have an wonder app that uses Ajax Modal Openers in a WORepetition and the ERExcelLook framework to create an Excel file. No problems at all. All of the content of my Ajax Modal Dialogs come from a file. Do your modal dialogs work if you remove the ExcelLook? I thinking it must be me, some sort of error on my part so I have not backed out that code. If your code works then it is likely my code. Thanks. kib Klaus Berkling www.berkling.us | @kiberkli ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Entity join with different data sources?
Can you please show us the full stack trace? You will probably need to write a custom JDBCPlugin. If your needs are basic it is not hard. Well, when I choose Reverse Engineer in WOLips, select table and click OK I get exception below. Bear in mind that ImpalaPlugIn is my JDBC plugin that simply loads standard HiveJDBCDriver. Currently it does not have any other functionality. java.lang.RuntimeException: Failed to reverse engineer. at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLReverseEngineerFactory$ReflectionSQLReverseEngineer.reverseEngineerWithTableNamesIntoModel(EOFSQLReverseEngineerFactory.java:55) at org.objectstyle.wolips.eomodeler.actions.ReverseEngineerAction.run(ReverseEngineerAction.java:97) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) Caused by: java.lang.reflect.InvocationTargetException 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 org.objectstyle.wolips.eomodeler.core.sql.EOFSQLReverseEngineerFactory$ReflectionSQLReverseEngineer.reverseEngineerWithTableNamesIntoModel(EOFSQLReverseEngineerFactory.java:53) ... 34 more Caused by: Method not supportedat org.apache.hive.jdbc.HiveDatabaseMetaData.supportsANSI92FullSQL(HiveDatabaseMetaData.java:805) at com.webobjects.jdbcadaptor.JDBCContext._fetchJDBCInfo(JDBCContext.java:612) at com.webobjects.jdbcadaptor.JDBCPlugIn.jdbcInfo(JDBCPlugIn.java:1046) at com.webobjects.jdbcadaptor.ImpalaPlugIn.jdbcInfo(ImpalaPlugIn.java:131) at com.webobjects.jdbcadaptor.JDBCAdaptor.typeInfo(JDBCAdaptor.java:246) at com.webobjects.jdbcadaptor.JDBCAdaptor.isValidQualifierType(JDBCAdaptor.java:606) at com.webobjects.jdbcadaptor.JDBCChannel.describeModelWithTableNames(JDBCChannel.java:1078) at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLReverseEngineer53.reverseEngineerWithTableNamesIntoModel(EOFSQLReverseEngineer53.java:66) 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 org.objectstyle.wolips.eomodeler.core.sql.EOFSQLReverseEngineerFactory$ReflectionSQLReverseEngineer.reverseEngineerWithTableNamesIntoModel(EOFSQLReverseEngineerFactory.java:53) at