I've been working on a Java project a year ago, and have used the Codehaus Mojo SQLJ Plugin for translating .sqlj files into accessible Java classes. As I have the old repository saved, I saw that the following <plugin>
was inserted in my pom.xml
:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sqlj-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<goals>
<goal>sqlj</goal>
</goals>
<configuration>
<sqljDirs>
<sqljDir>src/main/sqlj/</sqljDir>
</sqljDirs>
<generatedSourcesDirectory>../sales-persistance/src/main/java</generatedSourcesDirectory>
<generatedResourcesDirectory>../sales-persistance/src/main/resources/ro/ibm/sqlj</generatedResourcesDirectory>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>sqlj4</artifactId>
<version>4.29.29</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
It uses the com.ibm.db2:sqlj4
dependency for sqlj translation. From my research, SQLJ can be translated using one of the two translators: IBM's or Oracle's. Based on their documentation, such translators are only provided with their Databases (for example, Oracle with their Database 23c, and so on), and not as independent packages.
One year ago, this com.ibm.db2:sqlj4
translator was available on MavenCentral. At this moment, it isn't available anymore. From old projects found on GitHub, Oracle also had an SQLJ translator available without that Database Client (com.oracle:sqlj
), but I can't seem to find it on any Maven repository anymore.
Any reason to why I cannot find independent versions of the translators anymore? Also, is there any possibility to download the jar files and simply add them locally through the pom.xml
? Oracle and IBM do not provide any download links for those translators.
As of Oracle 12.2, server-side SQLJ is desupported.
SQLJ Support Inside Oracle Database
Starting with Oracle Database 12c release 2 (12.2), Oracle does not support running server-side SQLJ code.
Oracle supports using client-side SQLJ. However, Oracle does not support the use of server-side SQLJ, including running stored procedures, functions, and triggers in the database environment.
The Oracle 19 SQLJ Getting Started documentation states:
2.1.2 Requirements for Using the Oracle SQLJ Implementation
The following are required to use the Oracle SQLJ implementation:
A database system that is accessible using your JDBC driver
Class files for the SQLJ translator
Translator-related classes are available in the following file:
ORACLE_HOME/sqlj/lib/translator.jar
Note: For more information about
translator.jar
, refer to "Set the Path and Classpath".Class files for the SQLJ run time.
ORACLE_HOME/sqlj/lib/runtime12.jar
Note:
runtime12ee.jar
has been deprecated since Oracle Database 11g Release 1. Useruntime12.jar
instead.
Therefore, you should be able to get the appropriate JAR files from the database installation.