From: Andrew - D. <at....@ds...> - 2004-06-06 21:50:06
|
2004-06-06 22:34:15,379 WARN [org.springframework.rcp.application.startup.ApplicationLauncher] - <Exception occured initializing context.> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'application' defined in class path resource [org/ats/hrm/application-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.rcp.application.Application]; constructor threw exception; nested exception is java.lang.IllegalArgumentException: The labeled object's label must be configured. org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.rcp.application.Application]; constructor threw exception; nested exception is java.lang.IllegalArgumentException: The labeled object's label must be configured. java.lang.IllegalArgumentException: The labeled object's label must be configured. at org.springframework.util.Assert.notNull(Assert.java:176) at org.springframework.rcp.core.LabeledObjectSupport.getDisplayName(LabeledObjectSupport.java:99) at org.springframework.rcp.application.Application.setApplicationInfo(Application.java:166) at org.springframework.rcp.application.Application.<init>(Application.java:140) 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:274) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:66) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:395) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:214) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:183) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68) at org.springframework.rcp.application.startup.ApplicationLauncher.launch(ApplicationLauncher.java:115) at org.springframework.rcp.application.startup.ApplicationLauncher.<init>(ApplicationLauncher.java:81) at org.ats.Start.main(HRM.java:14) On Sun, 2004-06-06 at 22:33, Keith Donald wrote: > Andrew, > > > > Can you post your stack trace? The definitive evidence that always > proves most helpful! > > > > Thanks, > > Keith > > > > > ______________________________________________________________________ > > From:spr...@li... > [mailto:spr...@li...] On Behalf > Of Andrew Todd > Sent: Sunday, June 06, 2004 5:10 PM > To: Spring Framework Rich Client Platform > Subject: [Springframework-rcp-dev] Dumb Question > > > > > Obviously this will be a dumb question, but I can't get the > message.properties file to be read, which causes the application NOT > to load - error about label required. > Now, I have my messages.properties file in the src directory > My application-context.xml has: > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" > "http://www.springframework.org/dtd/spring-beans.dtd"> > > <beans> > <bean id="application" > class="org.springframework.rcp.application.Application"> > <constructor-arg index="0"> > <ref bean="applicationInfo"/> > </constructor-arg> > </bean> > > <bean id="applicationInfo" > class="org.springframework.rcp.application.ApplicationInfo"> > <property name="version"><value>1.0</value></property> > <property name="buildId"><value>20040530001</value></property> > </bean> > > <bean id="messageSource" > > class="org.springframework.context.support.ResourceBundleMessageSource"> > <property name="basenames"> > <list> > <value>messages</value> > </list> > </property> > </bean> > </beans> > > My messages.properties file has: > applicationInfo.title=Test Application > applicationInfo.caption=Test Application Caption, Spring RCP > applicationInfo.description=Test Spring RCP > > And what happens is that the two properties in the application exist > fine, but the properties from messages.properties does not - obviously > a problem with the messageSource section of the application-context, > but what? > > My directory structure is: > /src > /src/messages.properties > /src/org/at/Start.java > /resources/application-context.xml > > > > Andrew > > > Andrew - DEV |