[jbossws-issues] [JBoss JIRA] Updated: (JBWS-2951) StringIndexOutOfBoundsException in JavaUtils#getPackageName()

Alessio Soldano (JIRA) jira-events at lists.jboss.org
Wed Mar 17 11:12:38 EDT 2010


     [ https://jira.jboss.org/jira/browse/JBWS-2951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessio Soldano updated JBWS-2951:
----------------------------------

    Fix Version/s: jbossws-cxf-3.3
                   jbossws-metro-3.3
                   jbossws-native-3.3
                       (was: jbossws-cxf-3.3.0.CR1)
                       (was: jbossws-metro-3.3.0.CR1)
                       (was: jbossws-native-3.3.0.CR1)


> StringIndexOutOfBoundsException in JavaUtils#getPackageName()
> -------------------------------------------------------------
>
>                 Key: JBWS-2951
>                 URL: https://jira.jboss.org/jira/browse/JBWS-2951
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-integration
>         Environment: EAP5
> Implementation-Title: JBoss Web Services - Common
> Implementation-Version: 1.1.0.SP2
>            Reporter: Ondrej Žižka
>            Assignee: Richard Opalka
>             Fix For: jbossws-cxf-3.3, jbossws-metro-3.3, jbossws-native-3.3
>
>         Attachments: HelloWS.war
>
>
> Deploying a class with no package causes String index out of range: -1 because of:
>       String fullName = clazz.getName();
>       return fullName.substring(0, fullName.lastIndexOf("."));
> BTW, why do we have a project-specific JavaUtils... these functionalities must have been coded milion times and with such cases handled.
> http://commons.apache.org/lang/api-release/org/apache/commons/lang/ClassUtils.html#getPackageName%28java.lang.Class%29
> ---------------------------------------------------------------------------
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1937)
>         at org.jboss.wsf.common.JavaUtils.getPackageName(JavaUtils.java:533)
>         at org.jboss.ws.metadata.wsdl.WSDLUtils.getTypeNamespace(WSDLUtils.java:700)
>         at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.processWebService(JAXWSWebServiceMetaDataBuilder.java:306)
>         at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:104)
>         at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
>         at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMetaData(JAXWSMetaDataBuilderJSE.java:61)
>         at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.start(UnifiedMetaDataDeploymentAspect.java:64)
>         at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:129)
>         at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:76)
>         at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:60)
>         at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
>         at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
>         ... 24 more

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

       



More information about the jbossws-issues mailing list