I think you need to add spring-binding.jar to your classpath.

Hope this helps,

Peter

2007/3/4, johnklein smith <[EMAIL PROTECTED]>:

Hi,

I'm writing a simple spring-rc app. I've copied the basic skeleton from
petclinic and I removed lines that are not necessary for my project. As for
my richclient-application-context.xml,
I customised the applicationServices to have empty properties:

<bean id="applicationServices"
        class="
org.springframework.richclient.application.support.DefaultApplicationServices
">
</bean>

It throws NoClassDefFoundError. By looking at the stack trace, it seems
that 116 is the offending line. I have commons-logging-1.0.4.jar as part
of my classpath.
The line at 116 is:

private static final Log logger = LogFactory.getLog(
DefaultApplicationServices.class );

If it can't find commons-logging, the error shouldn't have stepped into
creating a logger instance. Also, my spring-rc jar files were built from the
source zip ( spring-richclient-full-0.2.1.zip) that came with the entire
spring-rc project.

Below is my stacktrace:
...
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'serviceLocator' defined in class path resource
[net/mycompany/myapp/ui/ctx/richclient- application-context.xml]: Cannot
resolve reference to bean 'applicationServices' while setting bean property
'applicationServices'; nested exception is
org.springframework.beans.factory.BeanCreationException : Error creating
bean with name 'applicationServices' defined in class path resource
[net/mycompany/myapp/ui/ctx/richclient-application-context.xml]:
Instantiation of bean failed; nested exception is
java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'applicationServices' defined in class path resource
[net/mycompany/myapp/ui/ctx/richclient-application-context.xml ]:
Instantiation of bean failed; nested exception is
java.lang.NoClassDefFoundError
Caused by: java.lang.NoClassDefFoundError
        at
org.springframework.richclient.application.support.DefaultApplicationServices.class$(
DefaultApplicationServices.java:116)
        at
org.springframework.richclient.application.support.DefaultApplicationServices
.<clinit>(DefaultApplicationServices.java:948)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native
Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java :27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at org.springframework.beans.BeanUtils.instantiateClass(
BeanUtils.java:84)
        at org.springframework.beans.BeanUtils.instantiateClass (
BeanUtils.java:60)
        at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate
(SimpleInstantiationStrategy.java:45)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(
AbstractAutowireCapableBeanFactory.java:701)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance
(AbstractAutowireCapableBeanFactory.java:687)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(
AbstractAutowireCapableBeanFactory.java:388)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:250)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(
DefaultSingletonBeanRegistry.java:141)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:247)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:161)
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference
(BeanDefinitionValueResolver.java:245)
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(
BeanDefinitionValueResolver.java:124)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues
(AbstractAutowireCapableBeanFactory.java:1019)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(
AbstractAutowireCapableBeanFactory.java:809)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:425)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:250)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
(DefaultSingletonBeanRegistry.java:141)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:247)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:161)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(
AbstractAutowireCapableBeanFactory.java:341)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:250)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(
DefaultSingletonBeanRegistry.java:141)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:247)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:161)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType
(DefaultListableBeanFactory.java:236)
        at
org.springframework.context.support.AbstractApplicationContext.getBeansOfType(
AbstractApplicationContext.java:701)
        at
org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors
(AbstractApplicationContext.java:439)
        at
org.springframework.context.support.AbstractApplicationContext.refresh (
AbstractApplicationContext.java:331)
        at
org.springframework.richclient.application.ApplicationLauncher.loadRootApplicationContext
(ApplicationLauncher.java:150)
        at 
org.springframework.richclient.application.ApplicationLauncher.<init>(
ApplicationLauncher.java:102)
        at net.mycompany.myapp.ui.myappViewer.run(myappViewer.java:14)
        at net.mycompany.myapp.ui.myappViewer.main(myappViewer.java:21)
Caused by: java.lang.ClassNotFoundException :
org.springframework.binding.convert.ConversionService
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass (URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java :251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        ... 38 more
org.springframework.richclient.application.ApplicationException : Unable
to start rich client application
        at
org.springframework.richclient.application.ApplicationLauncher.loadRootApplicationContext
(ApplicationLauncher.java:158)
        at 
org.springframework.richclient.application.ApplicationLauncher.<init>(
ApplicationLauncher.java:102)
        at net.mycompany.myapp.ui.myappViewer.run(myappViewer.java:14)
        at net.mycompany.myapp.ui.myappViewer.main(myappViewer.java:21)
Caused by: org.springframework.beans.factory.BeanCreationException : Error
creating bean with name 'serviceLocator' defined in class path resource
[net/mycompany/myapp/ui/ctx/richclient-application-context.xml]: Cannot
resolve reference to bean 'applicationServices' while setting bean property
'applicationServices'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'applicationServices' defined in class path resource
[net/mycompany/myapp/ui/ctx/richclient-application-context.xml]:
Instantiation of bean failed; nested exception is
java.lang.NoClassDefFoundError
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference
(BeanDefinitionValueResolver.java:253)
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(
BeanDefinitionValueResolver.java:124)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues
(AbstractAutowireCapableBeanFactory.java:1019)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(
AbstractAutowireCapableBeanFactory.java:809)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:425)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:250)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
(DefaultSingletonBeanRegistry.java:141)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:247)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:161)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(
AbstractAutowireCapableBeanFactory.java:341)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:250)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(
DefaultSingletonBeanRegistry.java:141)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:247)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:161)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType
(DefaultListableBeanFactory.java:236)
        at
org.springframework.context.support.AbstractApplicationContext.getBeansOfType(
AbstractApplicationContext.java:701)
        at
org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors
(AbstractApplicationContext.java:439)
        at
org.springframework.context.support.AbstractApplicationContext.refresh (
AbstractApplicationContext.java:331)
        at
org.springframework.richclient.application.ApplicationLauncher.loadRootApplicationContext
(ApplicationLauncher.java:150)
        ... 3 more
Caused by: org.springframework.beans.factory.BeanCreationException : Error
creating bean with name 'applicationServices' defined in class path resource
[net/mycompany/myapp/ui/ctx/richclient-application-context.xml]:
Instantiation of bean failed; nested exception is
java.lang.NoClassDefFoundError
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
(AbstractAutowireCapableBeanFactory.java:452)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
AbstractBeanFactory.java:250)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
(DefaultSingletonBeanRegistry.java:141)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean (
AbstractBeanFactory.java:247)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
AbstractBeanFactory.java:161)
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(
BeanDefinitionValueResolver.java:245)
        ... 21 more
Caused by: java.lang.NoClassDefFoundError
        at
org.springframework.richclient.application.support.DefaultApplicationServices.class$
(DefaultApplicationServices.java :116)
        at
org.springframework.richclient.application.support.DefaultApplicationServices
.<clinit>(DefaultApplicationServices.java:948)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at org.springframework.beans.BeanUtils.instantiateClass(
BeanUtils.java:84)
        at org.springframework.beans.BeanUtils.instantiateClass (
BeanUtils.java:60)
        at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate
(SimpleInstantiationStrategy.java:45)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(
AbstractAutowireCapableBeanFactory.java:701)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance
(AbstractAutowireCapableBeanFactory.java:687)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(
AbstractAutowireCapableBeanFactory.java:388)
        ... 26 more
Caused by: java.lang.ClassNotFoundException:
org.springframework.binding.convert.ConversionService
        at java.net.URLClassLoader$1.run(URLClassLoader.java :200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        ... 38 more


Any thanks is greatly appreciated.

Cheers

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
spring-rich-c-cvs mailing list
spring-rich-c-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
spring-rich-c-cvs mailing list
spring-rich-c-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs

Reply via email to