It's all about the answers!

Ask a question

How to get past java.lang.ExceptionInInitializerError when using teamFetch in Ant


Richard Knechtel (611) | asked Feb 06 '15, 7:02 a.m.
edited Feb 06 '15, 7:06 a.m.
I am trying to create a headless build of a project using Rational Build Utility (RBU) using  a batch script and Ant.
I generated my password.txt file using  the build engine. We are using RTC 4.05.

Does anyone have any idea on how to fix this error/get around it/whats causes it?

Thank you,

Example Values being passed to <teamFetch> Ant task:
repositoryAddress=https://ourrationalbuild:9445/ccm/
userId=_someid
passwordFile=C:\Workspaces\Test2/build/password.txt
workspaceName=_someids project Workspace
destination=C:\Workspaces\Test2/Workspace-RTC
verbose=true

Ant Task:
<teamFetch repositoryAddress="${repository.address}" userId="${user.id}" passwordFile="${build.project.location}/${password.file}" workspaceName="${repository.workspace}" destination="${workspace.location}" verbose="true" />

Error:
BUILD FAILED
C:\Workspaces\Test2\build\ear.export.xml:54: The following error occurred while executing this line:
C:\Workspaces\Test2\build\LoadRepositoryWorkspace.xml:31: java.lang.ExceptionInInitializerError
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:259)
        at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:427)
        at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:102)
        at com.ibm.team.repository.client.internal.TeamRepositoryService.getUnmanagedRepository(TeamRepositoryService.java:141)
        at com.ibm.team.build.internal.scm.RepositoryManager.getTeamRepository(RepositoryManager.java:174)
        at com.ibm.team.build.internal.scm.RepositoryManager.createForUsernameAndPassword(RepositoryManager.java:121)
        at com.ibm.team.build.ant.task.AbstractTeamBuildTask.initializeRepositoryManager(AbstractTeamBuildTask.java:296)
        at com.ibm.team.build.ant.task.AbstractTeamBuildTask.getTeamRepository(AbstractTeamBuildTask.java:271)
        at com.ibm.team.build.ant.task.TeamFetchTask.doExecute(TeamFetchTask.java:217)
        at com.ibm.team.build.ant.task.AbstractTeamBuildTask.execute(AbstractTeamBuildTask.java:666)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:392)
        at org.apache.tools.ant.Target.performTasks(Target.java:413)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:392)
        at org.apache.tools.ant.Target.performTasks(Target.java:413)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:672)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:537)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.eclipse.ant.core.AntRunner.run(AntRunner.java:513)
        at com.ibm.ant.extras.RunAnt.run(RunAnt.java:74)
        at org.eclipse.ant.core.AntRunner.start(AntRunner.java:600)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.IllegalArgumentException: The type name Contributor and the namespace URI com.ibm.team.repository do not resolve to an IItemType.
        at com.ibm.team.repository.common.internal.querypath.AbstractQueryPathModel$Implementation.getItemType(AbstractQueryPathModel.java:192)
        at com.ibm.team.repository.common.query.IQuery$Factory.newInstance(IQuery.java:93)
        at com.ibm.team.repository.client.internal.ContributorManager.createAllContributorsQuery(ContributorManager.java:72)
        at com.ibm.team.repository.client.internal.ContributorManager.<clinit>(ContributorManager.java:60)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:237)
        ... 57 more


Be the first one to answer this question!


Register or to post your answer.