title: cannot initialize spring context due to "Error creating bean with name.." error
body: <p>My spring application is running on jboss 4.2.3, when I start the application server deployment of My application failed. 
  I have already run this application on some other computer. what seems to be diffrent is that;</p>
  
  <p><strong>When I list the files there is a dot preceding the permission columns, however on the former 
  computer I dont see any dot in the permission columns.</strong></p>
  
  <p>the bean definition is as follows;</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:jee="http://www.springframework.org/schema/jee"
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
          http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd"&gt;
  
  
  
          &lt;!-- Service --&gt;
          &lt;bean id="campaignCatalogService" class="com.commonutil.utils.CometCommonManager" factory-method="getCampaignCatalogService"/&gt;
  
          &lt;bean id="campaignPropertyService" class="com.commonutil.utils.CometCommonManager" factory-method="getCampaignPropertyService"/&gt;
  
          &lt;bean id="comboBoxOptionService" class="com.commonutil.utils.CometCommonManager" factory-method="getComboBoxOptionService"/&gt;
  
          &lt;bean id="workspaceService" class="com.commonutil.utils.CometCommonManager" factory-method="getWorkspaceService"/&gt;
  
          &lt;bean id="campaignGroupPropertyService" class="com.commonutil.utils.CometCommonManager" factory-method="getCampaignGroupPropertyService"/&gt;
  
          &lt;bean id="campaignDefinitionService" class="com.commonutil.utils.CometCommonManager" factory-method="getCampaignDefinitionService"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>the error log is as follows;</p>
  
  <pre><code>05-27@13:57 26 ERROR (ContextLoader.java:215)     - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'campaignDefinitionService' defined in ServletContext resource [/WEB-INF/applicationContext-core.xml]: Initialization of bean failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: 10
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
  at java.security.AccessController.doPrivileged(Native Method)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
  at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
  at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
  at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
  at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
  at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
  at org.jboss.web.WebModule.startModule(WebModule.java:83)
  at org.jboss.web.WebModule.startService(WebModule.java:61)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at sun.proxy.$Proxy0.start(Unknown Source)
  at org.jboss.system.ServiceController.start(ServiceController.java:417)
  at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at sun.proxy.$Proxy45.start(Unknown Source)
  at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
  at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
  at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
  at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
  at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at sun.proxy.$Proxy46.start(Unknown Source)
  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at sun.proxy.$Proxy10.deploy(Unknown Source)
  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at sun.proxy.$Proxy0.start(Unknown Source)
  at org.jboss.system.ServiceController.start(ServiceController.java:417)
  at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at sun.proxy.$Proxy4.start(Unknown Source)
  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at sun.proxy.$Proxy5.deploy(Unknown Source)
  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
  at org.jboss.Main.boot(Main.java:200)
  at org.jboss.Main$1.run(Main.java:508)
  at java.lang.Thread.run(Thread.java:679)
  Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 10
  at java.lang.String.charAt(String.java:694)
  at org.jboss.web.tomcat.service.WebAppClassLoader.findClass(WebAppClassLoader.java:81)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:266)
  at org.aspectj.weaver.reflect.ReflectionBasedReferenceTypeDelegateFactory.createDelegate(ReflectionBasedReferenceTypeDelegateFactory.java:40)
  at org.aspectj.weaver.reflect.ReflectionWorld.resolveDelegate(ReflectionWorld.java:111)
  at org.aspectj.weaver.World.resolveToReferenceType(World.java:363)
  at org.aspectj.weaver.World.resolve(World.java:258)
  at org.aspectj.weaver.ResolvedType.getDeclaringType(ResolvedType.java:1336)
  at org.aspectj.weaver.patterns.WithinPointcut.isWithinType(WithinPointcut.java:50)
  at org.aspectj.weaver.patterns.WithinPointcut.fastMatch(WithinPointcut.java:67)
  at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.couldMatchJoinPointsInType(PointcutExpressionImpl.java:78)
  at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:234)
  at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:198)
  at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:253)
  at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:287)
  at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:113)
  at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:85)
  at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:66)
  at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:345)
  at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:309)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:361)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1342)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
  ... 149 more
  05-27@13:57 26 ERROR (Discovery.java:410)     - failed sending discovery request java.lang.NullPointerException
  at org.apache.log4j.Category.isEnabledFor(Category.java:749)
  at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogger.java:333)
  at org.jgroups.protocols.TP.down(TP.java:1167)
  at org.jgroups.protocols.PING.sendMcastDiscoveryRequest(PING.java:278)
  at org.jgroups.protocols.PING.sendGetMembersRequest(PING.java:259)
  at org.jgroups.protocols.Discovery$PingSenderTask$1.run(Discovery.java:406)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:679)
  </code></pre>