could not fit into structure cache (out of memory)." .
This indicates that the table could not be loaded into the structure cache due to lack of sufficient memory. There should be sufficient memory for the Java Virtual Machine (JVM) to load the structural and fingerprint information of all structure tables.
Please see the section describing how to allocate the memory need for your structure tables.
The out of memory section describes how to allocate more memory for the JVM.
Installation and configuration
-
How to upgrade to a new JChem version?
These are the steps that you should follow at upgrading:
-
Download the latest JChem installation package
-
Make sure no JChem applications are running
-
Replace your old JChem directory with the contents of the new package. (delete/move the old directory and extract the package to the same location)
-
Run the JChemManager (jcman) GUI, or execute the following command to update in text mode:
jcman u
-
The application will automatically prompt you for the upgrades. Some of these changes are quick, however the regeneration of the tables can take for a while. The time requirement for table regeneration is comparable to the time of importing the same number of structures.
-
If you are using JChem from other (standalone or web) applications, make sure you also update the .jar files used by them. These jar files are located under the jchem\lib directory in the unpacked package. You should also restart these applications, so they can load the new code from the updated .jar files
For example if you are running a JSP application in Tomcat:
-
JCMAN GUI does not work via X between Linux (server) and Windows (client)
It is possible that JCMAN GUI does not work on Linux server with Windows client via X sever in some cases. Opening your ssh connection with -Y option may solve the problem.
Related forum topic: https://forum.chemaxon.com/viewtopic.php?p=15322#15322
How should I set the "JDBC driver" and "URL of database" fields for starting JChemManager?
One can find simple examples of JDBC URL and driver strings in the tables below.
(For more complex cases please see the documentation of the JDBC driver.)
Notes:
ODBC connection is only tested and supported for Microsoft Access. For other databases the native JDBC drivers should be used.
For Oracle only the "thin" driver is tested and recommended ("oci" connection is not supported).
Supported databases:
Oracle
MySQL
IBM DB2
Microsoft SQL Server
HSQLDB /HXSQL
Microsoft Access
Derby
PostgreSQL
Composite
InterBase
Oracle |
|
Driver |
oracle.jdbc.OracleDriver |
URL format |
jdbc:oracle:thin:@<host>:<port>:<SID> |
URL example |
jdbc:oracle:thin:@localhost:1521:XE |
Supported versions |
12.1.0.2, 12.2.0.1, 12.2.0.2 (18c), 12.2.0.3 (19c) |
Continually tested versions |
Oracle 19c Standard Edition |
|
More information |
MySQL Amazon Aurora MySQL |
|
Driver |
org.mariadb.jdbc.Driver(up to version 17.3.27: com.mysql.jdbc.Driver) |
URL format URL format for Aurora |
jdbc:mysql://<host>:<port>/<database>[?options] jdbc:mysql:aurora://<host>:<port>/<database>[?options] |
URL example |
jdbc:mysql://localhost:3306/mydb?useCursorFetch=true&defaultFetchSize=1000 |
Supported versions |
MySQL 5.7. 8.0 |
Continually tested versions |
MySQL 8.0 |
|
More information |
IBM DB2 |
|
Driver |
com.ibm.db2.jcc.DB2Driver |
Supported versions |
IBM DB2 10.5, 11.1, 11.5 |
|
More information |
MS SQL Server |
|
Driver |
com.microsoft.sqlserver.jdbc.SQLServerDriver |
URL format |
jdbc:sqlserver://<host>:<port><;databaseName=database>[;options] |
URL Example |
jdbc:sqlserver://localhost:1433;databaseName=mydb;selectMethod=cursor Note : schema name cannot be specified; jchem uses the default schema: 'dbo' |
Supported versions |
MS SQL Server 2012, 2014, 2016, 2017, 2019 |
Continually tested versions |
MS SQL Server 2012 |
|
More information |
HSQLDB / HXSQL |
|
Driver |
org.hsqldb.jdbcDriver |
URL format |
jdbc:hsqldb:hsql://[host]/[database] |
URL Example |
jdbc:hsqldb:hsql://localhost/ |
Supported versions |
HSQLDB 2.4, 2.4.1, 2.5, 2.5.1, 2.6 |
|
More information |
MS Access via ODBC |
|
Driver |
sun.jdbc.odbc.JdbcOdbcDriver |
URL format |
jdbc:odbc:[odbc data source][;options] |
URL example |
jdbc:odbc:mydatasource |
Supported versions |
all via odbc |
Derby |
|
Driver |
org.apache.derby.jdbc.EmbeddedDriver |
URL format |
jdbc:derby:[subprotocol]:[database with path][;create=true][;options] |
URL example |
jdbc:derby:/c:/databases/mydb;create=true |
Supported versions |
versions embedded with Java |
Continually tested versions |
versions embedded with Java 1.6 |
|
More information |
PostgreSQL Amazon Aurora PostgreSQL |
|
Driver |
org.postgresql.Driver |
URL format |
jdbc:postgresql://<host>:<port>/<database> |
URL example |
jdbc:postgresql://localhost:5432/mydb |
Supported versions |
PostgreSQL 9.6, 10, 11, 12, 13 |
Continually tested versions |
PostgreSQL 10.7 |
|
More information |
Composite |
|
Driver |
cs.jdbc.driver.CompositeDriver |
URL format |
jdbc:compositesw:dbapi@[host]:[port]?domain=<domain name>&dataSource=<database> |
URL example |
jdbc:compositesw:dbapi@10.0.0.100:9401?domain=composite&dataSource=virtualdb |
|
More information |
InterBase |
|
Driver |
interbase.interclient.Driver |
URL format |
jdbc:interbase:[path to interbase data file (.gdb file)] |
URL example |
jdbc:interbase://localhost/c:/interbase/interbasedb.gdb |
Supported versions |
InterBase 2017, 2020 |
|
More information |
-
Why do I get SQLException or other error when I use JChemManager?
The most probable causes:
Make sure that the URL is appropriate (e.g: jdbc:oracle:thin:@myhost:1521:mySID). Check if all needed services run (the listener service is necessary).
-
JChem Manager and chemaxon.jchem.db.Importer fails to import date formats into PostgreSQL tables which otherwise work with psql or other non-JDBC-based clients
If this is a date or time stamp format which works using psql or other non-JDBC-based database clients, you have likely run into this PostgreSQL JDBC issue:
The work-around is to to append stringtype=unspecified
to the connection.jdbcUrl:
connection.jdbcUrl=jdbc\:postgresql\://localhost\:5432/jcbtest?stringtype=unspecified
-
Integration
-
How can I use the JChem API from my favorite programming language (C++, C#, .NET, Python, Javascript, Perl)?
For users of the .NET API, the JChem API can be integrated into .NET applications by the .NET Packages. Other web service compatible languages (including C++ and C#) can use JChem Web Services.
-
How can I use the JChem tools as a web service?
Many of the JChem tools are available as web services. See the JChem Web Services Server for more information
If you would like to call SQL statements using ADO, you may choose between ODBC and OLEDB connections. (ADO can not contact to the databases through JDBC drivers.)
- Example for an ODBC connection
var adoConnectionString=
"DSN="+MyDSN+";"+
"UID="+username+";"+
"PWD="+password;
- Example for an OLEDB connection to Oracle
var adoConnectionString=
"Provider=MSDAORA.1;"+
"Data Source="+myServiceName+";"+
"User ID="+username+";"+
"Password="+password;
(The above examples use the JavaScript syntax)
In the case of Oracle, if an error occurs, please see HOWTO: Troubleshoot an ASP-to-Oracle Connectivity Problem
-
-
Copy/paste doesn't work with a certain Look and Feel.
Keyboard shortcuts for Copy/Paste/Cut functions may vary by Look and Feel. For example in the case of Windows Look and Feel these are CTRL+C,CTRL+V
, and CTRL+X
, respectively. In the case of Motif LF the shortcuts for the same commands are: CTRL+INS,SHIFT+INS
, and SHIFT+DEL
.
-
Common issues
- I get the following exception using MySQL: com.mysql.jdbc.PacketTooBigException: Packet for query is too large
Please increase the value of the "max_allowed_packet" variable for MySQL. The following line should be added to the configuration file "my.ini" under the [mysqld] section :
max_allowed_packet = 100M
-
For some structures the database field "cd_smiles" is null . Why?
JChem works with the standardized form of imported structures stored in Chemaxon Extended SMILES format. This extended format can represent a wider range of structures than SMILES, but there are still some cases, when this format is not applicable. In these cases the "cd_smiles" field is null , and JChem uses the "cd_structure" field for these rows. (The "cd_structure" represents the structures in the original input format)
Currently the cd_smiles is null in the following cases:
-
Structure contains radicals
-
Structure contains R-groups
-
the SMILES would be too long for the database field (very large molecules).
In these cases the search is slower, since the target structures have to be standardized on the fly.
Note: For most databases the size of the "cd_smiles" field can be increased at the table creation dialog (in the SQL text). The increased length is automatically utilized. This can speed up the search if a high percentage of the structures are huge.
-
I get the following error message : " The structure table contains obsolete data. Please regenerate the table. " What does it mean ?
Sometimes there are some changes in the data structure of JChem, which are incompatible with earlier versions. To obtain correct search result, the regeneration of the old structure tables is necessary. For more information and instructions please see the administration guide.
-
In DB2 databases, row length of JChem structure tables has been increased
Please, be aware of the increased (by about 1K) row lengths of the JChem structure tables from JChem 6.1.2. It's possible that the new row length will reach the maximum row length allowed in your database. In this case the extended row size support must be enabled or the page size of the tablespace must be increased manually.
-
How to check for duplicates in duplicate filtered tables
Because of a bug - fixed in JChem version 17.29.0 - duplicates could have been inserted in tables with duplicate filtering set on if there were too many structures with the same hash code already in the database. Starting from JChem version 18.1.0, a command line tool duplicatecheck is provided for finding the duplicates in a JChem table. This tool is available in the bin folder of JChem. For detailed help please run:
duplicatecheck -help