'Converting stored procedures PL/SQL to Java

Is anyone aware of an opensource tool to convert PL/SQL to Java. Or if you have any suggestions to prepare making this tool.



Solution 1:[1]

Most probably there is no out-of-the-box tool for that. I suggest building a PL/SQL parser using ANTLR, then you may implement your translator on the top of it.

Solution 2:[2]

There are commercial tools like: http://www.ispirer.com/application-conversion/oracle-plsql-to-java-migration and no free ones afaik.

You may get most complicated part of PLSQL and try to convert it manually. You will see if automatic translation may have sense at all and you will be able to evaluate tools.

All translated code I saw was very ugly and hard to maintain (however possible).

Maybe better option is to create regression tests using PLSQL, write java code manually and test it against your regression tests.

There are good reasons why PLSQL is still alive.

Solution 3:[3]

P2JTrans a PL/SQL to Java translator to convert PL/SQL code to java using ANTLR v3.3 and StringTemplate

https://github.com/developeron29/P2JTrans

Solution 4:[4]

Check out for a commercial one: http://www.io64.com/plsql-to-java-migration/



In demo, generated code is also executed.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 erosb
Solution 2 Grzegorz Kazior
Solution 3 Ricardo Cardona Ramirez
Solution 4