You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ This repository provides formatter settings for the [coding style rules](https:/
6
6
7
7
Settings are primarily provided for
8
8
9
-
-[Oracle SQLcl, Version 22.4.0](https://www.oracle.com/tools/downloads/sqlcl-downloads.html)
10
-
-[Oracle SQL Developer, Version 22.2.1](https://www.oracle.com/tools/downloads/sqldev-downloads.html) (requires `dbtools-common.jar` from SQLcl 22.4.0, however, this breaks the code completion feature)
9
+
-[Oracle SQLcl, Version 23.1.0](https://www.oracle.com/tools/downloads/sqlcl-downloads.html)
10
+
-[Oracle SQL Developer, Version 23.1.0](https://www.oracle.com/tools/downloads/sqldev-downloads.html)
11
11
12
12
These settings have been defined and tested with the product versions mentioned above. They might not work in other versions.
Copy file name to clipboardExpand all lines: standalone/README.md
+55-1Lines changed: 55 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,9 +49,63 @@ To run a native image open a terminal window and type
49
49
50
50
The parameters are the same as for the [executable JAR](#executable-jar).
51
51
52
+
## Important: Native Images Do not Work Anymore
53
+
54
+
Starting with SQLcl 23.1.0 it is not possible to build native images on all platforms anymore.
55
+
The reason is that the underlying parser uses AWT/Swing components (for whatever reason).
56
+
AWT/Swing components are supported on AMD/Linux platforms only by GraalVM.
57
+
As a result this build process will produce a non-working native image on most platforms.
58
+
59
+
You will see the following stacktrace similar to the following when running the resulting native image:
60
+
61
+
```
62
+
at com.oracle.svm.core.jdk.NativeLibrarySupport.loadLibraryRelative(NativeLibrarySupport.java:120)
63
+
at java.base@17.0.6/java.lang.ClassLoader.loadLibrary(ClassLoader.java:50)
64
+
at java.base@17.0.6/java.lang.Runtime.loadLibrary0(Runtime.java:818)
65
+
at java.base@17.0.6/java.lang.System.loadLibrary(System.java:1989)
66
+
at java.desktop@17.0.6/java.awt.Toolkit$2.run(Toolkit.java:1388)
67
+
at java.desktop@17.0.6/java.awt.Toolkit$2.run(Toolkit.java:1386)
68
+
at java.base@17.0.6/java.security.AccessController.executePrivileged(AccessController.java:168)
69
+
at java.base@17.0.6/java.security.AccessController.doPrivileged(AccessController.java:318)
70
+
at java.desktop@17.0.6/java.awt.Toolkit.loadLibraries(Toolkit.java:1385)
71
+
at java.desktop@17.0.6/java.awt.Toolkit.initStatic(Toolkit.java:1423)
72
+
at java.desktop@17.0.6/java.awt.Toolkit.<clinit>(Toolkit.java:1397)
73
+
at java.desktop@17.0.6/java.awt.Component.<clinit>(Component.java:624)
74
+
at java.base@17.0.6/java.lang.Class.ensureInitialized(DynamicHub.java:528)
75
+
at java.base@17.0.6/java.lang.Class.ensureInitialized(DynamicHub.java:528)
76
+
at java.base@17.0.6/java.lang.Class.ensureInitialized(DynamicHub.java:528)
77
+
at java.base@17.0.6/java.lang.Class.ensureInitialized(DynamicHub.java:528)
78
+
at java.base@17.0.6/java.lang.Class.ensureInitialized(DynamicHub.java:528)
79
+
at oracle.dbtools.parser.Visual.<init>(Visual.java:404)
80
+
at oracle.dbtools.parser.Grammar.parseGrammarFile(Grammar.java:172)
81
+
at oracle.dbtools.parser.Grammar.parseGrammarFile(Grammar.java:152)
82
+
at oracle.dbtools.arbori.Program.getRules(Program.java:277)
83
+
at oracle.dbtools.arbori.Program.getArboriParser(Program.java:187)
84
+
at oracle.dbtools.arbori.Program.compile(Program.java:330)
85
+
at oracle.dbtools.arbori.Program.compile(Program.java:319)
86
+
at oracle.dbtools.arbori.Program.compile(Program.java:316)
87
+
at oracle.dbtools.app.XML2Table.<init>(XML2Table.java:70)
88
+
at oracle.dbtools.app.Persist2XML.<init>(Persist2XML.java:48)
89
+
at oracle.dbtools.app.Persist2XML.read(Persist2XML.java:95)
90
+
at <js>.configure(<eval>:104)
91
+
at <js>.getConfiguredFormatter(<eval>:161)
92
+
at <js>.run(<eval>:727)
93
+
at <js>.:program(<eval>:803)
94
+
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:399)
95
+
at org.graalvm.js.scriptengine/com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:478)
96
+
at org.graalvm.js.scriptengine/com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:420)
97
+
at com.trivadis.plsql.formatter.TvdFormat.run(TvdFormat.java:36)
98
+
at com.trivadis.plsql.formatter.TvdFormat.main(TvdFormat.java:49)
99
+
```
100
+
101
+
This is really sad. However, there is nothing we can do.
102
+
We have to wait until the SQL Developer team decides to provide a parser that does not require AWT/Swing components (as in previous versions)
103
+
or until the GraalVM team provides a native-image build process that works on all platforms with AWT/Swing.
104
+
See also [macOS: no awt in java.library.path](https://github.com/oracle/graal/issues/4124).
105
+
52
106
## How to Build
53
107
54
-
1.[Download](https://www.oracle.com/tools/downloads/sqlcl-downloads.html) and install SQLcl 22.4.0
108
+
1.[Download](https://www.oracle.com/tools/downloads/sqlcl-downloads.html) and install SQLcl 23.1.0
55
109
2.[Download](https://github.com/graalvm/graalvm-ce-builds/releases) and install the GraalVM JDK 17 22.3.1
56
110
3. Go to the `bin` directory of the GraalVM JDK and run `./gu install js native-image visualvm`. For native image on Windows you need to [download](https://visualstudio.microsoft.com/downloads/) Visual Studio Community 2022 and install the C++ compiler. Use `x64 Native Tools Command Prompt for VS 2022` to get a terminal window with the correct environment.
57
111
4.[Download](https://maven.apache.org/download.cgi) and install Apache Maven 3.9.1
0 commit comments