You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Nash (JIRA)" <de...@tuscany.apache.org> on 2010/04/18 22:45:50 UTC

[jira] Resolved: (TUSCANY-3540) Axis2SCAReferenceBindingProvider throws exception if servlet host not present

     [ https://issues.apache.org/jira/browse/TUSCANY-3540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Nash resolved TUSCANY-3540.
---------------------------------

    Resolution: Fixed

Fixed under revision r935405.

> Axis2SCAReferenceBindingProvider throws exception if servlet host not present
> -----------------------------------------------------------------------------
>
>                 Key: TUSCANY-3540
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3540
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Misc Binding Extensions
>    Affects Versions: Java-SCA-1.6
>            Reporter: Simon Nash
>            Assignee: Simon Nash
>             Fix For: Java-SCA-Next
>
>
> When using the distributed SCA binding on a reference, the code in Axis2SCAReferenceBindingProvider throws an exception if no servlet host is present, even though a servlet host is not required or used in this scenario.  Here's the stack trace:
> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>         at java.util.ArrayList.RangeCheck(Unknown Source)
>         at java.util.ArrayList.get(Unknown Source)
>         at org.apache.tuscany.sca.binding.sca.axis2.impl.Axis2SCAReferenceBindingProvider.<init>(Axis2SCAReferenceBindingProvider.java:76)
>         at org.apache.tuscany.sca.binding.sca.axis2.impl.Axis2SCABindingProviderFactory.createReferenceBindingProvider(Axis2SCABindingProviderFactory.java:53)
>         at org.apache.tuscany.sca.binding.sca.axis2.impl.Axis2SCABindingProviderFactory.createReferenceBindingProvider(Axis2SCABindingProviderFactory.java:40)
>         at org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBindingProviderFactory.createReferenceBindingProvider(DefaultProviderFactoryExtensionPoint.java:241)
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.getDistributedProvider(RuntimeSCAReferenceBindingProvider.java:150)
>         at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.start(RuntimeSCAReferenceBindingProvider.java:235)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$2.run(CompositeActivatorImpl.java:610)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:608)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:560)
>         at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:728)
>         at scatours.IntroducingClientLauncher.main(IntroducingClientLauncher.java:31)
> The problem is caused by the following line in the constructor for Axis2SCAReferenceBindingProvider:
>         ServletHost servletHost = servletHosts.getServletHosts().get(0);
> This sets a local variable servletHost which is not used anywhere, but throws an exception if a servlet host isn't present.  It appears that this line has been incorrectly copied from Axis2SCAServiceBindingProvider, which does need a servlet host.  To avoid this exception the user has to configure an unnecessary servlet host.  The fix for the problem is simply to remove the above line.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.