openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

Ansible deployement failed for scala 2.13

Open MrJackQiao opened this issue 3 years ago • 1 comments

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. 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

fatal: [controller0]: FAILED! => {"attempts": 12, "changed": false, "elapsed": 0, 
"msg": "Status code was -1 and not [200]: Request failed: <urlopen error [Errno 111] Connection refused>", 
"redirected": false, "status": -1, 
"url": "https://172.17.0.1:10001/ping"}

Status code was -1 and not [200]: Request failed: <urlopen error [Errno
111] Connection refused>

And docker ps shows that the controller0 is constantly restarting every 1 min.

/tmp/wsklogs/controller0/controller0_logs.log shows the error below


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$.<clinit>(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 and removed in scala 2.13.0

  • At first, I thought the issue is caused by pureconfig 0.11.1 not supporting 2.13. But it's not the case

Just out of curiosity, while building with scala 2.13, there are more than 800 warnings about deprecations. Based on this thread, 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.

MrJackQiao avatar Jul 29 '22 23:07 MrJackQiao

OpenWhisk checks if the codes are compiled with scala-2.13. image

I think it is still good to migrate to 2.13 but could not be handled for now due to a lack of resources. A contribution would be appreciated.

style95 avatar Jul 30 '22 04:07 style95