You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Hai-Dang Pham <hd...@gmail.com> on 2009/12/07 20:09:23 UTC

Geronimo-Tuscany sample app issue

Hi,

   I am trying to deploy the sample app found in the latest Geronimo-Tuscany
plugin project (sample app helloworld-web).  And I have encountered a
ContributionException: java.lang.StringIndexOutOfBoundsException: String
index out of range: -1 exception (full stack trace found can be found
below).

With bit of digging I found a JIRA task (TUSCANY-3165) describing this issue
and hinting of a temporary workaround for it with Geronimo.  Would somebody
know what this workaround is and share it with me? 
(I am running in a Windows environment).

Tx,

Hai-Dang



Inside TuscanyModuleBuilderExtension.createModule
test/helloworld-web/1.0/car
Inside TuscanyModuleBuilderExtension.installModule
test/helloworld-web/1.0/car
Inside TuscanyModuleBuilderExtension.initContext test/helloworld-web/1.0/car
Inside TuscanyModuleBuilderExtension.addGBeans test/helloworld-web/1.0/car
Inside TuscanyModuleBuilderExtension.handleWebModule
org.apache.tuscany.sca.contribution.service.ContributionException:
java.lang.StringIndexOutOfBoundsException: String ind
ex out of range: -1
        at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceI
mpl.java:421)
        at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.j
ava:198)
        at
org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.handleWebModule(TuscanyModuleBuilderExtension.java:
257)
        at
org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.addGBeans(TuscanyModuleBuilderExtension.java:138)
        at
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:497)
        at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
        at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
        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:597)
        at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
        at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
        at
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: -1
        at java.lang.String.substring(String.java:1931)
        at java.lang.String.substring(String.java:1904)
        at org.apache.openejb.config.WebModule.<init>(WebModule.java:51)
        at
org.apache.openejb.config.DeploymentLoader.createWebModule(DeploymentLoader.java:544)
        at
org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:445)
        at
org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:154)
        at
org.apache.tuscany.sca.contribution.jee.JavaEEModuleHelper.getMetadataCompleteModules(JavaEEModuleHelper.java
:42)
        at
org.apache.tuscany.sca.contribution.jee.impl.JavaEEIntrospectorImpl.introspectWebArchive(JavaEEIntrospectorIm
pl.java:81)
        at
org.apache.tuscany.sca.contribution.jee.impl.WebArchiveProcessor.read(WebArchiveProcessor.java:46)
        at
org.apache.tuscany.sca.contribution.jee.impl.WebArchiveProcessor.read(WebArchiveProcessor.java:34)
        at
org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint$LazyURLArtifactProces
sor.read(DefaultURLArtifactProcessorExtensionPoint.java:222)
        at
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.read(ExtensibleURLArtifactProces
sor.java:96)
        at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processReadPhase(ContributionService
Impl.java:541)
        at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceI
mpl.java:419)
        ... 19 more
java.lang.NullPointerException
        at
org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.handleWebModule(TuscanyModuleBuilderExtension.java:
263)
        at
org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.addGBeans(TuscanyModuleBuilderExtension.java:138)
        at
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:497)
        at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
        at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
        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:597)
        at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
        at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
        at
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
        at java.lang.Thread.run(Thread.java:619)
SCA component name for web module is null
2009-12-07 14:03:03,636 INFO  [SupportedModesServiceImpl] Portlet mode
'edit' not found for portletId: '/plugin.Deployme
nt!227983155|0'
-- 
View this message in context: http://old.nabble.com/Geronimo-Tuscany-sample-app-issue-tp26682417s134p26682417.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Geronimo-Tuscany sample app issue

Posted by Kevan Miller <ke...@gmail.com>.
On Dec 8, 2009, at 1:14 PM, Jay D. McHugh wrote:

> Hello Hai-Dang,
> 
> It looks like the workaround that they were referring to was to simply
> bypass the test that failed in Tuscany.
> 
> You would probably be able to get more help on this from the Tuscany
> mailing lists.  But, apparently, the issue has to do with the version of
> OpenEJB that Tuscany is using.  That is - If I am reading the JIRA
> comments correctly.

In the middle of the Jira discussion, there's a short comment about an OpenEJB fix -- https://issues.apache.org/jira/browse/OPENEJB-1005

IIUC, the fix is in OpenEJB 3.0.2-SNAPSHOT (has not been released) or OpenEJB 3.1.x (which is included in Geronimo 2.2). There was some discussion of getting a 3.0.2 release out, but looks like it never happened. 

You should be able to patch 3.0.1 with the change. Getting an OpenEJB 3.0.2 release would be a good idea. I don't know that anybody has run Tuscany within Geronimo 2.2.

--kevan

Re: Geronimo-Tuscany sample app issue

Posted by "Jay D. McHugh" <ja...@gmail.com>.
Hello Hai-Dang,

It looks like the workaround that they were referring to was to simply
bypass the test that failed in Tuscany.

You would probably be able to get more help on this from the Tuscany
mailing lists.  But, apparently, the issue has to do with the version of
OpenEJB that Tuscany is using.  That is - If I am reading the JIRA
comments correctly.

If they point you back here - let us know,

Jay

Hai-Dang Pham wrote:
> Hi,
> 
>    I am trying to deploy the sample app found in the latest Geronimo-Tuscany
> plugin project (sample app helloworld-web).  And I have encountered a
> ContributionException: java.lang.StringIndexOutOfBoundsException: String
> index out of range: -1 exception (full stack trace found can be found
> below).
> 
> With bit of digging I found a JIRA task (TUSCANY-3165) describing this issue
> and hinting of a temporary workaround for it with Geronimo.  Would somebody
> know what this workaround is and share it with me? 
> (I am running in a Windows environment).
> 
> Tx,
> 
> Hai-Dang
> 
> 
> 
> Inside TuscanyModuleBuilderExtension.createModule
> test/helloworld-web/1.0/car
> Inside TuscanyModuleBuilderExtension.installModule
> test/helloworld-web/1.0/car
> Inside TuscanyModuleBuilderExtension.initContext test/helloworld-web/1.0/car
> Inside TuscanyModuleBuilderExtension.addGBeans test/helloworld-web/1.0/car
> Inside TuscanyModuleBuilderExtension.handleWebModule
> org.apache.tuscany.sca.contribution.service.ContributionException:
> java.lang.StringIndexOutOfBoundsException: String ind
> ex out of range: -1
>         at
> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceI
> mpl.java:421)
>         at
> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.j
> ava:198)
>         at
> org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.handleWebModule(TuscanyModuleBuilderExtension.java:
> 257)
>         at
> org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.addGBeans(TuscanyModuleBuilderExtension.java:138)
>         at
> org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:497)
>         at
> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
>         at
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
>         at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
>         at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
>         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:597)
>         at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>         at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>         at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>         at
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
>         at
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
> range: -1
>         at java.lang.String.substring(String.java:1931)
>         at java.lang.String.substring(String.java:1904)
>         at org.apache.openejb.config.WebModule.<init>(WebModule.java:51)
>         at
> org.apache.openejb.config.DeploymentLoader.createWebModule(DeploymentLoader.java:544)
>         at
> org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:445)
>         at
> org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:154)
>         at
> org.apache.tuscany.sca.contribution.jee.JavaEEModuleHelper.getMetadataCompleteModules(JavaEEModuleHelper.java
> :42)
>         at
> org.apache.tuscany.sca.contribution.jee.impl.JavaEEIntrospectorImpl.introspectWebArchive(JavaEEIntrospectorIm
> pl.java:81)
>         at
> org.apache.tuscany.sca.contribution.jee.impl.WebArchiveProcessor.read(WebArchiveProcessor.java:46)
>         at
> org.apache.tuscany.sca.contribution.jee.impl.WebArchiveProcessor.read(WebArchiveProcessor.java:34)
>         at
> org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint$LazyURLArtifactProces
> sor.read(DefaultURLArtifactProcessorExtensionPoint.java:222)
>         at
> org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.read(ExtensibleURLArtifactProces
> sor.java:96)
>         at
> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processReadPhase(ContributionService
> Impl.java:541)
>         at
> org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceI
> mpl.java:419)
>         ... 19 more
> java.lang.NullPointerException
>         at
> org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.handleWebModule(TuscanyModuleBuilderExtension.java:
> 263)
>         at
> org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.addGBeans(TuscanyModuleBuilderExtension.java:138)
>         at
> org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:497)
>         at
> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
>         at
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
>         at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
>         at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
>         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:597)
>         at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>         at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>         at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>         at
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
>         at
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
>         at java.lang.Thread.run(Thread.java:619)
> SCA component name for web module is null
> 2009-12-07 14:03:03,636 INFO  [SupportedModesServiceImpl] Portlet mode
> 'edit' not found for portletId: '/plugin.Deployme
> nt!227983155|0'