This document describes the upgrade of userorg-service from Play Framework 2.7.2 with Akka 2.5.22 to Play Framework 3.0.5 with Apache Pekko 1.0.3.
- License Compliance: Akka changed from Apache 2.0 to Business Source License 1.1, requiring commercial licenses for production use. Apache Pekko maintains Apache 2.0 license.
- Security: Play 2.7.2 and Akka 2.5.22 no longer receive security updates.
- Modernization: Access to latest features and performance improvements.
- Play Framework: 2.7.2 to 3.0.5
- Actor Framework: Akka 2.5.22 to Apache Pekko 1.0.3
- Scala: 2.12.11 to 2.13.12
- Guice: 3.0 to 5.1.0
- SLF4J: 1.6.1 to 2.0.9
- Logback: 1.2.3 to 1.4.14
- Jackson: 2.13.5 to 2.14.3
- Netty: 4.1.44 to 4.1.93
All Maven POM files updated with new versions. Play Framework groupId changed from com.typesafe.play to org.playframework. Scala library exclusions added to prevent version conflicts between Scala 2.12 and 2.13.
329 Akka imports migrated to Pekko across 130+ Java files:
- akka.actor.* to org.apache.pekko.actor.*
- akka.pattern.* to org.apache.pekko.pattern.*
- akka.routing.* to org.apache.pekko.routing.*
- akka.util.* to org.apache.pekko.util.*
- akka.testkit.* to org.apache.pekko.testkit.*
application.conf files updated with Pekko namespaces:
- akka {} to pekko {}
- Actor system configurations migrated
- Serialization bindings updated
- Dispatcher references changed
- ActorStartModule: Implements play.libs.pekko.PekkoGuiceSupport
- CustomGzipFilter: Updated to Play 3.0 filter API
- ErrorHandler: Migrated exception handling to Pekko
38+ test files updated:
- Replaced JavaTestKit.duration() with java.time.Duration.ofSeconds()
- Resolved Duration class ambiguity between java.time and scala.concurrent
- Fixed import conflicts
Added exclusions to prevent Scala 2.12 transitive dependencies:
- Excluded scala-library and scala-reflect from cloud-store-sdk in platform-common
- Excluded scala-library and scala-reflect from platform-common and service dependencies in controller
- Explicitly declared scala-library 2.13.12 dependency
Build all modules:
mvn clean install -Dmaven.test.skip=true
Build with test compilation:
mvn clean install -DskipTests
Create distribution package:
cd controller
mvn play2:dist
Business Logic: No changes to business logic or functionality API Compatibility: Maintained, as Pekko is API-compatible with Akka 2.6 Code Changes: Primarily package name updates from akka to pekko License: Now compliant with Apache 2.0 throughout the stack
- Execute full unit test suite
- Run integration tests for actor communication
- Perform regression testing for all features
- Conduct performance benchmarking
- Test under production-like load
- POM files
- Java source files
- configuration files
- test files
Scala 2.12/2.13 Conflict: If you encounter NoClassDefFoundError for scala.collection.GenMap, verify dependency tree to ensure no Scala 2.12 artifacts are present. Run mvn dependency:tree and add exclusions for any scala-library or scala-reflect with version 2.12.
Play 3 will automatically apply gzip based on the Accept-Encoding header. You don’t need a custom Java filter.