The method find(String, Object[]) is ambiguous for the type
来源:互联网 发布:社会网络理论有什么用 编辑:程序博客网 时间:2024/05/22 12:36
异常描述:
Multiple markers at this line
- The method find(String, Object[]) is ambiguous for the type
BaseDaoI
- Line breakpoint:UserServiceImpl [line: 81] - combobox(String)
问题解析:
查了下,在 StackOverflow 上找到了相关解释:
ambiguous 是 Java5/6 遗留的 bug,在 Java7 上进行了修复.然而这一修改却对旧代码的审查上产生如上的错误提示了.
而 Eclipse Juno(4.2.1)使用 Java7 进行编译,所以会报出这个问题。
解决方案:
方案一:
配置Eclipse,让它打包时忽略此错误。
进入 eclipse 安装目录打开 eclipse.ini,在 -vmargs 后面添加
-DtolerateIllegalAmbiguousVarargsInvocation=true此方案让eclipse编译项目是忽略此错误,但Eclipse任然会显示红叉.及提示你出错,但允许你打包编译.
此方案并不能从根本解决问题,且在Java7逐渐流行的未来问题还是问题.
方案二:
修改代码,取消或合并方法.
具体还没有思路
0 0
- The method find(String, Object[]) is ambiguous for the type
- 编译错:The method createSqlQuery(String, List<Object>) is ambiguous for the type
- The method list(String, Object[]) is ambiguous for the type BaseHibernateDao<M,PK
- 报错 :The method list(String, Object[]) is ambiguous for the type BaseHibernateDao<M,PK>
- The method list(String, Object[]) is ambiguous for the type BaseHibernateDao<M,PK>错误解决方法
- method is ambiguous for the type
- method is ambiguous for the type
- The method assertEquals(Object, Object) is ambiguous for the type Assert解决办法
- The method isEmpty() is undefined for the type String/String
- The method execute(Void[]) is ambiguous for the type new AsyncTask<Void,Void,Void>(){}
- java 调用方法引起歧义:The method XXX is ambiguous for the type XX
- The method iterator() is ambiguous for the type KafkaStream<byte[],byte[]>
- android The method execute(Void[]) is ambiguous for the type new AsyncTask<Void,Void,Void>(){}
- The method execute(Void[]) is ambiguous for the type new AsyncTask<Void,Void,Void>(){}
- The method setCharacterEncoding(String) is undefined for the type HttpServletResponse
- The method setCharacterEncoding(String) is undefined for the type HttpServletResponse
- The method fromObject(String) is undefined for the type JSONObject
- The method isEmpty() is undefined for the type String
- 网络应用层——http协议
- Unity Vevtor3 中文翻译
- jdbc注册驱动3种方式
- Android 图片三级缓存之内存缓存(告别软引用(SoftRefrerence)和弱引用(WeakReference))
- Java之Exception
- The method find(String, Object[]) is ambiguous for the type
- java,c#将秒转换为hh:MM:ss的实现
- kafka 0.8.x producer Example(scala)
- Android性能优化典范 二
- 2008 R2远程桌面终端连接数的破解
- 拓扑排序总结
- Xilinx ISE生成rom/ram IP核
- oracle event 'cursor: mutex S'
- sqlserver 全文索引