Application Troubleshooting

Contents

Schemasetup Problems

java.lang.UnsupportedClassVersionError while running schemasetup.jar program

Make sure you're using Java 1.6.x. You can run "java -version" command to get the JRE version number.

Parameter "standard_conforming_strings" cannot be changed

When running schemasetup.jar, you get the above error. Please make sure you're using PostgreSQL version 8.2 or above.

database "xxx" does not exist

When running a install command, you see the following:

java -jar schemasetup-2.7.0.jar install username=my_postgres_user ...

...
Connecting to PostgreSQL Server Failed. FATAL: database "my_postgres_user" does not exist
Schema setup encountered errors

When the schema setup process tries to make a connection, by default, it tries to logon to the database name same as the username. In this case, create a blank database called "my_postgres_user". It won't be used for any purpose, but just leave that there, just in case.


Troubleshooting Application Problems

If there is any application problem (e.g. email, LDAP, file upload, etc) and/or you are getting a blank screen or HTTP server 500 error, the application would log the error message in one of the log files in Tomcat/logs directory. Check those log files as they usually give you some hints on what went wrong.

Problem connecting to database

When you get the error message saying problem connecting to database, database does not exist, please make sure you have run the schemasetup tool. Also, check to see if you put in the correct connection information in Application.properties file.

ERROR: duplicate key value violates unique constraint

You may run into this error if you manually insert data into database table. To fix this, you may simply need to reset some sequence ids. Looks at sp_admin_reset_all_sequences stored procedure on Postgres database. You'll see some select statements like this:

select setval('seq_asset_hardware_id', max(hardware_id)) from asset_hardware;

You do not need to run all of them, just the ones that has problem.


Trobleshooting Tomcat Problems

java.lang.UnsupportedClassVersionError while accessing the application

If you started Tomcat as a service and are getting this error, try starting Tomcat 6.0.x\bin\tomcat6w.exe, go to Java tab, make sure Java Virtual Machine field points to a jvm.dll from JRE 1.6.x

Problem starting Tomcat service

Copy C:\KwokServer\JRE 1.6.x\bin\msvcr71.dll file to the <windows>/system32 directory, then restart Tomcat.