java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I have the flowing problem I am trying to use the hessian service exporter. If i have this config: <bean name="/connectionTester" class="org.springframework.remoting.caucho.HessianServiceExporter"> <property name="service"> <ref bean="connectionTesterServiceImpl" /> </property> <property name="serviceInterface"> <value> sample.ConnectionTesterService </value> </property> </bean> Note the value com.ConnectionTesterService inside the <value></value> tags is surrounded by white space. A results of my xml formatter... With this configuration i get the following error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/connectionTester' defined in resource [/WEB-INF/service-servlet.xml] of ServletContext: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.Class] for property 'serviceInterface'; nested exception is java.lang.IllegalArgumentException: Invalid class name: sample/ConnectionTesterService ] PropertyAccessExceptionsException (1 errors) org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.Class] for property 'serviceInterface'; nested exception is java.lang.IllegalArgumentException: Invalid class name: sample.ConnectionTesterService java.lang.IllegalArgumentException: Invalid class name: sample/ConnectionTesterService at org.springframework.beans.propertyeditors.ClassEditor.setAsText(ClassEditor.java:44) at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:837) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:673) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:588) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:720) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:747) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:736) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:840) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:236) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284) at org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:282) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:230) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:200) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:102) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) Basically it looks like this is trying to load the class using the whole string including the white space If i have this config... <bean name="/connectionTester" class="org.springframework.remoting.caucho.HessianServiceExporter"> <property name="service"> <ref bean="connectionTesterServiceImpl" /> </property> <property name="serviceInterface"> <value>sample.ConnectionTesterService</value> </property> </bean> It works fine... I think a simple solution to solve this is to use the trim() method of string...
    via by Peter Delahunty,
  • I have the flowing problem I am trying to use the hessian service exporter. If i have this config: <bean name="/connectionTester" class="org.springframework.remoting.caucho.HessianServiceExporter"> <property name="service"> <ref bean="connectionTesterServiceImpl" /> </property> <property name="serviceInterface"> <value> sample.ConnectionTesterService </value> </property> </bean> Note the value com.ConnectionTesterService inside the <value></value> tags is surrounded by white space. A results of my xml formatter... With this configuration i get the following error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/connectionTester' defined in resource [/WEB-INF/service-servlet.xml] of ServletContext: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.Class] for property 'serviceInterface'; nested exception is java.lang.IllegalArgumentException: Invalid class name: sample/ConnectionTesterService ] PropertyAccessExceptionsException (1 errors) org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.lang.Class] for property 'serviceInterface'; nested exception is java.lang.IllegalArgumentException: Invalid class name: sample.ConnectionTesterService java.lang.IllegalArgumentException: Invalid class name: sample/ConnectionTesterService at org.springframework.beans.propertyeditors.ClassEditor.setAsText(ClassEditor.java:44) at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:837) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:673) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:588) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:720) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:747) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:736) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:840) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:236) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284) at org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:282) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:230) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:200) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:102) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) Basically it looks like this is trying to load the class using the whole string including the white space If i have this config... <bean name="/connectionTester" class="org.springframework.remoting.caucho.HessianServiceExporter"> <property name="service"> <ref bean="connectionTesterServiceImpl" /> </property> <property name="serviceInterface"> <value>sample.ConnectionTesterService</value> </property> </bean> It works fine... I think a simple solution to solve this is to use the trim() method of string...
    via by Peter Delahunty,
  • Spring-Mvc - JdbcDaoSupport Error
    via Stack Overflow by devdar
    ,
  • Spring MVC with AspectJ ? - Spring Forum
    via by Unknown author,
    • java.lang.IllegalArgumentException: Invalid class name: sample/ConnectionTesterService at org.springframework.beans.propertyeditors.ClassEditor.setAsText(ClassEditor.java:44) at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:837) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:673) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:588) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:720) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:747) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:736) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:840) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:236) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284) at org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:282) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:230) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:200) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:102) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

    Users with the same issue

    Unknown visitor1 times, last one,
    tvrmsmith
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,