org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'dataSource.jee': Invocation of init method failed; nested exception is org.springframework.jndi.TypeMismatchNamingException: Object of type [class weblogic.jdbc.common.internal.RmiDataSource_1031_WLStub] available at JNDI location [XXXDS] is not assignable to [javax.sql.DataSource]

Samebug tips3

Spring Security detects beans in the root context. Move the detection of the bean (or declare it explictly) in the root context.

Mixed JpaTransactionManager with JTA transaction type in the beans.xml and persistence.xml

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web19462

  • Error creating bean with name 'dataSource.jee': Invocation of init method failed; nested exception is org.springframework.jndi.TypeMismatchNamingException: Object of type [class weblogic.jdbc.common.internal.RmiDataSource_1031_WLStub] available at JNDI location [XXXDS] is not assignable to [javax.sql.DataSource]
  • Error creating bean with name 'EventQueueFactory1': Invocation of init method failed; nested exception is org.springframework.jndi.TypeMismatchNamingException: Object of type [class com.ibm.mq.connector.outbound.ConnectionFactoryImpl] available at JNDI location [EventQueueFactory1] is not assignable to [javax.jms.QueueConnectionFactory]
  • Error creating bean with name 'txManager' defined in class path resource [xxx-spring-context.xml]: Invocation of init method failed; nested exception is org.springframework.transaction.TransactionSystemException: JTA UserTransaction is not available
  • Stack trace

    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource.jee': Invocation of init method failed; nested exception is org.springframework.jndi.TypeMismatchNamingException: Object of type [class weblogic.jdbc.common.internal.RmiDataSource_1031_WLStub] available at JNDI location [XXXDS] is not assignable to [javax.sql.DataSource] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    34 times, 10 months ago
    9 times, 11 months ago
    2 times, 11 months ago
    4 times, 1 year ago
    5 times, 1 year ago
    146 more bugmates