Unfortunately I still can't get this to work, although the assembly testcase
now works if I try to use the new binding in an sca module in tomcat it
fails to find the new binding. It looks like the runtime is not correctly
picking up the new SCDL and it ignores the binding on entry points trying to
use it.

To show the problem build the binding in the sandbox and drop the jar in the
tomcat server lib, then edit the sca.module in tomcat
webapps\helloworldws-SNAPSHOT\WEB-INF\classes changing the binding.ws to be
<ajax:binding.ajax/> and add the additional namespace xmlns:ajax="
http://org.apache.tuscany/xmlns/ajax/0.9";.

Start up tomcat and you get the exception below which happens because the
entryPoint has zero bindings.

I've not been able to figure out whats going wrong, is this a bug somewhere
or is there a step i'm missing out?

Thanks for any help,

   ...ant

- Error deploying web application archive helloworldws-SNAPSHOT.war
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
        at java.util.ArrayList.get(ArrayList.java:321)
        at
org.apache.tuscany.core.system.builder.SystemEntryPointBuilder.build(
SystemEntryPointBuilder.java:49)
        at
org.apache.tuscany.core.system.builder.SystemEntryPointBuilder.build(
SystemEntryPointBuilder.java:31)
        at org.apache.tuscany.core.builder.impl.AssemblyVisitor.visit(
AssemblyVisitor.java:57)
        at
org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl.accept(
AssemblyModelObjectImpl.java:43)
        at org.apache.tuscany.model.assembly.impl.ExtensibleImpl.accept(
ExtensibleImpl.java:81)
        at org.apache.tuscany.model.assembly.impl.EntryPointImpl.accept(
EntryPointImpl.java:127)
        at
org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl.accept(
AssemblyModelObjectImpl.java:55)
        at org.apache.tuscany.model.assembly.impl.AggregateImpl.accept(
AggregateImpl.java:296)
        at org.apache.tuscany.model.assembly.impl.ModuleImpl.accept(
ModuleImpl.java:229)
        at org.apache.tuscany.model.assembly.impl.ComponentImpl.accept(
ComponentImpl.java:215)
        at org.apache.tuscany.core.builder.impl.AssemblyVisitor.start(
AssemblyVisitor.java:49)
        at org.apache.tuscany.core.runtime.RuntimeContextImpl.build(
RuntimeContextImpl.java:227)
        at
org.apache.tuscany.core.context.impl.AbstractAggregateContext.registerModelObject
(AbstractAggregateContext.java:272)
        at org.apache.tuscany.tomcat.TuscanyContextListener.startContext(
TuscanyContextListener.java:96)
        at org.apache.tuscany.tomcat.TuscanyContextListener.lifecycleEvent(
TuscanyContextListener.java:69)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
LifecycleSupport.java:119)
        at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4111)
        at org.apache.catalina.core.ContainerBase.addChildInternal(
ContainerBase.java:759)
        at org.apache.catalina.core.ContainerBase.addChild(
ContainerBase.java:739)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java
:524)
        at org.apache.tuscany.tomcat.TuscanyHost.addChild(TuscanyHost.java
:149)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java
:804)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java
:693)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java
:472)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java
:1118)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(
HostConfig.java:310)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
:1020)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java
:718)
        at org.apache.tuscany.tomcat.TuscanyHost.start(TuscanyHost.java:75)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
:1012)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java
:442)
        at org.apache.catalina.core.StandardService.start(
StandardService.java:450)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java
:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

On 3/6/06, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
>
> ant elder wrote:
> > I'm messing about trying to add a new binding to Tuscany but can't get
> it to
> > work. There must be something I'm missing to register the new binding
> SCDL
> > as all I get is the exception below saying "Feature 'binding.ajax' not
> > found". Could  someone have a quick look if its something obvious? The
> > code's up at
> http://svn.apache.org/repos/asf/incubator/tuscany/sandbox/ant/,
> > the AJAXAssemblyLoaderTestCase shows the problem.
> >
> > Thanks,
> >
> >    ...ant
> >
> > java.lang.RuntimeException:
> >
> file:/C:/SCA/SVN/WORK/sca/binding.ajax/bin/org/apache/tuscany/binding/ajax/assembly/tests/sca.module
> >     at
> org.apache.tuscany.model.scdl.loader.impl.SCDLXMLReader.getRootObject
> > (SCDLXMLReader.java:103)
> >     at org.apache.tuscany.model.scdl.loader.impl.SCDLXMLReader.getModule
> (
> > SCDLXMLReader.java:61)
> >     at
> >
> org.apache.tuscany.model.scdl.loader.impl.SCDLAssemblyModelLoaderImpl.loadModule
> > (SCDLAssemblyModelLoaderImpl.java:101)
> >     at
> >
> org.apache.tuscany.binding.ajax.assembly.tests.AJAXAssemblyLoaderTestCase.testLoader
> > (AJAXAssemblyLoaderTestCase.java:63)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >     at java.lang.reflect.Method.invoke(Unknown Source)
> >     at junit.framework.TestCase.runTest(TestCase.java:154)
> >     at junit.framework.TestCase.runBare(TestCase.java:127)
> >     at junit.framework.TestResult$1.protect(TestResult.java:106)
> >     at junit.framework.TestResult.runProtected(TestResult.java:124)
> >     at junit.framework.TestResult.run(TestResult.java:109)
> >     at junit.framework.TestCase.run(TestCase.java:118)
> >     at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >     at junit.framework.TestSuite.run(TestSuite.java:203)
> >     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> > RemoteTestRunner.java:478)
> >     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> > RemoteTestRunner.java:344)
> >     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> > RemoteTestRunner.java:196)
> > Caused by:
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException:Feature '
> > binding.ajax' not found. (http:///temp.xml, 23, 24)
> >     at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java
> :283)
> >     at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(
> > XMLResourceImpl.java:646)
> >     at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(
> > XMLResourceImpl.java:614)
> >     at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
> > XMLDocumentImpl.java:246)
> >     at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
> > XMLDocumentImpl.java:225)
> >     at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(
> XMLHelperImpl.java
> > :72)
> >     at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(
> XMLHelperImpl.java
> > :66)
> >     at
> org.apache.tuscany.model.scdl.loader.impl.SCDLXMLReader.getRootObject
> > (SCDLXMLReader.java:100)
> >     ... 18 more
> >
> >
> Ant,
>
> Good news, I took a look at your AJAX binding in your sandbox and was
> able to get your test case working... You just had a few minor problems
> in your XSD, missing a namespace prefix declaration, and some left-over
> references to axis2.
>
> I am committing the fixes for you. Here are the details:
> - In sca-binding-ajax.xsd, removed the <include
> location="sca-core.xsd"/> which actually included a copy of the whole
> SCDL schema in your Ajax binding namespace. This is not necessary,
> instead the base SCDL XSD needs to be correctly imported so that your
> AJAXBinding can extend the correct base SCDL Binding type.
> - Fixed the location attribute in the <import location="....
> sca-core.xsd"> to a correct relative location pointing to sca-core.xsd
> in the java/sca/model project from your sandbox/ant/binding.ajax.
> - In sca.module, added an ajax namespace prefix declaration for your
> Ajax binding namespace and changed <binding.ajax/> to <ajax:binding.ajax
> />.
> - Changed the left over references to axis2 to ajax in sca.module and
> the test case itself.
>
> Hope this helps...
>
> --
> Jean-Sebastien
>
>

Reply via email to