[JIRA] Commented: (HUDSON-2259) StringIndexOutOfBoundsException when deploying webapp to Tomcat from slave

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-2259) StringIndexOutOfBoundsException when deploying webapp to Tomcat from slave

Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139329#action_139329 ]

user57 commented on HUDSON-2259:
--------------------------------

Appears any attempt to use Ant on a remote node via hudson's remoting will fail.  I just ran into the same problem, only I was executing groovy, and using an AntBuilder. You can see the same thing with the slave's script console:

{noformat}
new AntBuilder().echo("hi")
{noformat}

Pukes up:

{noformat}
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1937)
        at org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:122)
        at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
        at org.apache.tools.ant.Project.setAntLib(Project.java:313)
        at org.apache.tools.ant.Project.initProperties(Project.java:309)
        at org.apache.tools.ant.Project.init(Project.java:295)
        at groovy.util.AntBuilder.createProject(AntBuilder.java:140)
        at groovy.util.AntBuilder.<init>(AntBuilder.java:69)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:70)
        at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:55)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:191)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:195)
        at Script1.run(Script1.groovy:1)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:561)
        at groovy.lang.GroovyShell.evaluate(GroovyShell.java:536)
        at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:123)
        at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:101)
        at hudson.remoting.UserRequest.perform(UserRequest.java:104)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:236)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
{noformat}

The same groovy code executes fine using the Master's script console.

No clue if this works with the winstone container asis.

The above was tested on a stock hudson.war deployed into Jetty 6.1.8.  I have been able to get this to work better using Jetty 7.0.1... not sure why...

> StringIndexOutOfBoundsException when deploying webapp to Tomcat from slave
> --------------------------------------------------------------------------
>
>                 Key: HUDSON-2259
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-2259
>             Project: Hudson
>          Issue Type: Bug
>          Components: deploy
>    Affects Versions: current
>         Environment: Platform: All, OS: All
>            Reporter: dsheth
>
> When attempting to deploy a war to Tomcat, everything works fine from the
> Master.  However, if a Slave attempts the same task, the following error is
> received:
> FATAL: String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> at java.lang.String.substring(String.java:1938)
> at org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:122)
> at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
> at org.apache.tools.ant.Project.setAntLib(Project.java:313)
> at org.apache.tools.ant.Project.initProperties(Project.java:309)
> at org.apache.tools.ant.Project.init(Project.java:295)
> at org.codehaus.cargo.util.AntUtils.createProject(AntUtils.java:149)
> at org.codehaus.cargo.util.AntUtils.<init>(AntUtils.java:55)
> at org.codehaus.cargo.util.DefaultFileHandler.<init>(DefaultFileHandler.java:75)
> at
> org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory.<init>(DefaultConfigurationFactory.java:47)
> at
> hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:52)
> at
> hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:46)
> at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1176)
> at hudson.remoting.UserRequest.perform(UserRequest.java:69)
> at hudson.remoting.UserRequest.perform(UserRequest.java:23)
> at hudson.remoting.Request$2.run(Request.java:213)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]