Table of contents

i
This is not the latest version of this document; to access the latest version, click here.
Unofficial Content
  • This documentation is valid for:

From GeneXus we can export the last reorganization performed on the database. To do so, the options Tools / Java Generator / Export Reorganization have to be selected to create a .JAR file with the last reorganization.

The following dialog box is displayed:

   ExportReorgDialog

In this dialog box, the following can be configured.

Filename

Name of the .JAR package that will contain the reorganization programs. By default it is Reorg.jar.

JDBC URL

Here, enter the server name, port and name of the database to be reorganized. The specification varies according to the JDBC driver used. The JDBC URL configured in the model is suggested by default.

User

The database user with permissions to run reorganization programs has to be entered here. The user account configured in the model is suggested by default.

Password

The password of the user account specified in the User field has to be entered here. The password configured in the model is suggested by default.

Include configuration file in JAR

It allows setting whether to include or drop the REORG.CFG file from the .JAR. The REORG.CFG file will store all the data from the fields in this dialog box; therefore, if you’re not sure about the details of the database to be reorganized, you can clear this option and change the values later.

 

The Reorg.jar file will be created in the directory of the model in question.

So, the files Reorg.jar and gxclassr.zip (GeneXus standard classes) from the model directory have to be copied to the client. To run the reorganization, these files have to be copied to a directory in addition to executing the following:

java -cp Reorg.jar; gxclassr.zip;<drivers jdbc> <package name if it has been defined>.Reorganization –force

If the –force option is not included, an error such as the one below will be displayed:

There are no reorganization specifications

 

When running on non-Windows platforms that don’t have a graphic interface, the following error may occur:

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.

         at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)

         at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:134)

         at java.lang.Class.forName0(Native Method)

         at java.lang.Class.forName(Class.java:141)

         at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)

         at java.awt.Window.init(Window.java:231)

         at java.awt.Window.<init>(Window.java:275)

         at java.awt.Frame.<init>(Frame.java:401)

         at com.genexus.GXReorganization.showUI(GXReorganization.java:168)

         at com.genexus.GXReorganization.executeReorg(GXReorganization.java:228)

         at com.genexus.GXReorganization.executeReorg(GXReorganization.java:215)

         at Reorganization.main(Reorganization.java)

 

To avoid using a graphic interface, the –nogui option should be used. For example, on Linux the command to be executed would be similar to:

java -cp Reorg.jar:gxclassr.zip:<drivers jdbc> <package name if it has been defined>.Reorganization –nogui –force

See Also

Java package name property

Alternative export java reorganization method

There is also an alternative method to export java reorganizations from Genexus, useful if you're trying to automatize the "build & deploy" process. There is a non-official extenal utility "Gx X Java Reorg Console Exporter" that do the same that Export Reorganization option. Follow the link for more information.

 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant