JBoss Community

Minor issue with ESB 4.10 and HttpGateway

created by Chua Khoon Yong in JBoss ESB Development - View the full discussion

hi,

 

I was porting my project from ESB 4.9 to 4.10, and encountered the following minor issue.

 

To simulate the issue, in the "http_gateway" sample code, i did this change to the "build.xml" file:

 

*** original

<project name="Quickstart_http_gateway" default="run" basedir=".">

*** new

<project name="abc" default="run" basedir=".">

 

After i built and deploy this project, and i saw this error message in the jboss 4.2.3 AS

 

2011-08-03 17:01:51,075 WARN  [org.jboss.system.ServiceController] Problem creating service jboss.esb:deployment=abc.esb

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

    at java.lang.String.substring(String.java:1937)

    at org.jboss.internal.soa.esb.listeners.war.HttpGatewayDeploymentFactory.addEndpointAddress(HttpGatewayDeploymentFactory.java:89)

    at org.jboss.internal.soa.esb.listeners.war.HttpGatewayDeploymentFactory.updateWebModel(HttpGatewayDeploymentFactory.java:75)

    at org.jboss.soa.esb.listeners.config.ModelUtil.updateWebModel(ModelUtil.java:97)

    at org.jboss.soa.esb.listeners.config.WebGatewayBuilder.build(WebGatewayBuilder.java:115)

    at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.createService(JBoss4ESBDeployment.java:196)

:

:

 

It seems that the cause is because i changed the project name to a 3 letter word "abc".  It so happens that my project name is just 3 letter words :(

 

 

The line of code that cause the issue is at

at org.jboss.internal.soa.esb.listeners.war.HttpGatewayDeploymentFactory.addEndpointAddress(HttpGatewayDeploymentFactory.java:89)

 

    path = path.substring(0, path.length() - 4) + urlMapping; // remove ".war" and add urlMapping

 

 

So, for temporary workaround, i change my project name to 4 letter word.

Hope you could fix it, because the project name is also part of the http url that invoke this service.

Thank you.

Reply to this message by going to Community

Start a new discussion in JBoss ESB Development at Community