Wiki-Quellcode von 03 Projekt Setupguide ONYX

Version 381.2 von Carina Enke am 15.11.2025

Zeige letzte Bearbeiter
1 {{section}}
2 {{column width="60%"}}
3 == System requirements ==
4
5 === All components ===
6
7 * Linux-based OS
8 * Java 21
9 * Apache Tomcat 9 (latest update)
10
11 === ONYX Editor (additionally) ===
12
13 * PostgreSQL 16
14 * Java unlimited security enabled
15
16 {{code}}
17 http://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters
18 Download from http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
19 {{/code}}
20
21
22 {{/column}}
23
24 {{column width="30%"}}
25 {{panel title="Inhalt"}}
26 {{toc start="2"/}}
27 {{/panel}}
28
29
30 {{/column}}
31 {{/section}}
32
33 === Build process ===
34
35 * Linux-based OS
36 * Java 11 (latest update, Oracle or OpenJDK)
37 * Eclipse for JEE (Kepler or later)
38 * Maven2
39 * Eclipse Maven integration (m2)
40
41
42 == Steps for build ==
43
44 All ONYX parts are delivered as Eclipse projects
45
46
47 * preOnyx (ONYX QTI test player)
48 * preWebEditor (ONYX QTI test editor)
49 * onyx (ONYX QTI core)
50 * LaTeXRenderer (LaTeX image renderer connector, used to render LaTeX math formulas to images, which can be included in PDFs. This project only offers an interface to connect whatever lib you want, e.g. jlatexmath (GPL, delivered as example)
51
52 * Use Eclipse
53 * Import -> Existing project, start with LaTeXRenderer project
54 * Import all four projects
55
56 Due to license restrictions the **project LaTeXRenderer** is not linked or integrated by default. This must be done manually.
57
58 {{info}}
59 Ensure that project dependency from preWebOnyx and preWebEditor to LaTeXRenderer is fulfilled.
60 Ensure that project LaTeXRenderer exports all libs in /libs folder (you may get ClassNotFoundExceptions in Tomcat otherwise, if you still get them add all libs from project LaTeXRenderer to Tomcat classpath manually)
61 {{/info}}
62
63 (% style="line-height:1.4285715" %)**Maven will build all projects automatically**(%%) (you can do this manually on console, anyhow this is not tested in development environment and may disturb Eclipse Maven integration)
64
65 **Setup database for ONYX Editor**
66
67 * Locate setupdatabase.postgre.sql
68 * Log on to Postgres
69 * Create user owe with password owe
70 * Create database owe and assign to user owe
71 * Import setupdatabase.postgre.sql to this database
72
73 Hint: you may use other user/database names, change configuration in
74
75 {{code}}
76 applicationContext.xml (see below)
77 {{/code}}
78
79 == Changes on ONYX QTI core ==
80
81 Since all ONYX components are managed by Maven, the ONYX QTI core from BPS Maven artifactory is used by default. If you want to change some code you are required to create a JAR from project onyx on your own and either adopt the pom.xml references in preWebOnyx and preWebEditor to your own artifactory or put the JAR in classpath.
82
83 == Configuration ==
84
85 **preWebOnyx**
86
87 * Locate onyxplugin.default.config.xml, copy it to a classpath folder and rename to onyxplugin.config.xml
88 * Configure as needed
89 * Service provider named “preview” is required if used as preview instance for ONYX Editor
90
91 **preWebEditor**
92
93 * applicationContext.xml: general configurations (database, mail configuration, preview ONYX (you can change this to your local installation), ...)
94 * metadataConfigurationContext.xml: normally no changes needed as long as no further metadata are required
95 * moduleConfigurationContext.xml: repository configuration
96 * pageModelContext.xml: normally no changes required, defines the main tabs in shown application
97 * webServiceContext.xml: reporter statistics connection, can be changed to your local ONYX installation
98
99 == Deployment ==
100
101 * Deploy preWebOnyx and preWebEditor to Tomcat in Eclipse (it is recommended to use two Tomcat servers in Eclipse to be able to restart both independently)
102 * Configure Tomcat deployment to use different ports
103 * Check path the applications are mounted to
104 * Start Tomcat(s)
105 * Call http:~/~/localhost:<port>/<path> in browser
106
107 == Important notes ==
108
109 **Before running any ONYX application** in Eclipse/Tomcat, always **clean Tomcat Work Directory** first. This is also required in server environment after each update. Since ONYX creates large amounts of temporary files in server environment it is also strictly recommended to clean servers and tomcat temp directory before each application starts.
110
111 When run from Eclipse/Tomcat ONYX applications may not shut down properly. In this case just “kill” them using the red “Terminate” button in console view.
112
113 In server environment ONYX applications uses memory strongly dependent from load and users activities. BPS runs them with **8 GB each**.