[
https://issues.apache.org/jira/browse/OFBIZ-3903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903083#action_12903083
]
James McGill commented on OFBIZ-3903:
-------------------------------------
For testing this, I have a service that always returns an error.
<service name="exampleErrorService" engine="simple"
location="component://example/script/org/ofbiz/example/example/ExampleServices.xml"
invoke="exampleErrorService">
<attribute name="result" type="String" mode="OUT" optional="false"/>
</service>
...
<simple-method method-name="exampleErrorService">
<set field="result" value="ERROR"/>
<add-error>
<fail-message message="Example Error"/>
</add-error>
<check-errors/>
</simple-method>
..
I made two portlets
<PortletCategory portletCategoryId="ERROR_EXAMPLE" description="Test
case to reproduce error"/>
<PortalPortlet portalPortletId="ERROR_EXAMPLE_1" portletName="Error
Example 1" description="Portlet that runs a service"
screenName="PortletErrorExample1"
screenLocation="component://example/widget/example/PortletScreens.xml"/>
<PortalPortlet portalPortletId="ERROR_EXAMPLE_2" portletName="Error
Example 2" description="Portlet that fails from previous examp"
screenName="PortletErrorExample2"
screenLocation="component://example/widget/example/PortletScreens.xml"/>
<PortletPortletCategory portalPortletId="ERROR_EXAMPLE_1"
portletCategoryId="ERROR_EXAMPLE"/>
<PortletPortletCategory portalPortletId="ERROR_EXAMPLE_2"
portletCategoryId="ERROR_EXAMPLE"/>
widget/example/PortletScreens.xml
<screen name="PortletErrorExample1">
<section>
<actions>
<script
location="component://example/webapp/example/WEB-INF/actions/PortletErrorExample1.groovy"/>
</actions>
<widgets>
<platform-specific>
<html>
<html-template
location="component://example/webapp/example/portletErrorExample1.ftl"/>
</html>
</platform-specific>
</widgets>
</section>
</screen>
<screen name="PortletErrorExample2">
<section>
<widgets>
<platform-specific>
<html>
<html-template
location="component://example/webapp/example/portletErrorExample2.ftl"/>
</html>
</platform-specific>
</widgets>
</section>
</screen>
Then I made this action:
webapp/example/WEB-INF/actions/PortletErrorExample1.groovy
import org.ofbiz.base.util.Debug;
Debug.logInfo("Portlet Error Example 1", "");
dispatcher.runSync("exampleErrorService", [:]);
Now if I add the Portlet #1 before Portlet #2 on my portal page, I get a stack
trace (next comment).
> Service error in one portlet causes a rendering failure in another portlet.
> ---------------------------------------------------------------------------
>
> Key: OFBIZ-3903
> URL: https://issues.apache.org/jira/browse/OFBIZ-3903
> Project: OFBiz
> Issue Type: Bug
> Components: specialpurpose/myportal
> Affects Versions: Release 09.04
> Reporter: James McGill
>
> I have a portlet that calls a service. If that service has an error, it
> causes a different portlet to throw a stack trace on the screen.
> I will attach steps to reproduce.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.