Mybatis中没有类型处理程序异常

时间:2013-10-09 13:41:24

标签: java weblogic mybatis weblogic-10.x typehandler

我的服务器 - > weblogic server 10.3和mybatis version-3.2.2

    org.springframework.beans.factory.BeanCreationException: Error creating bean with    name 'sqlSessionFactory' defined in class path resource [com/db/tf/interfaces/SpringIn
terfaceContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [com/db/tf/interfaces/sqlmaps/SqlMapConfig-Interface.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. C
ause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalStateException: No typehandler found for property invocationDetails.creditDetails.modeOfPayment at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
        at InterfaceConfigUtility.<clinit>(InterfaceConfigUtility.java:20)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        at com.db.tf.interfaces.mdb.InterfaceMDB.onMessage(InterfaceMDB.java:44)
        at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
        at weblogic.ejb.container.internal.MDListener.transactionalOnMessage    (MDListener.java:371)
        at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
        at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
        at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
        at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
        at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

触发的查询具有带有以下变量

的结果图
<result property="PQR" column="ABC"/>

在数据库中,我将它作为常规varchar。

无法找到根本原因,任何形式的帮助都很棒。

提前致谢。

1 个答案:

答案 0 :(得分:2)

尝试复制string into a custom object导致此问题。想要映射到该自定义对象的变量content/Id,然后就可以了。