Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2, 1.3, nightly
-
None
Description
When hot-updating an .aar named "west-ws-1.0.aar" Axis2 throws an exception:
INFO: org.apache.axis2.deployment.DeploymentException: The west-ws-1 service group name is not valid.
If I copy the file into the services directory and (re)start Tomcat, the service group is correctly deployed. In the admin interface the service group shows up as "west-ws-1.0". The problem with the hot update appears to be caused by getAxisServiceName() in modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java:
/**
- Retrieves service name from the archive file name.
- If the archive file name is service1.aar , then axis2 service name would be service1
* - @param fileName the archive file name
- @return Returns String.
*/
public static String getAxisServiceName(String fileName) {
char seperator = '.';
String value;
int index = fileName.indexOf(seperator);
if (index > 0)
{ value = fileName.substring(0, index); return value; } return fileName;
}
If the line
int index = fileName.indexOf(seperator);
would read
int index = fileName.lastIndexOf(seperator);
that code would be a lot better.