-
Apr 12th, 2012, 08:38 AM
#1
Not Intializing Spring beans on Server start-up
Hi ,
We are using MyEclipse Blue 10.1 IDE and Websphere 7 as a server to deploy our application. Our application contains Spring & Hibernate. I have configured the server into MyEclipse and running in Debug Mode. We are getting below ecxeptions while server start-up. It seems that its not able to initialize Spring beans.
But when I run the server in Running Mode application is working fine.
Exception:
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'rxCaregiverService' defined in ServletContext resource [/WEB-INF/context/service-provider-beans.xml]: Cannot resolve reference to bean 'rxMemberService' while setting bean property 'claimsMemberService'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'rxMemberService' defined in ServletContext resource [/WEB-INF/context/service-provider-beans.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [com.uhg.rxsol.services.rxclaim.service.RxMemberSer viceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Access Controller.java:224)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:269)
... 40 more
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'rxMemberService' defined in ServletContext resource [/WEB-INF/context/service-provider-beans.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [com.uhg.rxsol.services.rxclaim.service.RxMemberSer viceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:883)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:839)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Access Controller.java:224)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:269)
... 53 more
Caused by: org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [com.uhg.rxsol.services.rxclaim.service.RxMemberSer viceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:61)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:877)
... 64 more
Caused by: java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:222)
at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:167)
at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:167)
at org.springframework.ws.client.core.support.WebServ iceGatewaySupport.<init>(WebServiceGatewaySupport. java:65)
at com.uhg.rxsol.services.rxclaim.service.webservice. common.RxWebServiceClient.<init>(RxWebServiceClien t.java:31)
at com.uhg.rxsol.services.rxclaim.service.webservice. common.RxSXCWebServiceClient.<init>(RxSXCWebServic eClient.java:31)
at com.uhg.rxsol.services.rxclaim.service.RxMemberSer viceImpl.<init>(RxMemberServiceImpl.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:45)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:515)
at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:100)
... 66 more
Caused by: java.lang.ClassCastException: com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryI mpl incompatible with javax.xml.transform.TransformerFactory
at javax.xml.transform.TransformerFactory.newInstance (Unknown Source)
at org.springframework.xml.transform.TransformerObjec tSupport.<clinit>(TransformerObjectSupport.java:43 )
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:200)
... 77 more
-------------------------------------------------------------------------------------
Is websphere uses different Jars in Debug mode ?
Can anyone please look into this issue and help me.
Thanks In Advance,
Nagendra
-
Jul 16th, 2012, 11:35 AM
#2
Problem has been resolved. It was an issue with TransformerFactory class/interface. This class is causing ClassCastException as it is refering two jar files [ xml.jar which is from websphere7, thirdparty-combined.jar ].
So I have removed TransformerFactory class from thirdparty-combined.jar file.
Thanks for your help.

Originally Posted by
pnknaga
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules