Trying to import a trac project results in ERROR: relation "ticket" does not exist
Symptoms
The following appears in the atlassian-jira.log
:
2013-11-12 01:10:40,310 http-bio-8080-exec-20 ERROR xxxxx 70x665x1 xxxxx xxx.xx.x.xx,0:0:0:0:0:0:0:1 /secure/admin/ImporterFieldMappingsPage!default.jspa [plugins.importer.web.ImporterFieldMappingsPage] Unexpected exception
com.atlassian.jira.plugins.importer.SQLRuntimeException: ERROR: relation "ticket" does not exist
Position: 29
at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDb(JdbcConnection.java:177)
at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDbAppendCollection(JdbcConnection.java:152)
at com.atlassian.jira.plugins.importer.imports.AbstractStatusValueMapper.getDistinctValues(AbstractStatusValueMapper.java:61)
....
Caused by: org.postgresql.util.PSQLException: ERROR: relation "ticket" does not exist
Position: 29
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
...
Cause
Tarc database doesn't see have table 'ticket' and it's required for trac to import in JIRA mechanism.
Resolution
First Assessment:
If the table 'ticket' doesn't exist in trac database, please create the table (it can be empty) such as :
CREATE TABLE `ticket` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` text,
`time` bigint(20) DEFAULT NULL,
`changetime` bigint(20) DEFAULT NULL,
`component` text,
`severity` text,
`priority` text,
`owner` text,
`reporter` text,
`cc` text,
`version` text,
`milestone` text,
`status` text,
`resolution` text,
`summary` text,
`description` text,
`keywords` text,
PRIMARY KEY (`id`),
KEY `ticket_time_idx` (`time`),
KEY `ticket_status_idx` (`status`(255))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Second Assessment:
Make sure the trac table is point to the correct schema.
E.g:
jdbc:postgresql://localhost:5432/mydatabase?searchpath=myschema
Run the following SQL command to manually change your database schema
ALTER USER trac SET search_path to '<myschema>';
resulted in the correct schema being used.
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.