class java.lang.RuntimeException/Scala 类文件不包含 Scala 注释 [英] class java.lang.RuntimeException/Scala class file does not contain Scala annotation

查看:30
本文介绍了class java.lang.RuntimeException/Scala 类文件不包含 Scala 注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 scala 2.10.2 执行 scala 代码,该代码使用了一些用 sbt 编译的 jar 库.

I'm trying to execute a scala code using scala 2.10.2, the code uses some jar libraries compiled with sbt.

我收到以下错误:

scala: error while loading Order, class file '..\prestashop-scala-client-0.2.4\target\prestasac-0.2.4.jar(co/orderly/prestasac/representations/Order.class)' is broken
(class java.lang.RuntimeException/Scala class file does not contain Scala annotation)

prestasac-0.2.4.jar 的来源在 github 上:Order.class

Sources of the prestasac-0.2.4.jar are on github: Order.class

有什么办法可以解决这个问题吗?

Is there something to do to fix this issue ?

谢谢

推荐答案

看起来库被配置为针对 Scala 2.9.1 进行编译.Scala 的主要版本与二进制不兼容.

Looks like the library is configured to compile against Scala 2.9.1. Major versions of Scala are not binary compatible.

我将必要的 SBT 更改放在这里:https://github.com/mpartel/prestashop-scala-client/commit/e9a1df40bfe35518aaebac899e438b9b6fa6d728

I put the necessary SBT changes here: https://github.com/mpartel/prestashop-scala-client/commit/e9a1df40bfe35518aaebac899e438b9b6fa6d728

这篇关于class java.lang.RuntimeException/Scala 类文件不包含 Scala 注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆