• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Not Intializing Spring beans on Server start-up

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.BeanCreationException: 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.BeanCreationException: 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.BeanInstantiationException: Could not instantiate bean class [com.uhg.rxsol.services.rxclaim.service.RxMemberServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(AccessController.java:224)
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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
... 40 more
Caused by: org.springframework.beans.factory.BeanCreationException: 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.BeanInstantiationException: Could not instantiate bean class [com.uhg.rxsol.services.rxclaim.service.RxMemberServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(AccessController.java:224)
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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
... 53 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.uhg.rxsol.services.rxclaim.service.RxMemberServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
... 64 more
Caused by: java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:167)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:167)
at org.springframework.ws.client.core.support.WebServiceGatewaySupport.<init>(WebServiceGatewaySupport.java:65)
at com.uhg.rxsol.services.rxclaim.service.webservice.common.RxWebServiceClient.<init>(RxWebServiceClient.java:31)
at com.uhg.rxsol.services.rxclaim.service.webservice.common.RxSXCWebServiceClient.<init>(RxSXCWebServiceClient.java:31)
at com.uhg.rxsol.services.rxclaim.service.RxMemberServiceImpl.<init>(RxMemberServiceImpl.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:45)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 66 more
Caused by: java.lang.ClassCastException: com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryImpl incompatible with javax.xml.transform.TransformerFactory
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
at org.springframework.xml.transform.TransformerObjectSupport.<clinit>(TransformerObjectSupport.java:43)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java: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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Caused by: java.lang.ClassCastException: com.ibm.xtq.xslt.jaxp.compiler.TransformerFactoryImpl incompatible with javax.xml.transform.TransformerFactory

Thats your root problem.

Bummer you ahve to use WebSphere, but that is what IBM does, it couples to all IBM and IBM doesn't ever want to play nice with anyone else. ;)

So it looks like they have a TransformerFactoryImpl that is implementing a TransformerFactory interface from a different version.

I mean a TransformerFactoryImpl looks like it should be implementing the TransformerFactory interface. And it probably does. But in your classpath you might have version xxx.x of the TransformerFactory interface, but ibm's Impl is implementing version yyy.y of the Transformer interface.

I can't help much more after that. Sorry, I avoid IBM especially WebSphere. I run far into the hills. ;)

Mark
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ditto to what Mark said unfortunately I am unable to avoid IBM 100% of the time

Anyway you can try to change the classloader configuration in websphere to Parent last, otherwise you will start having to get a bit more creative if that does not work.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic