Cannot login to Jazz server "Badly configured client." errors in WAS 8 Batch environment . Standalone program work

I need assistance in resolve a seeming simple login exception when the repository login is implemented in my batch app when deployed i This is the eaxct same problem described here except I am using WAS 8 . I have also worked through most of the easier to implement or clear recommendations but they have not work
https://jazz.net/forum/questions/75680/cant-connect-to-jazz-server-in-was-70
I need some clear recommendations on what to check for or how to fix the errors. A bit of emergency so I appreciated all help
The login is very generic but unable to get a handle to repository when I use it extract the processclientservice to access existing project area.
Nullpointer exceptions every when Itried to use the repository handle later.
The same code works in a standalone program but when deployed in the Batch app deployed on the WAS 8 . I am unable to get a handle to the repository. The only relevant error showing up is the
"com.ibm.team.repository.common.TeamRepositoryException: Badly configured client. Missing a foundation component tag."
com.ibm.team.repository.common.TeamRepositoryException: Badly configured client. Missing a foundation component tag.
com.ibm.team.repository.client.internal.TeamRepository.checkServerVersionMatches(TeamRepository.java:1688)
com.ibm.team.repository.client.internal.TeamRepository.internalLogin(TeamRepository.java:1472)
com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:640)
d4.batch.OutputStream.RTCWriter.open(RTCWriter.java:204)
com.ibm.ws.gridcontainer.batch.impl.StepManagerImpl._openBatchDataStreams(StepManagrImpl.java:740)
com.ibm.ws.gridcontainer.batch.impl.StepManagerImpl.setupStep(StepManagerImpl.java:201)
com.ibm.ws.gridcontainer.security.actions.SetupStepBatchUserPrivilegedAction.executeAction(SetupStepBatchUserPrivilegedAction.java:45)
Change class loader to parent last and also Packaged the 4.0.0.1 Java client lib as utility jar but they have not helped
RepositoryPackage.eINSTANCE.eContents() call was not useful either
On the WAS8 I have included RTC API lib via the ws.ext.dirs jvm custom property and that helped resolved a lot of class not found errors earlier on
I am assuming it has to do with when/what classes are picked up but I am not even sure how best to debug . Class loader traces appear cumbersome and difficult to get anything use
Is there anything in WAS 8/Java Client api 4.0.0.1/4.0. that may causing a problem here
Any recommended steps to debug ?
I have also gone through suggestions from various similar errors at the following link but so far not helpful
https://jazz.net/forum/questions/47074/teamrepositoryexception-badly-configured-client
Left out the initialization and declarations
*****************************
TeamPlatform.startup();
RepositoryPackage.eINSTANCE.eContents();
repository =TeamPlatform.getTeamRepositoryService().getTeamRepository(REPOSITORY_ADDRESS);
repository.registerLoginHandler(new ITeamRepository.ILoginHandler() {
public ILoginInfo challenge(ITeamRepository repository) {
return new ILoginInfo() {
public String getUserId() {
return "XXXXXXX";
}
public String getPassword() {
return "XXXXXX";
}
};
}
});
processClient = (IProcessClientService) teamRepository
.getClientLibrary(IProcessClientService.class);
URI uri= URI.create(projectarea.replaceAll(" ", "%20"));
try {
projectArea= (IProjectArea) processClient.findProcessArea(uri, null, monitor);
workItemType = workItemClient.findWorkItemType(projectArea, "defect", monitor);
} catch (TeamRepositoryException e) {
e.printStackTrace();
}
System.out.println(" Found projectArea new " + projectArea );
**************************************
https://jazz.net/forum/questions/75680/cant-connect-to-jazz-server-in-was-70
I need some clear recommendations on what to check for or how to fix the errors. A bit of emergency so I appreciated all help
The login is very generic but unable to get a handle to repository when I use it extract the processclientservice to access existing project area.
Nullpointer exceptions every when Itried to use the repository handle later.
The same code works in a standalone program but when deployed in the Batch app deployed on the WAS 8 . I am unable to get a handle to the repository. The only relevant error showing up is the
"com.ibm.team.repository.common.TeamRepositoryException: Badly configured client. Missing a foundation component tag."
com.ibm.team.repository.common.TeamRepositoryException: Badly configured client. Missing a foundation component tag.
com.ibm.team.repository.client.internal.TeamRepository.checkServerVersionMatches(TeamRepository.java:1688)
com.ibm.team.repository.client.internal.TeamRepository.internalLogin(TeamRepository.java:1472)
com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:640)
d4.batch.OutputStream.RTCWriter.open(RTCWriter.java:204)
com.ibm.ws.gridcontainer.batch.impl.StepManagerImpl._openBatchDataStreams(StepManagrImpl.java:740)
com.ibm.ws.gridcontainer.batch.impl.StepManagerImpl.setupStep(StepManagerImpl.java:201)
com.ibm.ws.gridcontainer.security.actions.SetupStepBatchUserPrivilegedAction.executeAction(SetupStepBatchUserPrivilegedAction.java:45)
Change class loader to parent last and also Packaged the 4.0.0.1 Java client lib as utility jar but they have not helped
RepositoryPackage.eINSTANCE.eContents() call was not useful either
On the WAS8 I have included RTC API lib via the ws.ext.dirs jvm custom property and that helped resolved a lot of class not found errors earlier on
I am assuming it has to do with when/what classes are picked up but I am not even sure how best to debug . Class loader traces appear cumbersome and difficult to get anything use
Is there anything in WAS 8/Java Client api 4.0.0.1/4.0. that may causing a problem here
Any recommended steps to debug ?
I have also gone through suggestions from various similar errors at the following link but so far not helpful
https://jazz.net/forum/questions/47074/teamrepositoryexception-badly-configured-client
Left out the initialization and declarations
*****************************
TeamPlatform.startup();
RepositoryPackage.eINSTANCE.eContents();
repository =TeamPlatform.getTeamRepositoryService().getTeamRepository(REPOSITORY_ADDRESS);
repository.registerLoginHandler(new ITeamRepository.ILoginHandler() {
public ILoginInfo challenge(ITeamRepository repository) {
return new ILoginInfo() {
public String getUserId() {
return "XXXXXXX";
}
public String getPassword() {
return "XXXXXX";
}
};
}
});
processClient = (IProcessClientService) teamRepository
.getClientLibrary(IProcessClientService.class);
URI uri= URI.create(projectarea.replaceAll(" ", "%20"));
try {
projectArea= (IProjectArea) processClient.findProcessArea(uri, null, monitor);
workItemType = workItemClient.findWorkItemType(projectArea, "defect", monitor);
} catch (TeamRepositoryException e) {
e.printStackTrace();
}
System.out.println(" Found projectArea new " + projectArea );
**************************************
One answer

This was resolved after repeating the sa,m e
1. I changed the classloader mode and policy. (Right Click on the EAR -> Java EE -> Open WebSphere Application Server Deployment, go to Application section and make Classloader mode: PARENT_LAST and WAR classloader policy: APPLICATION)
2. Created a shared library to point the client api library
1. I changed the classloader mode and policy. (Right Click on the EAR -> Java EE -> Open WebSphere Application Server Deployment, go to Application section and make Classloader mode: PARENT_LAST and WAR classloader policy: APPLICATION)
2. Created a shared library to point the client api library