pragma home page
QuestBYte home page
support
services
live demo
download
faq

FAQ pragma::tims



General

Linux

PostgreSQL


  • "Error: 4023" - "Error while establishing connection. Couldn't retrieve database URL"

    Two error sources are possible:

    1. If you are using PostgreSQL the following procedure should fix the problem. There are two relevant configuration files in the directory "data" of the PostgreSQL home directory (for example C:\Programme\PostgreSQL\8.1\data or /etc/postgresql/8.1/main/): pg_hba.conf and postgresql.conf.

    In the pg_hba.conf should be the entries of the IP addresses for the Tomcat server and the PostgreSQL server itself under "# IPv4 local connections:", for example:

    host all all 192.168.1.1/32 md5

    In the postgresql.conf the entry "listen_adresses" should look like the following:

    listen_addresses = '*'

    After a restart of PostgreSQL everything should work fine.

    2. It should be checked, if the WebStart applications are configured correctly. You can find the applications in the "webapps" directory of your Tomcat installation. For the two WebStart applications pragma::tims (directory pragma-tims) and pragma::admin (directory pragma-admin), there could be an error in the associated jnlp-file (tims.jnlp or admin.jnlp). There should be an entry like the following:

    <application-descmain-class="com.mceti.tims.sc.TimsLoginDialog">
    <argument>192.168.1.1:8080/pragma-tims/</argument>
    <argument>192.168.1.1:5432</argument>
    <argument>pragma_tims</argument>
    <argument>postgres</argument>
    </application-desc>

    This is the example for pragma::tims. Important are the IP addresses and ports within the <argument>-tags. The first "argument" is the tomcat IP address. The second one is the IP address of the database. Please correct these entries, if needed.

    In case the pragma::tims c3 is used the configuration for it can be checked in a similar way. The concerning file is located in <Tomcat-HOME>\webapps\pragma-tims-c3\WEB-INF\web.xml.

    Relevant is the entry:

    <context-param>
    <param-name>server.url</param-name>
    <param-value>192.168.1.1:5432</param-value>
    </context-param>

    The IP address should correspond to the address of the database server.

    In case any changes have been made, the Tomcat server should be restarted.

  • Tomcat not accessible.
    Error message: "Internal Error" - "Cannot establish connection to the server. Please verify that Tomcat is started." (Linux)

    • The file localhost.log (<Tomcat-HOME>\logs\) contains the Exception:
      StandardWrapperValve[AdminLoginDialogServlet]: Servlet.service() for servlet AdminLoginDialogServlet threw exception java.security.AccessControlException: access denied (java.util.PropertyPermission user.language write) ...
    • Add to the configuration file /etc/tomcat5/policy.d/03catalina.policy the following lines:
      // pragma::tims 
      grant codeBase "file:/var/lib/tomcat5/webapps/pragma-admin/-" {
      permission java.security.AllPermission; };
      grant codeBase "file:/var/lib/tomcat5/webapps/pragma-tims/-" {
      permission java.security.AllPermission; };
      grant codeBase "file:/var/lib/tomcat5/webapps/pragma-tims-c3/-" {
      permission java.security.AllPermission; };
    • Add to the configuration file /etc/tomcat5/policy.d/04webapps.policy the following:
      // pragma::tims
      permission java.util.PropertyPermission "user.language", "write";
  • Ticket cannot be created. "Error: 5056" - "There has been an exception." (PostgreSQL)

    The log file pragma_tims_BL_log.txt on the server (Tomcat logs) contains
    org.postgresql.util.PSQLException:
    ERROR: could not find tsearch config by local
    A simple solution to this problem is to replace the default locale of the database with that of the server. Start psql on the pragma::tims database and look at the locale of the database show. Change the server locale accordingly, e.g.:
    postgres@myserver:/$ psql pragma_tims -U postgres
    pragma_tims=# show lc_collate;
    lc_collate
    -------------
    en_US.UTF-8
    (1 row)
    pragma_tims=# UPDATE pg_ts_cfg SET locale = 'en_US.UTF-8'
    WHERE ts_name = 'default';
    UPDATE 1
    This should be sufficient for most cases. A more costly solution is to create a tsearch2-dictionary for your locale (see under "tearch2 configuration", further also under "could not find tsearch by locale").
  • How do I make a backup ("dump") of the database with PostgreSQL?

    Use the commando line tool pg_dump, which you can find in the "bin"-directory of PostgreSQL. For example (without line break):
    pg_dump -i -h localhost -p 5432 -U postgres -F p -D -v -f
    c:\pragma_tims.backup pragma_tims
    This dump contains the complete database WITHOUT the users. In case the database should be restored on the same PostgreSQL-Serer this is sufficient, because the users are already existent. For a backup containing all users the commando line tool pg_dumpall must be used, which dumps the complete database cluster incl. ALL users and ALL databases. For example:
    pg_dumpall > c:\database.backup -U postgres -p 5432
     
Contact  |  Impressum