Error creating a client for TeamCity REST

When trying to add a TeamCity server I get the following exception:

24 Jul 2012 12:13:09,839 ERROR [TeamcityRest        ] [QuartzJobProcessor0 ] [] Error creating a client for TeamCity REST
java.lang.IllegalStateException: Can't create local copy of transient entity in New state from another session. TeamcityServer (New)
java.lang.IllegalStateException: Can't create local copy of transient entity in New state from another session. TeamcityServer (New)
 at com.jetbrains.teamsys.dnq.database.TransientSessionImpl.newLocalCopy(TransientSessionImpl.java:930)
 at com.jetbrains.teamsys.dnq.database.TransientStoreUtil.reattach(TransientStoreUtil.java:74)
 at com.jetbrains.teamsys.dnq.association.PrimitiveAssociationSemantics.get(PrimitiveAssociationSemantics.java:31)
 at com.jetbrains.teamsys.dnq.association.PrimitiveAssociationSemantics.get(PrimitiveAssociationSemantics.java:88)
 at jetbrains.charisma.teamcity.rest.TeamcityRest.<init>(TeamcityRest.java:100)
 at jetbrains.charisma.teamcity.rest.TeamcityRest.create(TeamcityRest.java:309)
 at jetbrains.charisma.teamcity.rest.TeamcityRest$4.run(TeamcityRest.java:353)
 at jetbrains.mps.businessRules.runtime.TransactionalExecutor$1.invoke(TransactionalExecutor.java:16)
 at jetbrains.teamsys.dnq.runtime.txn._Txn.runNew(_Txn.java:253)
 at jetbrains.mps.businessRules.runtime.TransactionalExecutor.execute(TransactionalExecutor.java:14)
 at webr.framework.controller.BeanContainerAwareExecutorWrapper.execute(BeanContainerAwareExecutorWrapper.java:24)
 at jetbrains.charisma.persistent.QuartzThreadExecutor$1.run(QuartzThreadExecutor.java:17)
 at jetbrains.exodus.core.execution.RunnableJob.execute(RunnableJob.java:26)
 at jetbrains.exodus.core.execution.Job.run(Job.java:75)
 at jetbrains.exodus.core.execution.ThreadJobProcessor.executeJob(ThreadJobProcessor.java:116)
 at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.executeOrdinaryJob(JobProcessorQueueAdapter.java:168)
 at jetbrains.exodus.core.execution.JobProcessorQueueAdapter.doJobs(JobProcessorQueueAdapter.java:96)
 at jetbrains.exodus.core.execution.ThreadJobProcessor.run(ThreadJobProcessor.java:94)
 at jetbrains.exodus.core.execution.ThreadJobProcessor$1.run(ThreadJobProcessor.java:28)
 at java.lang.Thread.run(Unknown Source)

I using YouTrack 4.0.1. I did the same test on a 4.0 instance I have and it works fine (with the same TeamCity server).

Any ideas of what might be going on?

Thanks,
Gabe.
2 comments
Comment actions Permalink
So here is an update. I actually get this error when hitting the Test Connection link, before saving. If I ignore the error and proceed to save, everything works fine. If, after saving, I hit edit and then try to hit Test Connection again, now it works. So apparently, the error only happens when using Test Connection before you save.

Thanks,
Gabe.
0
Comment actions Permalink
Hello,
Thank you for your report. I've created an issue here: http://youtrack.jetbrains.com/issue/JT-15949.

Best regards,
  Alexander Volfman
0

Please sign in to leave a comment.