Skip to content

JCB FAQ

  • 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

    1
      For example if you are running a JSP application in Tomcat:
    
    • Stop Tomcat
    • Update the .jar files in Tomcat's lib directory.
    • Clearing Tomcat's cache is also recommended. This can be performed by deleting the content of /work directory.
    • Start 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.
      1
      Related forum topic: [https://forum.chemaxon.com/viewtopic.php?p=15322#15322](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
    Driver oracle.jdbc.OracleDriver
    URL format jdbc:oracle:thin:@::
    URL example jdbc:oracle:thin:@localhost:1521:mydb
    Supported versions 19c, 21c, 23ai
    Continually tested versions Oracle 19c Standard Edition,
    Oracle 21c Standard Edition
    Oracle 23ai 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://:/[?options]
    in the case of mariadb option useMysqlMetadata=true must be added
    jdbc:mysql:aurora://:/[?options]
    URL example jdbc:mysql://localhost:3306/mydb?useCursorFetch=true&defaultFetchSize=1000
    jdbc:mariadb://localhost:3306/mydb?useMysqlMetadata=true
    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://:<;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 17
    More information
    PostgreSQL Amazon Aurora PostgreSQL
    Driver org.postgresql.Driver
    URL format jdbc:postgresql://:/
    URL example jdbc:postgresql://localhost:5432/mydb
    Supported versions PostgreSQL 13, 14, 15, 16, 17
    Continually tested versions PostgreSQL 17
    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:

      • Incorrect URL to the database (it may occur during login)
      • Inappropriate username / password (it may occur during login)
      • Faulty JDBC or ODBC driver. Try a different one.

    • I get exception when I start JChemManager using Oracle's JDBC thin driver.

    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 programing 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

    • ##### Examples


      • Where can I find examples for using JChem?

        • A JSP (Java Server Pages) and ASP examples can be found in the examples directory. Please see {{/examples/index.html}} for a description.

      • How should I set the connection string in the case of ASP or other ADO capable environment?

    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
    1
    2
    3
    4
        var adoConnectionString=
        "DSN="+MyDSN+";"+
        "UID="+username+";"+
        "PWD="+password;
    
    • Example for an OLEDB connection to Oracle
    1
    2
    3
    4
    5
        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.
        1
        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