NutzCN Logo
问答 转换类型不匹配java.util.FormatFlagsConversionMismatchException
发布于 1935天前 作者 qq_a96bd60c 3705 次浏览 复制 上一个帖子 下一个帖子
标签:
2019-09-04 16:47:55,688 WARN [main] o.n.d.i.e.NutEntity#warn [65] String format fail in log , fmt = create FastClass for type=%, but it is ok: %s , args = [class test.CmpDataContent, org.nutz.aop.DefaultClassDefiner.defaultOne()Lorg/nutz/aop/ClassDefiner;]
java.util.FormatFlagsConversionMismatchException: Conversion = b, Flags =  
	at java.util.Formatter$FormatSpecifier.failMismatch(Formatter.java:4298) ~[na:1.8.0_121]
	at java.util.Formatter$FormatSpecifier.checkBadFlags(Formatter.java:2997) ~[na:1.8.0_121]
	at java.util.Formatter$FormatSpecifier.checkGeneral(Formatter.java:2955) ~[na:1.8.0_121]
	at java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2725) ~[na:1.8.0_121]
	at java.util.Formatter.parse(Formatter.java:2560) ~[na:1.8.0_121]
	at java.util.Formatter.format(Formatter.java:2501) ~[na:1.8.0_121]
	at java.util.Formatter.format(Formatter.java:2455) ~[na:1.8.0_121]
	at java.lang.String.format(String.java:2940) ~[na:1.8.0_121]
	at org.nutz.log.impl.AbstractLog.makeInfo(AbstractLog.java:59) [nutz-core-1.48.3b.jar:na]
	at org.nutz.log.impl.AbstractLog.debugf(AbstractLog.java:79) [nutz-core-1.48.3b.jar:na]
	at org.nutz.dao.impl.entity.NutEntity.<init>(NutEntity.java:201) [nutz-1.r.56.jar:na]
	at org.nutz.dao.impl.entity.AnnotationEntityMaker._createNutEntity(AnnotationEntityMaker.java:555) [nutz-1.r.56.jar:na]
	at org.nutz.dao.impl.entity.AnnotationEntityMaker.make(AnnotationEntityMaker.java:89) [nutz-1.r.56.jar:na]
	at org.nutz.dao.impl.EntityHolder.getEntity(EntityHolder.java:69) [nutz-1.r.56.jar:na]
	at org.nutz.dao.impl.NutDao.fetch(NutDao.java:538) [nutz-1.r.56.jar:na]
	at test.DataResolve.launch(DataResolve.java:25) [bin/:na]
	at test.DataResolve.main(DataResolve.java:19) [bin/:na]
2019-09-04 16:47:55,689 DEBUG [main] o.n.d.i.e.NutEntity#log [84] !!!!Log Fail!!
Exception in thread "main" java.lang.NoSuchMethodError: org.nutz.lang.Strings.cutLeft(Ljava/lang/String;IC)Ljava/lang/String;
	at org.nutz.dao.impl.sql.NutStatement.toString(NutStatement.java:227)
	at org.nutz.dao.impl.jdbc.NutPojo.toString(NutPojo.java:223)
	at java.lang.String.valueOf(String.java:2994)
	at java.lang.StringBuilder.append(StringBuilder.java:131)
	at org.nutz.log.impl.AbstractLog.makeInfo(AbstractLog.java:67)
	at org.nutz.log.impl.AbstractLog.debug(AbstractLog.java:74)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:211)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:45)
	at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:316)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:59)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:239)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:271)
	at org.nutz.dao.impl.NutDao.fetch(NutDao.java:545)
	at test.DataResolve.launch(DataResolve.java:25)
	at test.DataResolve.main(DataResolve.java:19)

调用方法
public void launch() {
		String busiId = "ZXA2019071600011043";
		String id = "vyM1IMVqHd0_uufc7HQTNU";
		CmpDataContent cmpDataContent = dao.fetch(CmpDataContent.class, id);
		// List<CmpDataMapping> list = dao.query(CmpDataMapping.class, null);
		System.out.println(cmpDataContent);
	}

5 回复

第一次见这个错误

是不是有2个版本的nutz存在?

	at org.nutz.log.impl.AbstractLog.debugf(AbstractLog.java:79) [nutz-core-1.48.3b.jar:na]
	at org.nutz.dao.impl.entity.NutEntity.<init>(NutEntity.java:201) [nutz-1.r.56.jar:na]

分别属于两个不同的jar

之前这么用好像没问题。现在移除nutz-1.r.56.jar,使用nutz-core-1.48.3b.jar和nutz-dao-1.48.3.jar可以了,谢谢大神

添加回复
请先登陆
回到顶部