Recently I was asked to migrate a legacy web application from an old environment:
- JBoss EAP 4.0.2
- JDK 1.5 (Java SE Development Kit 5.0u22)
to a less old target environment:
- JBoss EAP 5.0.1
- JDK 1.6 (Java SE Development Kit 6u45)
Tests passed successfully and we put the migrated web application in production.
All was going well when suddenly the production log began to grow.
All was going well when suddenly the production log began to grow filled with lots of the following errors:
What caused the problem
We quickly understood the problem was related to a feature based on Groovy Scripting Language.
The web application used the
jsr223-1.0.jar which provides the
support for scripting language.
However JDK 1.6 has included JSR 223 Scripting for the Java™ Platform API.
All worked fine on JDK 1.5 but on JDK 1.6 the JBoss class loader
incurred in conflicts loading classes from the
and from the JDK 1.6, generating the log above.
Have you ever heard about JBoss class loader issue before? Sadly a too much common one.
The solution consisted in removing the
jsr223-1.0.jar from the
legacy web application and re-deploying it.
Many thanks to Joseph Valerio and Santosh Singh who documented the problem five years ago!
- When you face a problem track log error messages and relative solution on the Internet, especially if you worked with free or open source software: you are part of the community!
- Test extensively legacy software during the migration process.
- Automate tests in order to repeat them on the production target environment
- As a safety net make sure you can restore the original environment from which you are migrating in case arose unexpected problems on the production target one.
- Keep the safety net available for enough time after the migration, and throw it away only when you are really confident the migrated situation is stable.
Share your experience about migrating legacy software
I look forward to hearing from you other hints which could be useful migrating a legacy software.