[JBoss JIRA] (GTNPC-76) Hotdeploy of a portlet war, see the portlet.xml loaded before the web.xml
by Dimitri BAELI (Created) (JIRA)
Hotdeploy of a portlet war, see the portlet.xml loaded before the web.xml
-------------------------------------------------------------------------
Key: GTNPC-76
URL: https://issues.jboss.org/browse/GTNPC-76
Project: GateIn Portlet Container
Issue Type: Quality Risk
Reporter: Dimitri BAELI
CONTEXT:
* A war with a portlet deployed in EPP/GateIn
PROBLEM:
* As seen in the Forum (http://community.jboss.org/thread/157804) the servlet / portlet init order is changing between normal startup and hotdeploy.
* This breaks the hotdeployment of Spring MVC Portlets (which requires the Spring RootContext to be initialized).
* This is a quality risk as the loading order is not consitent
* This breaks the hotdeployment feature of JBossStudio of manual HotDeployment, and it's a huge pain for developpers
REPRODUCE:
* To reproduce, I've created a minimalist project (without Spring) that shows the difference between start order init order (normal/hotdeploy).
* Put the war in a EPP/GateIn deploy dir
* Start the server
* The logs will contain this for the fresh start-up:
{code}
03:14:47,514 INFO [STDOUT] SampleServlet init.
...
03:15:38,088 INFO [STDOUT] HelloWorldPortlet init.
{code}
* Touch the war file in the deploy dir
* The logs will contain this for the fresh start-up:
{code}
03:16:24,907 INFO [TomcatDeployment] undeploy, ctxPath=/PortletAndServletLoadOrderTest
03:16:24,979 INFO [STDOUT] HelloWorldPortlet destroy.
03:16:25,180 WARN [MainResourceResolver] Cannot find servlet context module
03:16:25,181 INFO [STDOUT] SampleServlet destroy.
03:16:25,322 INFO [TomcatDeployment] deploy, ctxPath=/PortletAndServletLoadOrderTest
03:16:25,461 INFO [STDOUT] HelloWorldPortlet init.
03:16:25,467 INFO [STDOUT] SampleServlet init.
{code}
* Where we see that the Portlet is inited before the portlet
EXPECTED:
* web.xml is initialized before portlet.xml when the war is Hotdeployed, like during a normal startup
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (GTNPORTAL-1730) samples portlet.xml : cannot validate against portlet-app_2_0.xsd - element init-param at wrong place.
by Antoine Herzog (JIRA)
samples portlet.xml : cannot validate against portlet-app_2_0.xsd - element init-param at wrong place.
------------------------------------------------------------------------------------------------------
Key: GTNPORTAL-1730
URL: https://issues.jboss.org/browse/GTNPORTAL-1730
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Documentation, QA
Affects Versions: 3.1.0-GA
Reporter: Antoine Herzog
Assignee: Luc Texier
Priority: Trivial
In many of the samples, such as jsfhellouser, the portlet.xml, that have the <init-param> element, cannot validate against the schema : http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd.
In eclipse, you can see it directly with a validation error.
The error message is :
cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":portlet-preferences, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":security-role-ref, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":supported-processing-event, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":supported-publishing-event, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":supported-public-render-parameter, "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd":container-runtime-option}' is expected.
The turnaround is simple : move the <init-param> element(s) after the <portlet-class> element, and before the <supports> element.
Simple, but it would be more clean if the file directly with that.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months