It works locally but not on clusters. You simply get a NPE.
Problem
When we logout we cross an issue due to Tomcat sessions persistence.
Because we set distributable to true, to allow sessions failover,
and use and DeltaManager for replication.
Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem
Tried solutions
By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB).
<Context>
<Manager className="org.apache.catalina.session.DeltatManager" pathname="">
</Manager>
</Context>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1132749 13f79535-47bb-0310-9956-ffa450edef68
If the session is timed out the request handler checks weather it is an ajax request or not (The information comes from the request header if the X-Requested-With contains XMLHttpRequest we haven an ajax request.).
If it is an ajax request it don't return the normal "checkLogin" request, i return a a special ajaxCheckLogin request. This request can point to an site which shows the "Please Login Hint".
Orig Msg:
Take the following page (for example) https://localhost/content/control/findContent
field "Data Resource Id" has an icon beside it that creates an ajax dialog pop up. If the session has already timed out. The dialog box would show the login screen.
I suspect that all pages containing this functionality would exhibit the same symptom.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1102615 13f79535-47bb-0310-9956-ffa450edef68
This feature was not working since rev.741374 because a quick return from the login service was introduced if the user was already logged in.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1090853 13f79535-47bb-0310-9956-ffa450edef68
Keeps the secure idea but enhance when working in a secure environment (VPN, local network, etc.) to return a comprehensive response. Depends on the secureSoapAnswer property in service.properties, true by default
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1088047 13f79535-47bb-0310-9956-ffa450edef68
I'm not sure what the Geronimo code was supposed to do. It appeared to load all of the containers just so it could create/start the rmi-dispatcher container. So, I created a static method that allows client code to get a specific container. If this change causes problems with Geronimo just let me know and I will fix it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1084238 13f79535-47bb-0310-9956-ffa450edef68
1) SOAPHandler fault handling and error logging improvements
2) Current SOAPHandler allows multiple service requests in the SOAPBody. There should only be one service request.
3) Error messages give too much information in soap response to potential hackers.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1082829 13f79535-47bb-0310-9956-ffa450edef68
Problem
=======
When calling a service that was defined as "export=true" and a non-optional parameter is missing, then the SOAP-Response is not a valid XML.
Cause
=====
The cause is, that in SOAPEventHandler.invoke() the dispatcher.runSync() throws a ServiceValidationException ("The following required parameter is missing..."). This will be catched by the GenericServiceException-block, a error response will be written to the output stream (via sendError()) and an EventHandlerException will be thrown. This exception will again be catched (this time by the Exception-block and another error response will be written to the output stream.
Solution
========
I think the best solution is simply not to call sendError in the GenericServiceException-block.
JLR: I simply commented out the faulty line (with a reference to OFBIZ-4207) in case someone would want to improve the error message.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075952 13f79535-47bb-0310-9956-ffa450edef68
Orig. Msg.:
I guess that the makeLoginUrl-method in the LoginWorker should return a string with expandedEntites.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1071362 13f79535-47bb-0310-9956-ffa450edef68
Scott reported: To clarify, the problem only occurs if the Ajax call results in a screen being rendered since it is the ScreenRenderer that causes a new key to be generated.
Bilgin suggested: I think a solution would be to skip generating of new external login key for Ajax requests.
Ajax requests can be identified by presence of 'X-Requested-With': 'XMLHttpRequest', http header. It is set by most of the Javascript libraries we use: prototype, jquery.
I coded it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068283 13f79535-47bb-0310-9956-ffa450edef68
Fix using TagLib in freemarker follow this.
1. In ControlServlet.java, create ServletContextHashModel instance and set to request's attritube
2. In ScreenRenderer.java, set ServletContextHashModel instance from request's attribute to context name Application and set HttpRequestHashModel instance from requestAttributes in context to context name Request
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1061310 13f79535-47bb-0310-9956-ffa450edef68
The problem is, when you call a request over http, but the controller wants an https request, the RequestHandler make an redirect to https (which is indeed pretty cool). But this redirect causes that Events/ Services will be called twice. This can be avoided when we return from the Service/ Event directly after doing the redirect.
Example: http://localhost:8080/ecommerce/control/setdistributor?distributor=4711
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040044 13f79535-47bb-0310-9956-ffa450edef68