Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

how to get the workitem ID in RTC

Hi guys,

I am trying to automatically run a script when a workitem is saved in RTC. Is this possible? Can I customize the 'Save' button of a workitem in RTC? I am using build system toolkit to run the script.

I was thinking if I get the workitem ID(the unique number for every workitem), then I will be able to associate it to the build ID(of the build definition that is running my script). But I am not able to figure out how to get the workitem ID.

Please suggest.

Any other ideas?

Thanks,
Ananya

0 votes


Accepted answer


18 other answers

Permanent link
Hi Ananya,

I don't see why not. I would zip the files first and then transfer them. Make sure to use binary for the transfer.

0 votes


Permanent link
Thank you for the reply.
I was on page 46, configuring the launch of OSGI applicaiton in debug mode and when I clicked debug, I saw the following error on the console:

2012-05-04 14:48:09.296:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2012-05-04 14:48:12.843:INFO::jetty-6.1.x
2012-05-04 14:48:15.375:WARN::failed SocketConnector@0.0.0.0:7080: java.net.BindException: Address already in use: NET_Bind
2012-05-04 14:48:15.437:WARN::failed SslSocketConnector@0.0.0.0:7443: java.net.BindException: Address already in use: NET_Bind

2012-05-04 14:48:15.437:WARN::failed Server@1b4c1b4c: org.mortbay.util.MultiException
org.mortbay.util.MultiException
at org.mortbay.jetty.Server.doStart(Server.java:188)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.ibm.team.server.embedded.jetty.Activator.start(Activator.java:177)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(AccessController.java:241)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
java.net.BindException: Address already in use: NET_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:417)
at java.net.ServerSocket.bind(ServerSocket.java:342)
at java.net.ServerSocket.<init>(ServerSocket.java:208)
at java.net.ServerSocket.<init>(ServerSocket.java:164)
at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketConnector.java:80)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.ibm.team.server.embedded.jetty.Activator.start(Activator.java:177)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(AccessController.java:241)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
java.net.BindException: Address already in use: NET_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:417)
at java.net.ServerSocket.bind(ServerSocket.java:342)
at java.net.ServerSocket.<init>(ServerSocket.java:208)
at java.net.ServerSocket.<init>(ServerSocket.java:164)
at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java)
at com.ibm.jsse2.hc.<init>(hc.java:40)
at com.ibm.jsse2.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:3)
at org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:450)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.ibm.team.server.embedded.jetty.Activator.start(Activator.java:177)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(AccessController.java:241)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
java.net.BindException: Address already in use: NET_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:417)
at java.net.ServerSocket.bind(ServerSocket.java:342)
at java.net.ServerSocket.<init>(ServerSocket.java:208)
at java.net.ServerSocket.<init>(ServerSocket.java:164)
at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketConnector.java:80)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.ibm.team.server.embedded.jetty.Activator.start(Activator.java:177)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(AccessController.java:241)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
java.net.BindException: Address already in use: NET_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:417)
at java.net.ServerSocket.bind(ServerSocket.java:342)
at java.net.ServerSocket.<init>(ServerSocket.java:208)
at java.net.ServerSocket.<init>(ServerSocket.java:164)
at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java)
at com.ibm.jsse2.hc.<init>(hc.java:40)
at com.ibm.jsse2.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:3)
at org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:450)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.ibm.team.server.embedded.jetty.Activator.start(Activator.java:177)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(AccessController.java:241)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
2012-05-04 14:48:16.406 - FrameworkManager: An error event has occurred involving the bundle "org.eclipse.core.resources_3.5.2.R35x_v20091203-1235 ".
org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Another singleton version selected: org.eclipse.core.resources_3.5.3.R35x_v20100928-0452
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1313)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1297)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:309)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)

Not sure how to resolve this.

I have not used port 7080 so far and is there a place where I should update my server IP because I see 0.0.0.0 in the errors.

Please guide.

Thanks,
Ananya

0 votes


Permanent link
The workshop explains how to configure the launches and what to start and stop in a certain order. It is important to follow the material really very accurate. Especially starting and stopping applications.

What you are seeing: As described in the section you refer to the port 7443 is used by the OSGI launch. If the port is in use I would check if I have more than one debug configuration running. You can only run one debug server at once if these servers try to bind to the same well known port. Terminate all and retry. This usually solves such problems. If it still fails, exit Eclipse and try again. Check if there are demon processes such as tomcat or jetty or reboot your machine to get rid of them. You can also check with various tools who is listening to a port.

BTW: I always remove terminated launches, so that I am sure which run.

0 votes


Permanent link
Hi,

I was working on the last lab of the documentation.

As mentioned in page 148-149, I added the buildOnState.ini and the features, plugins, site.xml to the respective folders. Since my server is on Linux, I zipped the folders and FTPed them to the server locations.

After that step, I started the server. When I tried to open the URL https://localhost:9443/ccm/admin I am getting the "Firefox can't establish a connection to the server" error.

During the server startup, no error is seen though.

Please guide forward.

Thanks,
Ananya

0 votes


Permanent link
What I can think of is:

- check the server logs and outputs
- FTP the files to a different location and open them on Linux - make sure you have the correct line endings. Edit and save the files if necessary. I have seen several issues if using Windows encoding on Linux.

0 votes


Permanent link
Hi Ralph,

Thank you for replying. I repeated the steps and it worked. I have completed the documentation. But the build.xml is not running! I am able to request the build as shown in the documentation. I expected that when I put a build.xml in the location that we mentioned in 'our.integration.build', the build.xml would be invoked and that it would run. But it is not completing, it remains in the 'Pending' state only.

Another question that I have is, if I make any changes to the code, should I deploy the server everytime? If yes, how can I do so?

Kindly guide.

Thanks,
Ananya

0 votes


Permanent link
Hi Ralph,

Thank you for replying. I repeated the steps and it worked. I have completed the documentation. But the build.xml is not running! I am able to request the build as shown in the documentation. I expected that when I put a build.xml in the location that we mentioned in 'our.integration.build', the build.xml would be invoked and that it would run. But it is not completing, it remains in the 'Pending' state only.
Ananya


This is as designed. The pending shows it would run. You would have to have a running Jazz build engine deployed on some machine and run the JBE. This was not the intention of the workshop since it is pending in the queue the build process shows it would get processed if there were an active build engine. Please consult the help on how to set up the Jazz build engine.


Another question that I have is, if I make any changes to the code, should I deploy the server everytime? If yes, how can I do so?

Kindly guide.

Thanks,
Ananya


If you change the code and don't redeploy it, the old code runs.

Typically you debug with Jetty and only deploy the final code. If you need to redeploy, the easiest way to do it is to recompile and redeploy. In Update sites you can delete the Jar's and other files that get generated, regenerate and redeploy.

You can - to make sure - delete the feature and plug-ins in the Eclipse Client - provided you have chosen an easy name to search for. Then redeploy with Eclipse mechanisms. Or you copy the features and plugins or Jar's over.
Dependent on how you deploy and what you might have to run eclipse with -clean. This is if you copy over.

There are also more advanced mechanisms e.g. feature patches. I can't provide insight here. I would suggest to search Eclipse.org for those.

0 votes


Permanent link


If you change the code and don't redeploy it, the old code runs.

Typically you debug with Jetty and only deploy the final code. If you need to redeploy, the easiest way to do it is to recompile and redeploy. In Update sites you can delete the Jar's and other files that get generated, regenerate and redeploy.

You can - to make sure - delete the feature and plug-ins in the Eclipse Client - provided you have chosen an easy name to search for. Then redeploy with Eclipse mechanisms. Or you copy the features and plugins or Jar's over.
Dependent on how you deploy and what you might have to run eclipse with -clean. This is if you copy over.

There are also more advanced mechanisms e.g. feature patches. I can't provide insight here. I would suggest to search Eclipse.org for those.


If you use RTC to version what you develop you should add the files generated e.g. in update sites to the Jazz ignore list, so that they don't get checked into SCM.

0 votes

Comments

Hi Ralph,

Thanks for the help.

I ran a Jazz build engine using JBE and I have defined the build.

While requesting build, I am getting the error "com.jcraft.jsch.JSchException: Auth fail". I am using the sshexec ANT command to connect to a remote machine in my build.

I found this solution for the error - "http://www.coderanch.com/t/107782/tools/Ant-SshExec-task-throwing-JschException" but I am not able to read,edit or change permissions for the file sshd-config.

Please help.

Thanks, Ananya


Permanent link
Hi Ralph,

Thanks for the help.

I ran a Jazz build engine using JBE and I have defined the build.

While requesting build, I am getting the error "com.jcraft.jsch.JSchException: Auth fail". I am using the sshexec ANT command to connect to a remote machine in my build.

I found this solution for the error - "http://www.coderanch.com/t/107782/tools/Ant-SshExec-task-throwing-JschException"
but I am not able to read,edit or change permissions for the file sshd-config.

Please help.

Thanks,
Ananya

0 votes

1–15 items
page 2of 1 pagesof 2 pages

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Apr 12 '12, 6:04 a.m.

Question was seen: 19,808 times

Last updated: Jun 13 '12, 2:48 a.m.

Confirmation Cancel Confirm