It's all about the answers!

Ask a question

NPE when using scm tool on automated build workspace


Chris Melikian (6672) | asked Nov 14 '08, 9:00 a.m.
I'm getting an NPE when running the command "scm status" in certain circumstances.

The message from the .log file is at the end of the post.

I'm using RTC 1.01 using the scm tool from the 1.01 RTC client and the 1.01 server.

The problem is doing an scm status with a workspace loaded automatically from the build.

I have another workspace checked out manually (using scm load from RTC 1.00) which works fine. If I manually load a workspace using RTC 1.01 scm load it works fine and doing an scm status on it works fine.

Is the automatically loaded build workspace in some way different from a normal load? I notice the automatically loaded version doesn't have a .metadata folder otherwise it is identical to a manually loaded workspace. I checked using WinMerge.

Any help appreciated.

Cheers, Chris.



!SESSION 2008-11-14 13:39:42.727 -----------------------------------------------
eclipse.buildId=unknown
java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows Server 2003 x86-32 j9vmwi3223-20080315 (JIT enabled)
J9VM - 20080314_17962_lHdSMr
JIT - 20080130_0718ifx2_r8
GC - 200802_08
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Framework arguments: status
Command-line arguments: -os win32 -ws win32 -arch x86 -data @noDefault status

!ENTRY org.eclipse.osgi 4 0 2008-11-14 13:39:46.727
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
at com.ibm.team.filesystem.cli.core.util.RepoUtil.getWorkspaceConnections(Unknown Source)
at com.ibm.team.filesystem.cli.core.util.PendingChangesUtil.printPendingChanges(PendingChangesUtil.java:249)
at com.ibm.team.filesystem.cli.client.internal.subcommands.StatusCmd.run(StatusCmd.java:90)
at com.ibm.team.filesystem.cli.core.internal.Application.run(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.doStart(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
at org.eclipse.equinox.launcher.Main.run(Unknown Source)

!ENTRY org.eclipse.osgi 2 0 2008-11-14 13:39:46.743
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2008-11-14 13:39:46.743
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.core.filesystem.linux.x86_1.1.0.v20070416.jar/ [67] was not resolved.
!SUBENTRY 2 org.eclipse.core.filesystem.linux.x86 2 0 2008-11-14 13:39:46.743
!MESSAGE Platform filter did not match: (& (osgi.os=linux) (osgi.arch=x86))

3 answers



permanent link
Ryan Manwiller (1.3k1) | answered Nov 14 '08, 11:08 a.m.
JAZZ DEVELOPER
The scm team may be able to say more, but it is my understanding that the
scm command line tool cannot be used on workspaces loaded by the JBE or
teamFetch ant task.

---
Ryan Manwiller
Jazz Team

permanent link
Chris Melikian (6672) | answered Nov 17 '08, 4:29 a.m.
The scm team may be able to say more, but it is my understanding that the
scm command line tool cannot be used on workspaces loaded by the JBE or
teamFetch ant task.

Thanks Ryan. Can I submit a bug report or feature request to make the scm tool give a better error message than an NPE then?

As an aside, why would scm not be able to work with workspaces or the ant task? I am trying to get the revision numbers of each component/workspace that I am using in the build in order to record them in the manifest.mf file of the compiled component. It's workable for workspaces I've checked out using scm but I suppose I'll have to use the built-in Ant properties that RTC supplies to get the revision numbers for the build workspace. It's a pain for me to have to differentiate between them otherwise it will do.

Cheers, Chris.

permanent link
Ryan Manwiller (1.3k1) | answered Nov 17 '08, 10:48 a.m.
JAZZ DEVELOPER
Please file a bug for SCM with the NPE stack.

See
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/47038
regarding the scm tool not working with the workspaces fetched by the ant
task or jbe.

As a result of that bug, a new ant task was created to get the last modified
times in a workspace. See
https://jazz.net/jazzdocs/topic/com.ibm.team.build.doc/topics/r_teamlastmodified.html

Your answer


Register or 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.