-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
-
Fix Version/s: 7.0.0 DXP FP87, 7.0.10.12 DXP SP12, 7.0.X, 7.1.10 DXP FP13, 7.1.X, 7.2.10 DXP FP1, 7.2.X, 7.2.1 CE GA2, 7.3.10 DXP GA1, Master
-
Branch Version/s:7.2.x, 7.1.x, 7.0.x
-
Backported to Branch:Committed
-
Fix Priority:4
-
Git Pull Request:
Description
When a page with a WAB using Spring MVC is frequently being viewed and the WAB is being re-deployed at the same time, an IllegalStateException may be thrown.
Steps to Reproduce
- Startup Liferay
- Deploy attached spring-mvc-portlet.war
(Created using Blade - Notes Below)
- Add the SpringMvc portlet to the home page
- Verify the following URL navigates directly to the portlet: http://localhost:8080/widget/web/guest/home/-/springmvc_WAR_springmvcportlet
- Run the following script to simulate users accessing the site:
for i in `seq 1 10000`; do curl -s "http://localhost:8080/widget/web/guest/home/-/springmvc_WAR_springmvcportlet" 2>&1 >> /dev/null; sleep 0.01; done
Note: This script uses curl to request for the portlet page every 0.01s and will execute this 10000 times
- Open Gogo Shell
- Find the bundle id for spring-mvc-portlet bundle by using the command:
ss | grep spring-mvc-portlet
- Refresh the spring-mvc-portlet bundle by using the command:
refresh [bundle-id]
Note: Replace [bundle-id] with the bundle id from Step 7
- If errors are observed, stop the script from running (Step 5)
- Note: Normally, you can stop the script by pressing ctrl+c in the terminal
- If errors are not observed, continue to refresh the bundle (Step 8)
Expected Behavior
No errors are thrown and portlet continues to work as expected
Actual Behavior
IllegalStateException is thrown and the portlet no longer works
Stack trace: stacktrace.log
Steps to create attached SpringMVC WAB sample
- Install Liferay Blade CLI:
https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/blade-cli - Create blade sample project by running the command:
blade create -t spring-mvc-portlet spring-mvc-portlet
Note: This generates a project folder: spring-mvc-portlet
- Navigate to the created spring-mvc-portlet in terminal
- Run the following command to compile/generate the WAR file:
gw war
Note: The deployed WAR file will be converted to a WAB when deployed on Liferay
- The generated WAR should be located in:
build/libs/spring-mvc-portlet.war
- causes
-
LPS-96946 Error in console log when going to the URL of an uncreated portlet
- Closed
-
LPS-97175 'Portlet is not ready' message display when the portlet is not find
- Closed
-
LPS-100155 7.0.x - WSRP portlets are displayed as "Portlet is not ready" after LPS-96672 changes
- Closed