Before you begin installing JChem Cartridge, please, read the Introduction and the High Level Overview of the JChem Cartridge architecture.
If you encounter any problem during installation, do not hesitate to contact our technical support for assistance.
Environment variables specify "static" settings: for these settings to take effect JChem Server has to be restarted.
JAVA_HOME to the home directory
of a Sun Microsystems Java Development Kit version 1.4.2 or newer.
Set the JAVA_HEAP_SIZE variable which indicates the maximum amount of heap memory the Java runtime will be allowed to use. The amount of free physical memory on the JChemServer host should be large enough to accommodate the Java heap memory.
The amount of Java heap memory should be large enough to accommodate
The rule of thumb is that the structure cache needs 100 MB of memory for 1 million molecular structures. (For a detailed description of how to calculate the exact memory requirement of the search cache, see the FAQ.)
The memory overhead for each concurrent search is about 1.7MB per 100k hits. For example: if a particular JChem Cartridge installation is supposed to support 10 truly concurrent searches returning each (at the same time) a maximum of 1 million hits, JChem Server needs 170MB memory in addition to what is required for the structure cache.
Example: In order to allow the Java runtime to use up to 700 megabyte of heap memory, set the JAVA_HEAP_SIZE environment variable as follows:
on Windows:
SET JAVA_HEAP_SIZE=700m
on Unix/Linux (bash):
export JAVA_HEAP_SIZE=700m
If JChem Server host has an Oracle installation on it, set the
ORACLE_HOME environment variable to the home of the Oracle
installation like:
on windows:
set ORACLE_HOME="c:\oracle\ora92"
on Linux:
export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1
and the Oracle JDBC driver (the ojdbc14.jar file) bundled with
your Oracle installation will be used.
If you want JChem Server to use a JDBC driver different from (newer
than) what comes with the Oracle installation, set the
ORACLE_JDBC_DRIVER environment variable to the path of the desired
ojdbc14.jar file like:
on Windows:
SET ORACLE_JDBC_DRIVER=C:\chemaxon\oem_libs\ojdbc14.jar
on Unix/Linux (bash):
export ORACLE_JDBC_DRIVER=/opt/chemaxon/oem_libs/ojdbc14.jar
If the JChem Server host doesn't have an Oracle installation, the instructions in the section How to setup JChem Server and Oracle on two different hosts? apply.
Set the oracle.server.* parameters in the
cartridge/conf/jcart.properties file as appropriate. You
typically need to change only the oracle.server.instance
property, setting it to the database instance name (aka system identifier
or SID).
Please, see also How to setup JChem Server and Oracle on two different hosts?, if applicable.
Create a directory licenses in the cartridge
directory (in the working directory of the JChem Server) and drop the
license files received from ChemAxon's Sales into the licenses
directory. If you want JChem Server to retrieve the license files from
a different directory, set the license.dir property in the
jcart.properties file to the path of that directory.
The cartridge/licenses directory is supposed to hold the newly
issued license files which are XML files.
License codes issued for JChem versions prior to 5.0 are supposed to work in the same manner as with JChem versions prior to 5.0:
licenses.dat file in its old place
and start JChem Server with the same user as Tomcat used to be started
for JChem Cartridge versions prior to 5.0.
Using a command interpreter available on your platform (terminal on Unix/Linux,
Command Prompt on Windows), make the cartridge directory
your current working directory and call the server script
(server.sh on Unix/Linux server.bat on Windows) with
the start parameter:
bash server.sh start
Please, refer to Managing JChem Server for how
to stop JChem Server. In order to create system services for production use,
please, use the facilities provided on your platform for this purpose.
(Windows users will want to refer to Installing the JChem Server as a Windows NT
service. Linux/Unix users may want to look at the following Forum post:
http://www.chemaxon.com/forum/viewpost16398.html#16398)
connect and resolve
permissions (java.net.SocketPermission)
to the cartridge owner. Assuming that
call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' )
call dbms_java.grant_permission( 'JCHEM', 'SYS:java.net.SocketPermission', 'localhost', 'connect,resolve' )
Note that if Oracle and JChem Server are on different
machines, you have to replace localhost with
the name of the JChem Server host.
ORACLE_HOME environment variable to the directory
where the Oracle Database is installed. (You may have performed this
step already while Setting the path
to the Oracle JDBC driver for JChem Server.) Eg:
| On windows: | set ORACLE_HOME="c:\oracle\ora92" |
| On Linux: | export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1 |
JAVA_HOME to the home
directory of a Sun Microsystems Java Development Kit
version 1.4.2 or newer.
cartridge directory in the uncompressed
JChem package is writable by you.
cartridge
directory.
install script suitable for
your platform (install.sh for UNIX and Linux or
install.bat for Windows). (The Oracle RDBMS must be
running.)
The script loads the jcart.jar file into the Oracle
Database and creates PL/SQL functions, procedures, and other PL/SQL
objects needed by the cartridge.
The name and password of the cartridge owner have to be specified as
the first parameter of the script. The install script assumes that
JChem Server is running on the same host as Oracle and listens on the
1099 port by default. If any of the JChem Server connection parameters
differs from the default, a third argument must also be specified to
the install script indicating the JChem Server host and port:
For example:install.sh username/password[@connect_string] [<jchem.server.host>:<jchem.server.port>]
install.sh jchem/tiger@db
Connect to the database as the JChem-owner and execute the following:
call jchem_core_pkg.use_password('<passwd>');
where <passwd> is JChem-owner's password;
select jchem_core_pkg.getenvironment() from dual;
JCHEM_CORE_PKG.GETENVIRONMENT()
--------------------------------------------------------------------------------
Oracle environment:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
JChem Server environment:
Java VM vendor: Sun Microsystems Inc.
Java VM version: 1.5.0_14-b03
JChem version: 5.0.0alpha14
JCHEM_CORE_PKG.GETENVIRONMENT()
--------------------------------------------------------------------------------
JDBC driver version: 10.2.0.3.0
If your JChem Cartridge is correctly working with the cartridge owner, you can proceed to configure Oracle users to use JChem Cartridge.
jchem_core_pkg package in the JChem
owner's schema. (If you have special considerations (e.g.
you want to use multiple JChem Cartridge versions in the
same Oracle instance), you will have to create a private
synonym(s) for jchem_core_pkg and/or the other
objects.)
JCHEMUSER_ROLE.
grant connect to jchemuser_role; grant resource to jchemuser_role; grant create synonym to jchemuser_role; call dbms_java.grant_permission( 'JCHEMUSER_ROLE', 'SYS:java.net.SocketPermission', 'localhost', 'resolve'); call dbms_java.grant_permission( 'JCHEMUSER_ROLE', 'SYS:java.net.SocketPermission', 'localhost', 'connect,resolve');Note that if Oracle and JChem Server are on different machines, you have to replace
localhost with
the name of the JChem Server host.
jchem in the above example) connect as
the JChem-owner and execute:
call privman_pkg.grants_on_jcobjs('JCHEM', 'JCHEMUSER_ROLE');
JCHEMUSER_ROLE to the first JChem
Cartridge user candidate and test the
configuration with this user as you did with the
JChem-owner.
ojdbc14.jar file (with the file name itself included),
like:
on Windows:
SET ORACLE_JDBC_DRIVER=C:\chemaxon\oem_libs\ojdbc14.jaron Unix/Linux (bash):
export ORACLE_JDBC_DRIVER=/opt/chemaxon/oem_libs/ojdbc14.jar
jchem.server.host
in cartridge/conf/jcart.properties
oracle.server.host in
cartridge/conf/jcart.properties to the host name as the
Oracle host is visible from the JChem Server host.
bash install.sh jchem/tiger@mydb apollo:1099where
apollo is the JChem Server host name and 1099
is the JChem Server port as specified by the property
jchem.server.port in jcart.properties.
server.bat file as the
<path> component and server.bat as the
<application.ext> component.
In addition to the Application value, you also have to add an
AppDirectory and an AppParameters value under the
Parameters key created in step 3. The AppDirectory value
must be the path to the server.bat file. The
AppParameters value must be start.
For the first time after you created the service, the service has to be started
manually using the Services program in the Administrative Tools program group
(or Windows has to be restarted). It will be automatically restarted after each
Windows restart.
Note that this procedure will not give you a true Windows NT service: it will
only make sure that JChem Server is started at each restart. You still should
call server.bat stop in the command line, if you want to stop the
service.
SQL operators of the Cartridge can be used to search for chemical
data. SQL procedures are also defined to perform DML operations on
chemical tables. To increase the speed of the searching process, the jc_idxtype
index type has to be applied.
The structure tables and domain indexes of a given user initiating a given
cartridge operation must be accessible via the JDBC connection(s) opened in
the JChem Server for use by the fingerprint caching engine. Beginning with
JChem version 3.0.12 the recommended way to achieve this is for users to
call the PL/SQL procedure jchem_core_pkg.use_password(password
VARCHAR2) with their password as the parameter at the beginning
of each database session (see a brief description of the mechanism at work
here).
The function jchem_core_pkg.set_password(password
VARCHAR2) has a similar effect; it returns 0, if the password is
valid for the user, -1 otherwise.
If the password of a given user has not been set for JChem Server
via the use_password PL/SQL procedure,
the oracle.server.login and
oracle.server.password JChem Cartridge properties
will be used to open database connections in JChem Server.
If the jchem_core_pkg.use_password(password VARCHAR2)
call cannot be used by users or applications for some unlikely reason, the
user specified by the oracle.server.login property must have
the following privileges:
Please, note that the JChem Cartridge components which are executed in Oracle currently communicate with JChem Server using an open RMI protocol. This means that some kind of protection (e.g. a simple firewall) must be setup on the machine which hosts JChem Server to prevent unauthorized searches in the structure tables.
The server.{sh,bat} script can be
used for managing the JChem Server. It accepts one of the following
commands at a time:
start starts the JChem Server
stop stops the JChem Server
reload re-reads the following files
conf/jcart.properties by default), licenses directory (or
whatever directory has been specified using the
license.dir property int the master
configuration file),
conf/logging.properties by default)
setpassword sets the password that will be required
for administering JChem Server.
--no-pwprompt: do not prompt for a password.
--config-file <config-file>: use the
configuration file <config-file> instead of the
default conf/jcart.properties.
Each time it is run, the server script prompts for the administrative
password unless you specify the --no-pwprompt option. One
exception is the start command, for which you will never be
prompted for a password. Initially, no password is set. Until a password is
set with the setpassword command, you can just hit
<enter> when prompted for the password (or use the
--no-pwprompt for non-interactive use).
By default, JChem Server does not accept remote administrative calls. The
server script must therefore be run on the JChem Server host.
(In order to allow the JChem Server to be managed remotely using the
server script, you have to set the property
remote.admin.allowed to true. In case of
executing the server script on a remote JChem Server, the
jchem.server.host and jchem.server.port
properties must be appropriately set on the client machine where where the
script is executed. Note that you cannot start JChem Server remotely using
the server script.)
To remove JChem Cartridge drop all jc_idxtype
indexes or other pl/sql
objects that have been created after the installation
(including user defined operators added in support of
user
defined functions and supporting PL/SQL functions)
and run the uninstall
(uninstall.sh, uninstall.bat) script with
the user/password[@connect_string] argument. This script
drops every pl/sql type, function and other pl/sql objects that were
created by the install script and drops the JFunctions.class,
jchem.jar and dom4j.jar files.
cartridge
subdirectory of the new uncompressed JChem installation package.
bash upgrade.sh jchem/tiger@mydb
on Unix/Linux if the schema where JChem Cartridge is installed is
jchem, the password is tiger and the TNS name
of the database is mydb. If you see DROP statements (or ALTER
statements with a DROP clause) complaining of non-existent database
objects, you can safely ignore these error messages. The reason is that
the upgrade procedure tries to drop certain objects or object
attributes only to recreate them with their new signature or
implementation. These objects will be created as required even if they
did not exist in the JChem Cartridge version that is being upgraded
from.
If the Oracle database and the JChem Server are on different machines,
you need to specify the connection descriptor of the JChem Server as
the second argument to the upgrade script similarly to
the install script as described here. For example:
bash upgrade.sh jchem/tiger@mydb
jchem_core_pkg package in the JChem owner's schema.
jchem in the
above example).
call dbms_java.grant_permission( 'JCHEMUSER_ROLE', 'SYS:java.net.SocketPermission', 'localhost', 'resolve'); call dbms_java.grant_permission( 'JCHEMUSER_ROLE', 'SYS:java.net.SocketPermission', 'localhost', 'connect,resolve');
jchem_core_pkg.use_password stored procedure or the
jchem_core_pkg.set_password function to initiate sessions
in JChem Server for the current user.
jc_idxtype indexes
on you structure tables.