It's all about the answers!

Ask a question

value transformer issues, solved


sam detweiler (12.5k6195201) | asked Oct 12 '10, 12:06 p.m.
So, in an effort to work around the comment/attachment transformation issues (posted in other topics), I decided to make my own transformer plugin/feature, and load it thru the same update site.

the transformer name appears in the list of transformers

(site ini works
feature link works
plugin definition fields read)

but when we get a workitem that references this transformer we get
Incoming at 10/12/10 11:00:55 AM CDT
Error occurred:
com.ibm.team.repository.common.TeamRepositoryException: Cannot load value transformer com.ca.comment.transformer.CommentTransformer

so, the class can't be loaded.. but I don't 'see' a problem in the definitions.

bin is in the classpath
bin is in the jar file
the class file is in the directory tree under the bin folder

and I don't get a 'class not found', I get 'cannot load'.

Advice welcomed.

here is the class definition. which matches the words in the wiki, but does not 'extend' any class..
public abstract class CommentTransformer implements IValueTransformer {
sam

5 answers



permanent link
sam detweiler (12.5k6195201) | answered Oct 12 '10, 12:30 p.m.
from the jazz.log

2010-10-12 11:52:36,579 ERROR t.internal.registry.AbstractActivationManagerOwner - CRJAZ1093I Service class "com.ca.comment.transformer.CommentTransformer" failed to activate.
com.ibm.team.repository.common.transport.TeamServiceRegistryException: CRJAZ1108I The implementation class "com.ca.comment.transformer.CommentTransformer", in the bundle "com.ca.comment.transformer", is not a kind of "com.ibm.team.repository.service.AbstractService".

source

public abstract class CommentTransformer implements IValueTransformer {

permanent link
sam detweiler (12.5k6195201) | answered Oct 12 '10, 2:53 p.m.
from https://jazz.net/wiki/bin/view/Main/ItemConnectorDevelopmentSetup

(at the bottom)

Value Transformer

Creating a project for a value transformer is very similar to creating one for an external repository manager, since it is also a Jazz extension service. The differences are

* There is no base class to extend; the interface to implement is IValueTransformer
* The extension point for declaring the value transformer is com.ibm.team.interop.service.valueTransformer

Note that you would not add another extension of the com.ibm.team.repository.common.components extension point, but just use the same component id that was created for the external repository manager (it and any value transformers would be considered all part of one component).

it seems that point 1 is incorrect, as this needs to be of type AbstractService..

sam

permanent link
sam detweiler (12.5k6195201) | answered Oct 15 '10, 12:53 p.m.
here is a little bigger log clip.. all of the first failure, (and the code lower down). I put the code in the base repository package and made only 1 plugin with 4 extension points.

ERROR ository.common.transport.AbstractElementDescriptor - Plug-in "com.ca.remoterepository" was unable to instantiate class "com.ca.remoterepository.AttachmentTransformer".
org.eclipse.core.runtime.CoreException: Plug-in "com.ca.remoterepository" was unable to instantiate class "com.ca.remoterepository.AttachmentTransformer".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:180)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:172)
at com.ibm.team.repository.service.internal.registry.ClientLocalizingRegistryStrategy.createExecutableExtension(ClientLocalizingRegistryStrategy.java:56)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:867)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at com.ibm.team.repository.service.internal.registry.ClientLocalizingConfigurationElement.createExecutableExtension(ClientLocalizingConfigurationElement.java:137)
at com.ibm.team.repository.common.transport.AbstractElementDescriptor.createInstance(AbstractElementDescriptor.java:254)
at com.ibm.team.repository.common.transport.registry.ExtensionServiceElementDescriptor.createImplementation(ExtensionServiceElementDescriptor.java:258)
at com.ibm.team.repository.common.transport.registry.ExtensionServiceElementDescriptor.getImplemenationWithoutActivation(ExtensionServiceElementDescriptor.java:375)
at com.ibm.team.repository.common.transport.internal.registry.ExtensionServiceActivationManagerOwner.getImplementation(ExtensionServiceActivationManagerOwner.java:120)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.getImplementation(AbstractActivationManagerOwner.java:665)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.doActivate(AbstractActivationManagerOwner.java:580)
at com.ibm.team.repository.common.transport.internal.registry.ExtensionServiceActivationManagerOwner.doActivate(ExtensionServiceActivationManagerOwner.java:69)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.activate(AbstractActivationManagerOwner.java:166)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.activate(BundleActivationManager.java:290)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.performActivation(BundleActivationManager.java:1589)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.access$2(BundleActivationManager.java:1574)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager$3.acquired(BundleActivationManager.java:573)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer.acquire(ImportServiceRecordContainer.java:296)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.acquireImportedServices(BundleActivationManager.java:234)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.acquireImportServiceRecords(BundleActivationManager.java:250)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.startSync(BundleActivationManager.java:2054)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.start(BundleActivationManager.java:2023)
at com.ibm.team.repository.common.transport.registry.ExtensionServiceElementDescriptor.startBundleActivationManager(ExtensionServiceElementDescriptor.java:742)
at com.ibm.team.repository.common.transport.registry.ExtensionServiceElementDescriptor.start(ExtensionServiceElementDescriptor.java:702)
at com.ibm.team.interop.service.internal.InteropExtensionRegistry.handleExtensionAdded(InteropExtensionRegistry.java:107)
at com.ibm.team.interop.service.internal.InteropExtensionRegistry.handleExtensionAdded(InteropExtensionRegistry.java:1)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.basicHandleExtensionAdded(ExtensionRegistryReader.java:205)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.handleExtensionAddedToRegistry(ExtensionRegistryReader.java:624)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.addContributedExtensions(ExtensionRegistryReader.java:143)
at com.ibm.team.repository.common.util.ExtensionRegistryReader.start(ExtensionRegistryReader.java:1129)
at com.ibm.team.interop.service.internal.InteropService.activate(InteropService.java:155)

at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.bindRequiredServices(AbstractActivationManagerOwner.java:236)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.doActivate(AbstractActivationManagerOwner.java:583)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.activate(AbstractActivationManagerOwner.java:166)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.activate(BundleActivationManager.java:290)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.performActivation(BundleActivationManager.java:1589)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.access$2(BundleActivationManager.java:1574)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager$3.acquired(BundleActivationManager.java:573)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer.serviceAcquired(ImportServiceRecordContainer.java:582)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer.access$1(ImportServiceRecordContainer.java:566)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer$5.serviceAcquired(ImportServiceRecordContainer.java:352)
at org.eclipse.soda.sat.core.internal.record.ImportServiceRecord.acquire(ImportServiceRecord.java:116)
at org.eclipse.soda.sat.core.internal.record.ImportServiceRecord.handleRegisteredService(ImportServiceRecord.java:305)
at org.eclipse.soda.sat.core.internal.record.ServiceRecord.serviceChanged(ServiceRecord.java:429)
at org.eclipse.soda.sat.core.internal.record.ServiceRecord.access$0(ServiceRecord.java:411)
at org.eclipse.soda.sat.core.internal.record.ServiceRecord$1.serviceChanged(ServiceRecord.java:117)
at org.eclipse.osgi.framework.internal.core.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:91)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:1248)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:211)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:141)
at org.eclipse.osgi.framework.internal.core.Framework.publishServiceEventPrivileged(Framework.java:1563)
at org.eclipse.osgi.framework.internal.core.Framework.publishServiceEvent(Framework.java:1538)
at org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:122)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.createServiceRegistration(BundleContextImpl.java:666)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:617)
at org.eclipse.soda.sat.core.internal.record.ExportServiceRecord.registerServiceWithFramework(ExportServiceRecord.java:384)
at org.eclipse.soda.sat.core.internal.record.ExportServiceRecord.register(ExportServiceRecord.java:371)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.register(ExportProxyServiceRecord.java:577)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.registerExportServiceRecords(BundleActivationManager.java:1647)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.addExportServiceRecords(BundleActivationManager.java:364)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.registerPendingExportedServices(AbstractActivationManagerOwner.java:976)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.registerServices(AbstractActivationManagerOwner.java:1010)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.registerServices(AbstractActivationManagerOwner.java:999)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.doActivate(AbstractActivationManagerOwner.java:593)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.activate(AbstractActivationManagerOwner.java:166)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.activate(BundleActivationManager.java:290)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.performActivation(BundleActivationManager.java:1589)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.access$2(BundleActivationManager.java:1574)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager$3.acquired(BundleActivationManager.java:573)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer.serviceAcquired(ImportServiceRecordContainer.java:582)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer.access$1(ImportServiceRecordContainer.java:566)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer$5.serviceAcquired(ImportServiceRecordContainer.java:352)
at org.eclipse.soda.sat.core.internal.record.ImportServiceRecord.acquire(ImportServiceRecord.java:116)
at org.eclipse.soda.sat.core.internal.record.ImportServiceRecord.handleRegisteredService(ImportServiceRecord.java:305)
at org.eclipse.soda.sat.core.internal.record.ServiceRecord.serviceChanged(ServiceRecord.java:429)
at org.eclipse.soda.sat.core.internal.record.ServiceRecord.access$0(ServiceRecord.java:411)
at org.eclipse.soda.sat.core.internal.record.ServiceRecord$1.serviceChanged(ServiceRecord.java:117)
at org.eclipse.osgi.framework.internal.core.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:91)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:1248)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:211)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:141)
at org.eclipse.osgi.framework.internal.core.Framework.publishServiceEventPrivileged(Framework.java:1563)
at org.eclipse.osgi.framework.internal.core.Framework.publishServiceEvent(Framework.java:1538)
at org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:122)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.createServiceRegistration(BundleContextImpl.java:666)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:617)
at org.eclipse.soda.sat.core.internal.record.ExportServiceRecord.registerServiceWithFramework(ExportServiceRecord.java:384)
at org.eclipse.soda.sat.core.internal.record.ExportServiceRecord.register(ExportServiceRecord.java:371)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.register(ExportProxyServiceRecord.java:577)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.registerExportServiceRecords(BundleActivationManager.java:1647)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.addExportServiceRecords(BundleActivationManager.java:364)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.registerPendingExportedServices(AbstractActivationManagerOwner.java:976)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.registerServices(AbstractActivationManagerOwner.java:1010)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.registerServices(AbstractActivationManagerOwner.java:999)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.doActivate(AbstractActivationManagerOwner.java:593)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.activate(AbstractActivationManagerOwner.java:166)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.activate(BundleActivationManager.java:290)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.performActivation(BundleActivationManager.java:1589)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.access$2(BundleActivationManager.java:1574)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager$3.acquired(BundleActivationManager.java:573)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer.serviceAcquired(ImportServiceRecordContainer.java:582)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer.access$1(ImportServiceRecordContainer.java:566)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer$5.serviceAcquired(ImportServiceRecordContainer.java:352)
at org.eclipse.soda.sat.core.internal.record.ImportServiceRecord.acquire(ImportServiceRecord.java:116)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer$1.execute(ImportServiceRecordContainer.java:64)
at org.eclipse.soda.sat.core.internal.record.container.ServiceRecordContainer.doForService(ServiceRecordContainer.java:363)
at org.eclipse.soda.sat.core.internal.record.container.ServiceRecordContainer.doForEach(ServiceRecordContainer.java:330)
at org.eclipse.soda.sat.core.internal.record.container.ImportServiceRecordContainer.acquire(ImportServiceRecordContainer.java:303)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.acquireImportedServices(BundleActivationManager.java:234)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.acquireImportServiceRecords(BundleActivationManager.java:250)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.startSync(BundleActivationManager.java:2054)
at org.eclipse.soda.sat.core.internal.framework.bundle.BundleActivationManager.start(BundleActivationManager.java:2023)
at com.ibm.team.repository.common.transport.internal.registry.OsgiServicesManager.register(OsgiServicesManager.java:404)
at com.ibm.team.repository.common.transport.services.TeamServiceRegistry.registerServices(TeamServiceRegistry.java:325)
at com.ibm.team.repository.common.transport.services.TeamServiceRegistry.initialize(TeamServiceRegistry.java:286)
at com.ibm.team.repository.common.transport.services.TeamServiceRegistry.start(TeamServiceRegistry.java:367)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.init(AbstractTeamServerServlet.java:1200)
at com.ibm.team.repository.servlet.TeamServerServlet.init(TeamServerServlet.java:192)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.initializeDelegate(ServletManager.java:195)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:179)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:121)
at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:54)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:811)

and the code, just the initial class method template
<code>
package com.ca.remoterepository;
import java.util.Map;


import com.ibm.team.interop.common.*;
import com.ibm.team.interop.service.*;
import com.ibm.team.process.common.*;
import com.ibm.team.repository.common.TeamRepositoryException;
//import com.ibm.team.repository.service.AbstractService;

/**
*
*/

/**
* @author sam
*
*/
public abstract class AttachmentTransformer extends com.ibm.team.repository.service.AbstractService implements IValueTransformer {

public AttachmentTransformer()
{

}
public Object transformExternalToJazz(String externalPropertyName,
Map<String> externalState, String jazzPropertyName,
Map<String> currentJazzState, Map<String> newJazzState,
IExternalProxy workingProxy, ISyncRule syncRule,
IProcessArea processArea) throws TeamRepositoryException {
// TODO Auto-generated method stub
if(externalPropertyName.equals("Attachment"))
{
String x = jazzPropertyName;
}
return null;
}

public Object transformJazzToExternal(String jazzPropertyName,
Map<String> jazzState, String externalPropertyName,
Map<String> currentExternalState,
Map<String> newExternalState, IExternalProxy workingProxy,
ISyncRule syncRule, IProcessArea processArea)
throws TeamRepositoryException {
// TODO Auto-generated method stub
if(jazzPropertyName.equals("Attachment"))
{
String x = externalPropertyName;
}
return null;
}

}

</code>

permanent link
sam detweiler (12.5k6195201) | answered Oct 28 '10, 2:18 p.m.
still need help

permanent link
sam detweiler (12.5k6195201) | answered Nov 10 '10, 9:03 a.m.
the root problem was the generated class code that put abstract as the class qualifier

INCORRECT----
public abstract class AttachmentTransformer extends com.ibm.team.repository.service.AbstractService implements IValueTransformer {

CORRECT
public class AttachmentTransformer extends com.ibm.team.repository.service.AbstractService implements IValueTransformer {

Sam

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.