OnlCgformApiController.doDbSynch()发生异常:Could not parse mapping document: null (INPUT_STREAM)

martinzh 发布于 2020/04/17 17:18
阅读 1K+
收藏 0

使用jeecg同步数据库时,报这样的错误。 👇👇👇

各位大佬帮忙看下是什么问题, 多谢。 

2020-04-17 17:12:05.407 [http-nio-8181-exec-1] ERROR org.jeecg.modules.online.cgform.a.a:483 - OnlCgformApiController.doDbSynch()发生异常:Could not parse mapping document: null (INPUT_STREAM)
org.hibernate.boot.InvalidMappingException: Could not parse mapping document: null (INPUT_STREAM)
	at org.hibernate.boot.jaxb.internal.InputStreamXmlSource.doBind(InputStreamXmlSource.java:46)
	at org.hibernate.boot.jaxb.internal.InputStreamXmlSource.doBind(InputStreamXmlSource.java:38)
	at org.hibernate.boot.spi.XmlMappingBinderAccess.bind(XmlMappingBinderAccess.java:94)
	at org.hibernate.boot.MetadataSources.addInputStream(MetadataSources.java:382)
	at org.jeecg.modules.online.config.util.c.a(DbTableProcess.java:94)
	at org.jeecg.modules.online.cgform.service.impl.d.doDbSynch(OnlCgformHeadServiceImpl.java:309)
	at org.jeecg.modules.online.cgform.service.impl.d$$FastClassBySpringCGLIB$$a1d6ff6b.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)
	at org.jeecg.modules.online.cgform.service.impl.d$$EnhancerBySpringCGLIB$$41534cd.doDbSynch(<generated>)
	at org.jeecg.modules.online.cgform.service.impl.d$$FastClassBySpringCGLIB$$a1d6ff6b.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)

找到了些稍微详细的错误, 如下:

Unable to perform unmarshalling at line number 7 and column 20. Message: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://www.hibernate.org/xsd/orm/hbm":meta, "http://www.hibernate.org/xsd/orm/hbm":tuplizer, "http://www.hibernate.org/xsd/orm/hbm":subselect, "http://www.hibernate.org/xsd/orm/hbm":cache, "http://www.hibernate.org/xsd/orm/hbm":natural-id-cache, "http://www.hibernate.org/xsd/orm/hbm":synchronize, "http://www.hibernate.org/xsd/orm/hbm":comment, "http://www.hibernate.org/xsd/orm/hbm":id, "http://www.hibernate.org/xsd/orm/hbm":composite-id}' is expected.

 

加载中
0
martinzh
martinzh

原来是我的xml中的id没有放在第一个元素, 调整一下顺序就可以了 

把ID的顺序放在第一位:

Jeecg还有很多不完善, 官方support也不够给力。 有兴趣的一起来研究: qq群:  1083435506

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部