It's all about the answers!

Ask a question

Error : Loggin in RTC server via java program ran on Websphere


Jayee Huang (1321111) | asked Apr 29 '13, 7:42 a.m.
Code:
String repositoryURL = "https://igartc02.swg.usma.ibm.com/jazz";
        String projectArea = "CIOLab";
        String userNmae = "IBM intranet id";
        String password = "IBM Intranet password";
         String originalFile="C:/work/RTC_creator/upload_temp/Jayee8.xls";
        String resultFile="C:/work/RTC_creator/upload_temp/Jayee8_re.xls";
        IProgressMonitor monitor = new NullProgressMonitor();

         TeamPlatform.startup();
           ITeamRepository teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURL);
            System.out.println("begin to log in");
           teamRepository.registerLoginHandler(new DefaultLoginHandler(userNmae,password));
            try {
            teamRepository.login(monitor);
            System.out.println("After Log in");
        } catch (Exception e) {
            e.printStackTrace();
        }

I set the userName and password as my IBM account. Following is what I have tested in different ways. And I imported all the jar files downloaded from Jazz.
1. Junit test.
    I create a Junit function in Eclipse to test. It works.
2. Tomcat test.
    I paste above code in a JSP file and deploy the application on a Tomcat. It works.
3. Websphere test.
   I paste above code in a JSP file and deploy the application on a Websphere(V7 and V8 I used). It doesn't       work.  Following is the error line:

ITeamRepository teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURL); 

 Following is the errror:
    com.ibm.websphere.servlet.error.ServletErrorReport: java.lang.ExceptionInInitializerError
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:695)
    at com.ibm._jsp._test._jspService(_test.java:118)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1663)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
    at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:259)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:353)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3944)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
    at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1049)
    at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.readyInboundPostHandshake(SSLConnectionLink.java:717)
    at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyHandshakeCompletedCallback.complete(SSLConnectionLink.java:413)
    at com.ibm.ws.ssl.channel.impl.SSLUtils.handleHandshake(SSLUtils.java:1066)
    at com.ibm.ws.ssl.channel.impl.SSLHandshakeIOCallback.complete(SSLHandshakeIOCallback.java:87)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
Caused by: java.lang.ExceptionInInitializerError
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
    at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:417)
    at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:526)
    at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:112)
    at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:131)
    at com.ibm._jsp._test._jspService(_test.java:101)
    ... 31 more
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:191)
    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:200)
    ... 36 more

One answer



permanent link
Martha (Ruby) Andrews (3.0k44351) | answered May 24 '13, 7:06 p.m.
JAZZ DEVELOPER
edited May 24 '13, 7:07 p.m.
Hello,
I think you may be running into Error running plain java app in WAS (76455) .  Comment 4 of that work item says:
"In our case, adding

RepositoryPackage.eINSTANCE.eContents();

before TeamPlatform.startup() resolved the issue"

Running the plain java client in WAS is not officially supported, so the above is an enhancement request.

This thread has steps that some folks have used to make it work:
https://jazz.net/forum/questions/75680/cant-connect-to-jazz-server-in-was-70?page=1&focusedAnswerId=75682#75682

Martha (Ruby) Andrews
Jazz Foundation L3 Developer

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.