TRAC import error from getValueCountForField

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

When importing your TRAC information into JIRA you run into an error stating:

"org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getValueCountForField' in class com.atlassian.jira.plugins.importer.imports.config.ValueMappingHelperImpl threw exception class java.lang.NullPointerException : null"

atlassian-jira.log に次のエラーが返される。

2012-03-16 09:32:05,141 http-8080-1 ERROR user 572x253x1 7eiqcd 127.0.0.1 /secure/admin/views/ImporterFieldMappingsPage!default.jspa [plugins.importer.web.ImporterFieldMappingsPage] com.atlassian.jira.plugins.importer.SQLRuntimeException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
2012-03-16 09:32:05,141 http-8080-1 ERROR user 572x253x1 7eiqcd 127.0.0.1 /secure/admin/views/ImporterFieldMappingsPage!default.jspa [velocity] Method getValueCountForField threw exception for reference $action in template templates/admin/views/common/importerFieldMappingsPage.vm at  [26,22]
2012-03-16 09:32:05,141 http-8080-1 ERROR user 572x253x1 7eiqcd 127.0.0.1 /secure/admin/views/ImporterFieldMappingsPage!default.jspa [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException
java.lang.NullPointerException

原因

Your TRAC import file references the database where TRAC data is stored. JIRA does not have access to the database and as a result will not be able to pull data. 

You can diagnose this issue by taking a look at your TRAC export. Unzip the contents and take a look /<trac_unzip>/conf/trac.ini file. You should see a [trac] section with the following type of information.

[trac]
authz_file = 
authz_module_name = 
auto_reload = False
base_url = http://trac.mytrac.com/trac
check_auth_ip = true
database = mysql://trac:user@localhost:3306/trac
default_charset = iso-8859-15
htdocs_location = 
ignore_auth_case = false
mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search
metanav = login,logout,prefs,help,about
permission_store = DefaultPermissionStore
repository_dir = 
repository_type = 
show_email_addresses = false
timeout = 20

 ソリューション

Make sure your JIRA server can communicate with the database server for your TRAC instance. If your database is stored on another server, sql dump and restore the database somewhere that JIRA can reach.

Also make sure you are using the latest MySQL JDBC driver listed here.

 

 

 

 

 

 

 

 

 

 

 

 

Last modified on Mar 17, 2017

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.