maven编译失败,无法访问

0h4hbjxa  于 2023-01-29  发布在  Maven
关注(0)|答案(1)|浏览(420)

我遇到了一个问题。当我用maven编译我的应用时,我收到了以下错误:
[错误]无法在项目myproject-core上执行目标org. apache. maven. plugins:maven编译器插件:2.3.2:编译(默认编译):编译失败
[错误]/home/group/检查/19 - 01 - 2017---13 -40 - 59/我的项目/源代码/主/java/存储库/dao/文档/www.example.com:[213,24]错误:FileDAO.java:[213,24] error: cannot access Comparable
在此行和列中有:

public Integer insertFile(File file) throws Exception {

Properties p = Util.getProperties("prop.properties");
MyFacade.setup(p.getProperty("url).toString(),
    Integer.valueOf(p.getProperty("port").toString()).intValue(), p.getProperty("service").toString(),
    p.getProperty("user").toString(), p.getProperty("pwd").toString());
final DocumentsFile documentFile = MyFacade.creaFile(p.getProperty("codDoc").toString(), file);
MyFacade.teardown();
return documentFile.getId();    //this is the line 213}

有什么问题吗?
感谢您的回复

pbpqsu0x

pbpqsu0x1#

由于Java版本不对齐,我也遇到过类似的问题(“无法访问”某个接口)。但我必须更新编译器插件(到3. 10),让它指示类文件版本对于我在项目中使用的(Java 11)来说太高级了(Java 17),而不仅仅是“无法访问”。

相关问题