One Star

Custom Component not loading

I have created a plugin project whose functionality is to add a menu item. I exported that plugin project to TOS into "\TOS_DI-Win32-r118616-V5.5.1\plugins" folder. When I restarted TOS, that plugin works fine means a new menu item is loaded. Now I tried to integrate this plugin to my custom component through FIELD as EXTERNAL and in HEADER SECTION added EXTENSION="name of the plugin" in the XML file of my custom component. I also added in "TOS_DI-Win32-r118616-V5.5.1\features\org.talend.tos.components-feature_5.5.1.r118616\feature.xml" file. Now when I restarted TOS my custom component is not visible.
I have checked the .log file,

!ENTRY org.talend.platform.logging 2 0 2014-11-27 12:14:42.116
!MESSAGE 2014-11-27 12:14:42,116 WARN  org.talend.commons.exception.CommonExceptionHandler  - Cannot load component "Test": Failed to load plugin Smiley Surprisedrg.talend.designer.Menu
!STACK 0
org.talend.commons.exception.BusinessException: Cannot load component "Test": Failed to load plugin Smiley Surprisedrg.talend.designer.Menu
    at org.talend.designer.codegen.components.model.ComponentsFactory.loadComponentsFromFolder(ComponentsFactory.java:566)
    at org.talend.designer.codegen.components.model.ComponentsFactory.loadComponents(ComponentsFactory.java:269)
    at org.talend.designer.codegen.components.model.ComponentsFactory.loadComponentsFromComponentsProviderExtension(ComponentsFactory.java:259)
    at org.talend.designer.codegen.components.model.ComponentsFactory.init(ComponentsFactory.java:179)
    at org.talend.designer.codegen.components.model.ComponentsFactory.getComponents(ComponentsFactory.java:773)
    at org.talend.librariesmanager.model.service.JavaLibrariesService.syncLibraries(JavaLibrariesService.java:224)
    at org.talend.librariesmanager.model.service.LibrariesService.syncLibraries(LibrariesService.java:124)
    at org.talend.designer.codegen.CodeGeneratorService.refreshTemplates(CodeGeneratorService.java:164)
    at org.talend.componentdesigner.ui.action.provider.PushToPaletteActionProvider$PushToPaletteAction.run(PushToPaletteActionProvider.java:165)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.talend.rcp.intro.Application.start(Application.java:159)
    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:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: org.talend.commons.exception.BusinessException: Failed to load plugin Smiley Surprisedrg.talend.designer.Menu
    at org.talend.designer.core.model.components.EmfComponent.load(EmfComponent.java:386)
    at org.talend.designer.core.model.components.EmfComponent.<init>(EmfComponent.java:231)
    at org.talend.designer.codegen.components.model.ComponentsFactory.loadComponentsFromFolder(ComponentsFactory.java:475)
    ... 37 more
Caused by: java.lang.RuntimeException: pluginSmiley Surprisedrg.talend.designer.Menu not found
    at org.talend.repository.model.ExternalNodesFactory.getInstance(ExternalNodesFactory.java:39)
    at org.talend.designer.core.model.components.EmfComponent.load(EmfComponent.java:384)
    ... 39 more

Plugins manifest file contains like this:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Menu
Bundle-SymbolicName: org.talend.designer.menu; singleton:=true
Bundle-Version: 5.5.1.r118616
Bundle-Activator: org.talend.designer.menu.Activator
Bundle-Vendor: .Talend SA.
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
I have doubt about java version 1.7(because I have seen other posts saying that JDK1.6 is recommended than JDK1.7)
Can anybody get me out of this...
2 REPLIES
Community Manager

Re: Custom Component not loading

Hi 
 Now I tried to integrate this plugin to my custom component through FIELD as EXTERNAL

The filed such as CHECK, TABLE, LABEL etc have to be defined first before it is used, I am not sure a plugin is supported to be a field.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: Custom Component not loading

i have a similar problem, my plugin is an extension that works just fine in openstudio, however Enterprise version fails to load it. I've tried everything. I use the same settings as in open studio.
Also you should check if your manifest file contains the correct values. I've created a guide a few months ago, if anythign is missed please feel free to comment, so I can add the information. https://www.talendforge.org/forum/viewtopic.php?id=38165