Version: 1.0.0.M3
Table of Contents
List of Examples
Table of Contents
DNet eBusiness Suite requires Java 6 or later to be installed. It is available from http://www.java.com
Extract the contents of the archive somewhere on your computer, lets
say
C:/dnet
Inside you should find a
virgo-tomcat-server-xxx
folder which contains a Virgo web-server already configured to run
DNet; xxx stands for the server version, at the time of writing this document is 3.0.1-RELEASE. So go to
virgo-tomcat-server-xxx/bin
folder and double-click the
startup.bat
.
It opens a console window showing the steps performed during startup. Wait to finish then go to your browser and type in the adress bar:
http://localhost:8081/nan21.dnet.core.welcome
Click the logo which redirects you to the application setup section. Sign-in with user 'admin' and password 'admin'.
Follow on-screen instructions.
To configure DNet to work with a different database as the one in the demo package, generally speaking, you have to install the database engine on your computer, create the database user and schema, configure the DNet parameters in the properties file to point to the desired database and optionally provide the jdbc connector specific for your database.
Ensure you have MySQL already installed and started.
In a command window (on Windows) navigate to your Mysql installation folder(assume it is MYSQL_HOME_FOLDER): cd MYSQL_HOME_FOLDER/bin Then start the mysql command-line tool: mysql --user=root --password=root Replace with your own password in the line above. Create the database and the user:
CREATE DATABASE dnet CHARACTER SET utf8; CREATE USER dnet IDENTIFIED BY 'dnet'; GRANT ALL PRIVILEGES ON dnet.* TO 'dnet'@'%' IDENTIFIED BY 'dnet';
Type
exit;
to return to shell/dos control. Open
net.nan21.dnet.properties
file and comment the existing database configuration and uncomment
the MySQL properties under
DATABASE CONFIGURATION
section. You should have the following as a result:
jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost:3306/dnet jdbc.username=dnet jdbc.password=dnet
In case you used some other schema/user replace the values accordingly. Also ensure that the host and port are correct. These are the default values for an installation on your local computer. The jdbc driver for MySQL is provided with DNet.
Ensure you have Oracle already installed and started.
Connect to Oracle with SQL*Plus or a similar client and execute:
CREATE USER DNET IDENTIFIED BY DNET; GRANT CONNECT, RESOURCE, CREATE TABLE, CREATE VIEW, CREATE SEQUENCE TO DNET;
Open
net.nan21.dnet.properties
file and comment the existing database configuration and uncomment
the Oracle properties under
DATABASE CONFIGURATION
section. You should have the following as a result:
jdbc.driverClassName=oracle.jdbc.OracleDriver jdbc.url=jdbc:oracle:thin:@localhost:1521:XE jdbc.username=DNET jdbc.password=DNET
In case you used some other schema/user replace the values
accordingly. Also ensure that the host, port and service are correct.
These are the default values for the Oracle XE installed on your
local computer.
In this case also set sys.disableFetchGroups=true.
Due to license restrictions, the jdbc driver for Oracle database is
NOT shipped with DNet. You must download it separately from Oracle
website. Go to
http://www.oracle.com/technetwork/indexes/downloads/index.html
look for `JDBC Drivers` and select the version you want: `Oracle
Database 11g Release 2` or `Oracle Database 11g Release 1`. Choose
either
ojdbc6.jar
or
ojdbc5.jar
Moreover, Oracle doesn't provide an osgi ready version of their jdbc
so you'll have to do this conversion yourself. There are different
ways to do this, here is presented one simple approach which works
fine:
biz.aQute.bnd.jar
and rename it to something simple for example bnd.jar
ojdbc6.jar
and execute the following:
java -jar bnd.jar wrap ojdbc6.jarIn case of an error like 'java is not recognized ...' add the location of
$JAVA_HOME/bin
folder to your PATH environment variable. Please check the java
documentation. As a result of this step you should get a new file:
ojdbc6.barVIRGO_HOME/repository/usr
and replace the
.bar
extension with
.jar
Ensure you have the database engine installed and started.
Create the database user and schema. Open
net.nan21.dnet.properties
file and comment the existing database configuration and add the
properties for the new database under
DATABASE CONFIGURATION
section setting the values accordingly:
jdbc.driverClassName=... jdbc.url=... jdbc.username=... jdbc.password=...
Download the jdbc driver for your database (ensure it is the osgi
enabled version) and copy it under
VIRGO_HOME/repository/usr
The Extjs based user interfaces are static resources, plain javascript files, images, css files, etc. These may be deployed under a different web-server which provides only static content.
There are three main parts which may be configured to be served by such a static content provider:
Open
net.nan21.dnet.properties
file and under
WEB-UI CONFIGURATION
section configure the parameters to point to the desired locations.
Ensure that the desired content is published by that web server. Below
are some examples on how to do this with Apache Http server.
Example 3.1. DNet-Core extjs user interface elements
nan21.dnet.core.ui.extjs.jar
( You may use 7zip for this ) in a location let's say
C:/dnet/static_content/nan21.dnet.core.ui.extjs
Open
httpd.conf
and create an alias after the
DocumentRoot
parameter
Alias /nan21.dnet.core.ui.extjs "C:\dnet\static_content\nan21.dnet.core.ui.extjs\src\main\webapp"In
net.nan21.dnet.properties
set the following:
url.ui.extjs.core=http://localhost/nan21.dnet.core.ui.extjs
Example 3.2. DNet-Modules extjs user interface elements
nan21.dnet.module.XX.ui.extjs.jar
bundles ( You may use 7zip for this ) in a location let's say
C:/dnet/static_content/nan21.dnet.module.XX.ui.extjs
Open
httpd.conf
and create an alias after the
DocumentRoot
parameter for each of the modules as the following:
Alias /nan21.dnet.module.XX.ui.extjs "C:\dnet\static_content\nan21.dnet.module.XX.ui.extjs\src\main\webapp"In
net.nan21.dnet.properties
set the following:
url.ui.extjs=http://localhostThus the url for the module's extjs scripts will be
http://localhost/nan21.dnet.module.XX.ui.extjs