Ansible deployement failed for scala 2.13
- Dominant language
- Scala
- Stars
- 6.8k
- Forks
- 1.2k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 2
Description
## Environment details:
* Local deployment with ansible
* Docker version 20.10.17, build 100c701
* Ubuntu 20.04
## Steps to reproduce the issue:
I followed the steps listed in [Ansible deployment](https://github.com/apache/openwhisk/blob/master/ansible/README.md).
CouchDB is set up without any issue.
## Provide the actual results and outputs:
When building with scala 2.13, `./gredlew distDocker` only gave warnings. However
`ansible-playbook -i environments/localopenwhisk.yml` failed with error
```yml
fatal: [controller0]: FAILED! => {"attempts": 12, "changed": false, "elapsed": 0,
"msg": "Status code was -1 and not [200]: Request failed: ",
"redirected": false, "status": -1,
"url": "https://172.17.0.1:10001/ping"}
Status code was -1 and not [200]: Request failed:
```
And `docker ps` shows that the `controller0` is constantly restarting every 1 min.
`/tmp/wsklogs/controller0/controller0_logs.log` shows the error below
```java
Caused by: java.lang.ClassNotFoundException: scala.collection.convert.DecorateAsJava
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:766)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1078)
... 28 more
Exception in thread "main" java.lang.NoClassDefFoundError: scala.collection.convert.DecorateAsJava
at java.base/java.lang.ClassLoader.defineClassImpl(Native Method)
at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:476)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:437)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:1110)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:898)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:806)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:764)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1078)
at scala.collection.convert.JavaCollectionWrappers$JListWrapper.iterator(JavaCollectionWrappers.scala:112)
at scala.collection.immutable.List.prependedAll(List.scala:151)
at scala.collection.IterableOnceOps.toList(IterableOnce.scala:1258)
at scala.collection.IterableOnceOps.toList$(IterableOnce.scala:1258)
at scala.collection.AbstractIterable.toList(Iterable.scala:920)
at pureconfig.backend.PathUtil$.splitPath(PathUtil.scala:20)
at pureconfig.package$.getValue(package.scala:35)
at pureconfig.package$.loadValue(package.scala:43)
at pureconfig.package$.$anonfun$loadConfig$2(package.scala:68)
at pureconfig.package$$$Lambda$134/00000000650F0AA0.apply(Unknown Source)
at scala.util.Either$RightProjection.flatMap(Either.scala:757)
at pureconfig.package$.$anonfun$loadConfig$1(package.scala:67)
at pureconfig.package$$$Lambda$131/0000000064EEB310.apply(Unknown Source)
at scala.util.Either$RightProjection.flatMap(Either.scala:757)
at pureconfig.package$.loadConfig(package.scala:66)
at pureconfig.package$.loadConfigOrThrow(package.scala:161)
at org.apache.openwhisk.core.controller.Controller$.(Controller.scala:185)
at org.apache.openwhisk.core.controller.Controller.main(Controller.scala)
```
This error doesn't occur with scala 2.12.
## Additional information you deem important:
- `scala.collection.convert.DecorateAsJava` is deprecated in Scala [2.12.2](https://www.scala-lang.org/api/2.12.2/scala/collection/convert/index.html) and removed in scala [2.13.0](https://www.scala-lang.org/api/2.13.0/scala/collection/convert/index.html)
- At first, I thought the issue is caused by pureconfig 0.11.1 not supporting 2.13. But it's not the [case](https://github.com/pureconfig/pureconfig/issues/483#issuecomment-502262722)
Just out of curiosity, while building with scala 2.13, there are more than 800 warnings about deprecations. Based on this [thread](https://github.com/apache/openwhisk/issues/4741), it seems that upgrade to 2.13 is not full completed. I am wondering if supporting scala 2.13 is still being considered or OW is moving towards scala 3.
Contributor guide
Assessment
This issue has not been assessed yet.