aspose file tools*
The moose likes Spring and the fly likes Error while executing simple application with jdk1.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Error while executing simple application with jdk1.5" Watch "Error while executing simple application with jdk1.5" New topic
Author

Error while executing simple application with jdk1.5

Joy Vergis
Ranch Hand

Joined: Sep 14, 2009
Posts: 45
Why I get the error(at the bottom) when i try to execute the Main class with jdk1.5 and no error occurs(executes successfully) when executing with jdk1.6. What steps have to be added to make this work with jdk1.5

Hello.java


main.java




Context.xml






Error displayed when executed with jdk1.5


INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@df8f5e: defining beans [hello]; root of factory hierarchy
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hello' defined in class path resource [context.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: java.lang.Class.isMemberClass()Z
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
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:222)
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:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at Main.main(Main.java:13)
Caused by: java.lang.NoSuchMethodError: java.lang.Class.isMemberClass()Z
at org.springframework.core.GenericTypeResolver.getTypeVariableMap(GenericTypeResolver.java:168)
at org.springframework.core.GenericTypeResolver.resolveParameterType(GenericTypeResolver.java:81)
at org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodParameter(GenericTypeAwarePropertyDescriptor.java:109)
at org.springframework.beans.GenericTypeAwarePropertyDescriptor.getPropertyType(GenericTypeAwarePropertyDescriptor.java:91)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
... 14 more
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 605

Are you sure you got JDK 1.5? The Class.isMemberClass() is only available since JDK 1.5 ...


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Miku Ranjan
Ranch Hand

Joined: Oct 11, 2011
Posts: 98
Hi,
Are you sure you are using separate compiled classes for each version when testing.
 
 
subject: Error while executing simple application with jdk1.5