Unable to import from Jira 6.0.1 to YouTrack 5.0.2 using python script

Hi,

I'm currently trying to migrate our existing Jira 6.0.1 installation to a new YouTrack 5.0.2 installation using last version of script available on github (https://github.com/JetBrains/youtrack-rest-python-library/)

For now I have no issues created while trying to import and got a lot of "alreay exists" exception in YouTrack log. Projects and users are created, but not the issues.

Here is some of the issues I got in the log:

jetbrains.mps.webr.rpc.rest.runtime.RESTAlreadyExistsException: State [ Fixed ] already exists.
jetbrains.mps.webr.rpc.rest.runtime.RESTAlreadyExistsException: State [ Fixed ] already exists.
 at jetbrains.charisma.smartadmin.rest.ResponseUtil.assertExist(ResponseUtil.java:47)
 at jetbrains.charisma.customfields.complex.state.AdminCustomfieldStateBundleResource.getState(AdminCustomfieldStateBundleResource.java:194)
 at jetbrains.charisma.customfields.complex.state.AdminCustomfieldStateBundleResource.put_BundleNameStateName(AdminCustomfieldStateBundleResource.java:136)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
 at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
 at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
 at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
 at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
 at jetbrains.mps.webr.rpc.rest.runtime.DefaultRestRequestHandler.handle(DefaultRestRequestHandler.java:185)
 at jetbrains.mps.webr.runtime.requestProcessor.RestRequestProcessor.processRequest(RestRequestProcessor.java:47)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.processRequest(MainServlet.java:228)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.doGet(MainServlet.java:114)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.doPut(MainServlet.java:196)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:640)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at jetbrains.mps.webr.runtime.filter.QueryParameterFilter.doFilter(QueryParameterFilter.java:25)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.eclipse.jetty.continuation.ContinuationFilter.doFilter(ContinuationFilter.java:118)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
 at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:242)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
 at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
 at java.lang.Thread.run(Unknown Source)

jetbrains.mps.webr.rpc.rest.runtime.RESTAlreadyExistsException: Enum bundle value [ Major ] already exists.
jetbrains.mps.webr.rpc.rest.runtime.RESTAlreadyExistsException: Enum bundle value [ Major ] already exists.
 at jetbrains.charisma.smartadmin.rest.ResponseUtil.assertExist(ResponseUtil.java:47)
 at jetbrains.charisma.customfields.complex.enumeration.AdminCustomfieldBundleResource.getField(AdminCustomfieldBundleResource.java:189)
 at jetbrains.charisma.customfields.complex.enumeration.AdminCustomfieldBundleResource.put_BundleNameFieldValue(AdminCustomfieldBundleResource.java:133)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
 at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
 at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
 at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
 at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
 at jetbrains.mps.webr.rpc.rest.runtime.DefaultRestRequestHandler.handle(DefaultRestRequestHandler.java:185)
 at jetbrains.mps.webr.runtime.requestProcessor.RestRequestProcessor.processRequest(RestRequestProcessor.java:47)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.processRequest(MainServlet.java:228)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.doGet(MainServlet.java:114)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.doPut(MainServlet.java:196)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:640)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at jetbrains.mps.webr.runtime.filter.QueryParameterFilter.doFilter(QueryParameterFilter.java:25)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.eclipse.jetty.continuation.ContinuationFilter.doFilter(ContinuationFilter.java:118)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
 at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:242)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
 at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
 at java.lang.Thread.run(Unknown Source)

jetbrains.mps.webr.rpc.rest.runtime.RESTAlreadyExistsException: User [ ababilone ] already exists.
jetbrains.mps.webr.rpc.rest.runtime.RESTAlreadyExistsException: User [ ababilone ] already exists.
 at jetbrains.charisma.smartadmin.rest.ResponseUtil.assertExist(ResponseUtil.java:47)
 at jetbrains.charisma.customfields.complex.user.AdminCustomfieldUserBundleResource.getIndividualUser(AdminCustomfieldUserBundleResource.java:174)
 at jetbrains.charisma.customfields.complex.user.AdminCustomfieldUserBundleResource.put_BundleNameIndividualUserName(AdminCustomfieldUserBundleResource.java:128)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
 at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
 at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
 at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
 at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
 at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
 at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
 at jetbrains.mps.webr.rpc.rest.runtime.DefaultRestRequestHandler.handle(DefaultRestRequestHandler.java:185)
 at jetbrains.mps.webr.runtime.requestProcessor.RestRequestProcessor.processRequest(RestRequestProcessor.java:47)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.processRequest(MainServlet.java:228)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.doGet(MainServlet.java:114)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.doPut(MainServlet.java:196)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:640)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at jetbrains.mps.webr.runtime.filter.QueryParameterFilter.doFilter(QueryParameterFilter.java:25)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.eclipse.jetty.continuation.ContinuationFilter.doFilter(ContinuationFilter.java:118)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
 at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:242)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
 at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
 at java.lang.Thread.run(Unknown Source)

I'm using Python 2.7 on Windows 7.

Here is a part of the output from the python script:

C:\youtrack-rest-python-library-master\python>c:\Python27\python.exe jira2youtrack.py http://jira-srv:8080 admin ********** http://youtrack-srv:8080 root ******** SERV 15
source_url      : http://jira-srv:8080
source_login    : admin
target_url      : http://youtrack-srv:8080
target_login    : root
project_id      : SERV
('issues_count    : ', 15)
('skip_count      : ', 0)
<?xml version="1.0" ?><importReport><item id="ababilone" imported="false"><error fieldName="login" value="ababilone">Value is not unique</error></item></importReport>
2013-06-18 10:09:39
2013-06-18 10:09:39
<?xml version="1.0" ?><importReport><item id="ababilone" imported="false"><error fieldName="login" value="ababilone">Value is not unique</error></item></importReport>
2013-06-18 10:21:34
2013-06-18 10:21:34
...
prettyPrint();

Does anybody has encounter the same kind of problem ? Any solution so far ?

Thanks in advance for any help!
1 comment
Comment actions Permalink
Hello A.Babilone,

Import scripts are adopted with Pyton 2.6 version.
Also, did you remove all contents when attempt to reimport? Reimport assumes removing everything before new attempt to run the script.
Please, take a look at the reference http://confluence.jetbrains.com/display/YTD5/Import+from+Jira , retry and let us know how is it.

Thank you.
0

Please sign in to leave a comment.