It's all about the answers!

Ask a question

Using the JazzPlainJavaClient on WebSphere App Server


Andy Berner (61127) | asked Oct 14 '08, 9:41 p.m.
We have a servlet that will run in one appserver that calls RTC running on a different machine. If the servlet is running on Tomcat, we can put the jars from the JazzPlainJavaClient in the WEB-INF/lib directory and all is well. It can also go in the shared/lib directory so that multiple apps running on this instance can access RTC (it doesn't matter whether RTC is running on Tomcat or WAS).

But if the servlet is running on WAS 6.1, I can't get it to work. If I put the JazzPlainJavaClient jars in the WEB-INF/lib directory within a WAR file and deploy it to WAS, when you start the servlet app you get errors about plugins not being resolved, and when you run the servlet, you get various exceptions thrown. I also tried putting the jars in the lib/ext directory of the app server; then the servlet app didn't throw any errors when it started, but got the same errors when the servlet ran--the log is below.

So how can we deploy a servlet to WAS that calls RTC?

Here's the log from a run of the servlet on WAS 6.1 Express. You can see it gets to com.ibm.team.repository.client.TeamPlatform.startup, so I believe it's seeing the client library jars:

0000001e SystemErr R log4j:WARN No appenders could be found for logger (org.apache.struts.action.ActionServlet).
0000001e SystemErr R log4j:WARN Please initialize the log4j system properly.
0000001e SystemErr R java.lang.StringIndexOutOfBoundsException
0000001e SystemErr R at java.lang.String.charAt(String.java:415)
0000001e SystemErr R at org.eclipse.core.internal.registry.RegistrySupport.translate(RegistrySupport.java:34)
0000001e SystemErr R at org.eclipse.core.runtime.spi.RegistryStrategy.translate(RegistryStrategy.java:152)
0000001e SystemErr R at org.eclipse.core.internal.registry.ExtensionRegistry.translate(ExtensionRegistry.java:709)
0000001e SystemErr R at org.eclipse.core.internal.registry.ExtensionsParser.translate(ExtensionsParser.java:614)
0000001e SystemErr R at org.eclipse.core.internal.registry.ExtensionsParser.parseConfigurationElementAttributes(ExtensionsParser.java:405)
0000001e SystemErr R at org.eclipse.core.internal.registry.ExtensionsParser.handleExtensionState(ExtensionsParser.java:312)
0000001e SystemErr R at org.eclipse.core.internal.registry.ExtensionsParser.startElement(ExtensionsParser.java:554)
0000001e SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
0000001e SystemErr R at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
0000001e SystemErr R at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
0000001e SystemErr R at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
0000001e SystemErr R at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
0000001e SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
0000001e SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
0000001e SystemErr R at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
0000001e SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
0000001e SystemErr R at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
0000001e SystemErr R at org.eclipse.core.internal.registry.ExtensionsParser.parseManifest(ExtensionsParser.java:383)
0000001e SystemErr R at org.eclipse.core.internal.registry.ExtensionRegistry.addContribution(ExtensionRegistry.java:876)
0000001e SystemErr R at com.ibm.team.repository.common.internal.util.StandaloneExtensionRegistry.<init>(StandaloneExtensionRegistry.java:57)
0000001e SystemErr R at com.ibm.team.repository.common.internal.util.InternalTeamPlatform.initializeRegistry(InternalTeamPlatform.java:233)
0000001e SystemErr R at com.ibm.team.repository.common.internal.util.InternalTeamPlatform.start(InternalTeamPlatform.java:102)
0000001e SystemErr R at com.ibm.team.repository.client.TeamPlatform.startup(TeamPlatform.java:48)
0000001e SystemErr R at com.rfrs.sample.impl.JazzSampleImpl$ServerStarter.<init>(JazzSampleImpl.java:78)
0000001e SystemErr R at com.rfrs.sample.impl.JazzSampleImpl.startPlatform(JazzSampleImpl.java:483)
0000001e SystemErr R at com.rfrs.sample.impl.JazzSampleImpl.doTheWork(JazzSampleImpl.java:105)
0000001e SystemErr R at com.rfrs.sample.servlet.JazzServletExample.doGet(JazzServletExample.java:57)
0000001e SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
0000001e SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
0000001e SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
0000001e SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501)
0000001e SystemErr R at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
0000001e SystemErr R at com.ibm.ws.webcontainer.extension.InvokerExtensionProcessor.handleRequest(InvokerExtensionProcessor.java:263)
0000001e SystemErr R at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168)
0000001e SystemErr R at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
0000001e SystemErr R at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
0000001e SystemErr R at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
0000001e SystemErr R at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)
0000001e SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
0000001e SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
0000001e SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
0000001e SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
0000001e SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
0000001e SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
0000001e SystemErr R at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
0000001e SystemErr R at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
0000001e SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
0000001e SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
0000001e SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
0000001e SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
0000001e SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

5 answers



permanent link
Matt Lavin (2.7k2) | answered Oct 17 '08, 8:49 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
I'm not sure why the ExtensionRegistry would have problems only in WAS.
This is a good candidate for a new workitem. Can you open a workitem
that describes this problem and perhaps include a small example WAR that
demonstrates the problem?

Matt Lavin
Jazz Server Team


ajberner wrote:
We have a servlet that will run in one appserver that calls RTC
running on a different machine. If the servlet is running on
Tomcat, we can put the jars from the JazzPlainJavaClient in the
WEB-INF/lib directory and all is well. It can also go in the
shared/lib directory so that multiple apps running on this instance
can access RTC (it doesn't matter whether RTC is running on Tomcat or
WAS).

But if the servlet is running on WAS 6.1, I can't get it to work. If
I put the JazzPlainJavaClient jars in the WEB-INF/lib directory
within a WAR file and deploy it to WAS, when you start the servlet
app you get errors about plugins not being resolved, and when you run
the servlet, you get various exceptions thrown. I also tried putting
the jars in the lib/ext directory of the app server; then the servlet
app didn't throw any errors when it started, but got the same errors
when the servlet ran--the log is below.

So how can we deploy a servlet to WAS that calls RTC?

Here's the log from a run of the servlet on WAS 6.1 Express. You can
see it gets to com.ibm.team.repository.client.TeamPlatform.startup,
so I believe it's seeing the client library jars:

0000001e SystemErr R log4j:WARN No
appenders could be found for logger
(org.apache.struts.action.ActionServlet).
0000001e SystemErr R log4j:WARN Please
initialize the log4j system properly.
0000001e SystemErr R
java.lang.StringIndexOutOfBoundsException
0000001e SystemErr R at
java.lang.String.charAt(String.java:415)
0000001e SystemErr R at
org.eclipse.core.internal.registry.RegistrySupport.translate(RegistrySupport.java:34)
0000001e SystemErr R at
org.eclipse.core.runtime.spi.RegistryStrategy.translate(RegistryStrategy.java:152)
0000001e SystemErr R at
org.eclipse.core.internal.registry.ExtensionRegistry.translate(ExtensionRegistry.java:709)
0000001e SystemErr R at
org.eclipse.core.internal.registry.ExtensionsParser.translate(ExtensionsParser.java:614)
0000001e SystemErr R at
org.eclipse.core.internal.registry.ExtensionsParser.parseConfigurationElementAttributes(ExtensionsParser.java:405)
0000001e SystemErr R at
org.eclipse.core.internal.registry.ExtensionsParser.handleExtensionState(ExtensionsParser.java:312)
0000001e SystemErr R at
org.eclipse.core.internal.registry.ExtensionsParser.startElement(ExtensionsParser.java:554)
0000001e SystemErr R at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source)
0000001e SystemErr R at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
0000001e SystemErr R at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
0000001e SystemErr R at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
0000001e SystemErr R at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
0000001e SystemErr R at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
0000001e SystemErr R at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
0000001e SystemErr R at
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
0000001e SystemErr R at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
0000001e SystemErr R at
org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
0000001e SystemErr R at
org.eclipse.core.internal.registry.ExtensionsParser.parseManifest(ExtensionsParser.java:383)
0000001e SystemErr R at
org.eclipse.core.internal.registry.ExtensionRegistry.addContribution(ExtensionRegistry.java:876)
0000001e SystemErr R at
com.ibm.team.repository.common.internal.util.StandaloneExtensionRegistry.<init>(StandaloneExtensionRegistry.java:57)
0000001e SystemErr R at
com.ibm.team.repository.common.internal.util.InternalTeamPlatform.initializeRegistry(InternalTeamPlatform.java:233)
0000001e SystemErr R at
com.ibm.team.repository.common.internal.util.InternalTeamPlatform.start(InternalTeamPlatform.java:102)
0000001e SystemErr R at
com.ibm.team.repository.client.TeamPlatform.startup(TeamPlatform.java:48)
0000001e SystemErr R at
com.rfrs.sample.impl.JazzSampleImpl$ServerStarter.<init>(JazzSampleImpl.java:78)
0000001e SystemErr R at
com.rfrs.sample.impl.JazzSampleImpl.startPlatform(JazzSampleImpl.java:483)
0000001e SystemErr R at
com.rfrs.sample.impl.JazzSampleImpl.doTheWork(JazzSampleImpl.java:105)
0000001e SystemErr R at
com.rfrs.sample.servlet.JazzServletExample.doGet(JazzServletExample.java:57)
0000001e SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
0000001e SystemErr R at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
0000001e SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
0000001e SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501)
0000001e SystemErr R at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
0000001e SystemErr R at
com.ibm.ws.webcontainer.extension.InvokerExtensionProcessor.handleRequest(InvokerExtensionProcessor.java:263)
0000001e SystemErr R at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168)
0000001e SystemErr R at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
0000001e SystemErr R at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
0000001e SystemErr R at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
0000001e SystemErr R at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)
0000001e SystemErr R at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
0000001e SystemErr R at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
0000001e SystemErr R at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
0000001e SystemErr R at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
0000001e SystemErr R at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
0000001e SystemErr R at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
0000001e SystemErr R at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
0000001e SystemErr R at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
0000001e SystemErr R at
com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
0000001e SystemErr R at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
0000001e SystemErr R at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
0000001e SystemErr R at
com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
0000001e SystemErr R at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

permanent link
Steven Pogue (7142) | answered Jan 25 '11, 2:55 p.m.
So this problem appears to still exist in RTC 3.0 plain java client library usage within WAS 6.1. I simply wrapped one of the snippets (3) in a servlet and get the ExtensionRegistry error after the TeamPlatform.startup() call along with the exception. Based on another post, I added the following,
RepositoryPackage.eINSTANCE.eContents();

for which I have no idea why and got the following:



[1/25/11 14:25:22:077 EST] 00000032 StandaloneFil W com.ibm.team.repository.common.internal.util.StandaloneExtensionRegistry getBundleLocalization Could not open META-INF/MANIFEST.MF for bundle: jar:file:/C:/Program Files/IBM/SDP/runtimes/base_v61/lib/pc-appext.jar!/plugin.xml
[1/25/11 14:25:22:092 EST] 00000032 StandaloneFil W com.ibm.team.repository.common.internal.util.StandaloneExtensionRegistry getBundleLocalization Could not open META-INF/MANIFEST.MF for bundle: jar:file:/C:/Program Files/IBM/SDP/runtimes/base_v61/lib/rrd-appext.jar!/plugin.xml
[1/25/11 14:25:46:497 EST] 00000032 SystemOut O Contacting https:/localhost:9443/ccm/...
[1/25/11 14:25:57:013 EST] 00000032 SystemOut O Error: Badly configured client. Missing a foundation component tag.

Is there a workaround to get the API working within a WAS6.1 context?

permanent link
William Fu (4611) | answered Mar 16 '11, 2:48 a.m.
Hi,
I also added the RepositoryPackage.eINSTANCE.eContents();
and worked around the issue and is now facing the same problem as you are....

I posted the question here:
http://jazz.net/forums/viewtopic.php?t=5458

Anyway, I can further elaborate the exception of "Missing a component foundation tag"...

It simply means that the code cannot get the correct Client version (which should be either 2.0 or 3.0 depending on which RTC you uses)

So this problem appears to still exist in RTC 3.0 plain java client library usage within WAS 6.1. I simply wrapped one of the snippets (3) in a servlet and get the ExtensionRegistry error after the TeamPlatform.startup() call along with the exception. Based on another post, I added the following,
RepositoryPackage.eINSTANCE.eContents();

for which I have no idea why and got the following:



[1/25/11 14:25:22:077 EST] 00000032 StandaloneFil W com.ibm.team.repository.common.internal.util.StandaloneExtensionRegistry getBundleLocalization Could not open META-INF/MANIFEST.MF for bundle: jar:file:/C:/Program Files/IBM/SDP/runtimes/base_v61/lib/pc-appext.jar!/plugin.xml
[1/25/11 14:25:22:092 EST] 00000032 StandaloneFil W com.ibm.team.repository.common.internal.util.StandaloneExtensionRegistry getBundleLocalization Could not open META-INF/MANIFEST.MF for bundle: jar:file:/C:/Program Files/IBM/SDP/runtimes/base_v61/lib/rrd-appext.jar!/plugin.xml
[1/25/11 14:25:46:497 EST] 00000032 SystemOut O Contacting https:/localhost:9443/ccm/...
[1/25/11 14:25:57:013 EST] 00000032 SystemOut O Error: Badly configured client. Missing a foundation component tag.

Is there a workaround to get the API working within a WAS6.1 context?

permanent link
Nick Edgar (6.5k711) | answered Apr 21 '12, 11:38 a.m.
JAZZ DEVELOPER
This issue is being discussed again now in https://jazz.net/forums/viewtopic.php?t=24415

permanent link
Dong Young Kim (1931920) | answered Apr 24 '12, 2:34 a.m.
JAZZ DEVELOPER
My solution was MAKING RTC Plain Client jars as EAR/Utility Jars AND this Utility Jar's classloader mode as PARENT_LAST. (See https://jazz.net/forums/viewtopic.php?t=20933)

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.