Hi there,

During testing portlet deployments with some useful PAs from jp.sf.pal portlet 
repository, I found that the current pluto-2 deployment component failed to 
deploy a PA when the descriptor of the PA does not have any namespace uri 
definition with the following exceptions:

java.io.IOException: unexpected element
(uri:"", local:"portlet-app"). Expected elements are
<{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-app>,<{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-app>

The portlet.xml is like the following:

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app id="charttest" version="1.0">
<snip/>
</portlet-app>

It's simply because PortletAppDescriptorServiceImpl is using explicit schema 
based JAXB unmarshalling. (.../portlet-app_1_0.xsd or .../portlet-app_2_0.xsd)

However, if we allow empty namespaced descriptor as well, then I think it would 
be very helpful to deploy some old portlet-1.0 based existing portlet 
applications.

To do this without any side effect, we can just copy the portlet 1.0 JAXB 
package, "o.a.p.container.om.portlet10.impl", to a new package (such as  
"o.a.p.container.om.portlet10.emptyns.impl"?), with empty namespace annotations 
and add it into the JAXB context as a third option in the 
PortletAppDescriptorService implementation.

By the way, this feature has been recently committed in 
Jetspeed-2.2.1-SNAPSHOT, but I'm now thinking it would be better to move this 
to pluto.
You can see the issue (JS2-1061) and the related discussion here: 
http://www.nabble.com/On-the-current-strong-validation-during-PA-deployment-td25261119.html
 
If there's no objection, I hope to add this to pluto trunk.
What do you think?


Kind regards,

Woonsan



      

Reply via email to