Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] Eclipse cannot find required libraries in plugin

Hi All,
It is the same problem in my case as well . My plug-in uses a class 
called 'SiteRuleParser' from CWMClasses.jar . And When I am trying to 
export it , it fails saying that NoClassDefFoundError for the class 
SiteRuleParser .
And one more thing is : When I am trying to add a jar file at the 
Runtime tab(Under that classPath tab) of plug-in.xml , it is giving me 
an exception . Please see that below:

Problems occurred when invoking code from plug-in: "org.eclipse.jface".
java.lang.ArrayStoreException
    at java.util.AbstractCollection.toArray(Unknown Source)
    at 
org.eclipse.pde.internal.ui.editor.plugin.ExportPackageVisibilitySection.selectionChanged(ExportPackageVisibilitySection.java:250)
    at 
org.eclipse.ui.forms.ManagedForm.fireSelectionChanged(ManagedForm.java:127)
    at 
org.eclipse.pde.internal.ui.editor.TableSection$PartAdapter.selectionChanged(TableSection.java:31)
    at 
org.eclipse.pde.internal.ui.parts.TablePart$1.selectionChanged(TablePart.java:49)
    at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
    at 
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1038)
    at org.eclipse.core.runtime.Platform.run(Platform.java:775)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
    at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
    at 
org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1784)
    at 
org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1452)
    at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:379)
    at 
org.eclipse.pde.internal.ui.editor.plugin.LibrarySection.modelChanged(LibrarySection.java:369)
    at 
org.eclipse.pde.internal.core.AbstractModel.fireModelChanged(AbstractModel.java:77)
    at 
org.eclipse.pde.internal.core.bundle.BundlePluginModelBase.fireModelChanged(BundlePluginModelBase.java:132)
    at 
org.eclipse.pde.internal.core.bundle.BundlePluginBase.fireStructureChanged(BundlePluginBase.java:392)
    at 
org.eclipse.pde.internal.core.bundle.BundlePluginBase.add(BundlePluginBase.java:103)
    at 
org.eclipse.pde.internal.ui.editor.plugin.LibrarySection.handleAdd(LibrarySection.java:345)
    at 
org.eclipse.pde.internal.ui.editor.plugin.LibrarySection.buttonSelected(LibrarySection.java:193)
    at 
org.eclipse.pde.internal.ui.editor.TableSection$PartAdapter.buttonSelected(TableSection.java:38)
    at 
org.eclipse.pde.internal.ui.parts.SharedPartWithButtons$SelectionHandler.buttonSelected(SharedPartWithButtons.java:34)
    at 
org.eclipse.pde.internal.ui.parts.SharedPartWithButtons$SelectionHandler.widgetSelected(SharedPartWithButtons.java:27)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:844)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2929)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2562)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1694)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1658)
    at 
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:366)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
    at 
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
    at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:375)
    at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:162)
    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.core.launcher.Main.invokeFramework(Main.java:334)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
    at org.eclipse.core.launcher.Main.run(Main.java:973)
    at org.eclipse.core.launcher.Main.main(Main.java:948)
========================================================================
So I am proceeding without that . Is there any problem with the veersion 
of eclipse that I am using . I am using Version: 3.1.0 ,Build id: 
I20050527-1300


Is there something wrong with that ? Should I download the latest one 
from the site ?
Please suggest .
-Ranga.

Vinícius Pitta Lima de Araújo wrote on 9/22/2005, 6:16 PM:

 > Hi all,
 > My problem does not seems to be a lack of plugin dependency. The
 > exception is clear, the eclipse cannot find one of interfaces that are
 > in a thirdy-party jar of my plugin.
 >
 > What is the default way to put third-party libraries into plugin
 > classpath? I will try to remake all descriptors "on the hand" and
 > deploy the plugin instead of use the generated by eclipse.
 >
 > I tried everything and nothing work! :(
 >
 > Thank all,
 > Vinícius Pitta Lima de Araújo
 >
 > On 9/22/05, Leen Toelen <toelen@xxxxxxxxx> wrote:
 > > Hi,
 > >
 > > running a plugin from the pde environment starts it in the same jre as
 > > the main plugin, with all plugins loaded already. In the log file (in
 > > the workspace .metadata directory), do you see an error like 'The
 > > activator ... for bundle ... is invalid'? If the activator is not
 > > started also the plugin classes are not loaded and you get a
 > > ClassNotFoundException. from my experience, I have only had this
 > > message when I missed a dependency.
 > >
 > > Maybe you could send the .log file also, so we can have a better
 > look at it.
 > >
 > > Regards,
 > > Leen Toelen
 > >
 > > On 9/22/05, Ramakrishna RangaRao <rkrangar@xxxxxxx> wrote:
 > > > Hi leen And all ,
 > > >   If there were any plug-in dependancy problem , it should not have
 > > > worked when using plug-in runtime image . I could run the same using
 > > > plug-in runtime(launching a new eclipse window) . And when I miss any
 > > > dependancy , it is giving me compilation error .
 > > > When I am trying to export the plug-in as a jar file , I was getting
 > > > NoClassdefFoundError . When i included in the build.properties
 > file to
 > > > it stopped the exception .
 > > > build.properties:
 > > > =================
 > > > source.. = src/
 > > > output.. = bin/
 > > > bin.includes = plugin.xml,\
 > > >                 META-INF/,\
 > > >                 .,\
 > > >                 CWMClassesNew.jar
 > > >
 > > > jars.extra.classpath = CWMClassesNew.jar
 > > > ========================================
 > > >
 > > >   BUt When I am putting exported jar inside the eclipse installed
 > > > plugins dir , this is giving me the same error . I am not even seeing
 > > > any System.out statements on the console . Please tell me where do
 > I see
 > > > them . FYI , my plug-in is a Builder(to compile an in-house language
 > > > called CWM) plugin .
 > > >
 > > > Thanks and Regards,
 > > > Ranga.
 > > >
 > > > Leen Toelen wrote on 9/22/2005, 2:13 PM:
 > > >
 > > >  > Hi,
 > > >  >
 > > >  > You can always try to add *all* plugins as a dependency in your
 > > >  > plugin. If this solves the problem, you are missing a
 > dependency and
 > > >  > you can leave them out one by one to see which one it is.
 > > >  >
 > > >  > Regards,
 > > >  > Leen Toelen
 > > >  >
 > > >  >
 > > >  > On 9/22/05, Ramakrishna RangaRao <rkrangar@xxxxxxx> wrote:
 > > >  > > Hi All,
 > > >  > >    Even I am facing the similar kind of problems .
 > > >  > > Vinícius Pitta Lima de Araújo  , If u came to know a solution
 > for the
 > > >  > > same , please let me know .
 > > >  > > Thanks,
 > > >  > > Ranga
 > > >  > >
 > > >  > > Vinícius Pitta Lima de Araújo wrote on 9/19/2005, 4:22 PM:
 > > >  > >
 > > >  > >  > Hi Brian,
 > > >  > >  > I can run using the eclipse with PDE without problems. But
 > when I
 > > >  > try
 > > >  > >  > to run in a simple eclipse environment I get these
 > > >  > >  > NoClassDefFoundError.
 > > >  > >  >
 > > >  > >  > Follow all my confiurations files.
 > > >  > >  >
 > > >  > >  > The plugin.xml:
 > > >  > >  >     <?xml version="1.0" encoding="UTF-8"?>
 > > >  > >  >     <?eclipse version="3.0"?>
 > > >  > >  >     <plugin>
 > > >  > >  >        <extension
 > > >  > >  >              point="org.eclipse.ui.editors">
 > > >  > >  >           <editor
 > > >  > >  >                 name="Gerador de Código Netra"
 > > >  > >  >                 extensions="gcnetra"
 > > >  > >  >                 icon="icons/sample.gif"
 > > >  > >  >
 > > >  > >  >
 > > >  > >
 > > >  >
 > > >
 > 
contributorClass="br.com.netra.gcn.plugin.editors.GeradorCodigoEditorContributor" 

 >
 > > >
 > > >  >
 > > >  > >
 > > >  > >  >
 > > >  > >  >
 > > >  > >  > class="br.com.netra.gcn.plugin.editors.GeradorCodigoEditor"
 > > >  > >  >
 > > >  > id="br.com.netra.gcn.plugin.editors.GeradorCodigoEditor">
 > > >  > >  >           </editor>
 > > >  > >  >        </extension>
 > > >  > >  >        <extension
 > > >  > >  >              point="org.eclipse.ui.newWizards">
 > > >  > >  >           <category
 > > >  > >  >                 name="Netra"
 > > >  > >  >                 id="netra_category">
 > > >  > >  >           </category>
 > > >  > >  >           <wizard
 > > >  > >  >                 name="Projeto Gerador de Código"
 > > >  > >  >                 icon="icons/sample.gif"
 > > >  > >  >                 category="netra_category"
 > > >  > >  >
 > > >  > >  >
 > class="br.com.netra.gcn.plugin.wizards.GeradorCodigoNewWizard"
 > > >  > >  >
 > > >  > >  > id="br.com.netra.gcn.plugin.wizards.GeradorCodigoNewWizard">
 > > >  > >  >           </wizard>
 > > >  > >  >        </extension>
 > > >  > >  >
 > > >  > >  >     <!-- I think that this tag is useless in this case -->
 > > >  > >  >        <runtime>
 > > >  > >  >             <library name="commons-beanutils.jar"/>
 > > >  > >  >             <library name="commons-collections-3.1.jar"/>
 > > >  > >  >             <library name="commons-configuration-1.1.jar"/>
 > > >  > >  >             <library name="commons-lang-2.0.jar"/>
 > > >  > >  >             <library name="commons-logging.jar"/>
 > > >  > >  >             <library name="core-umt0.81.jar"/>
 > > >  > >  >             <library name="gerador-codigo-netra.jar"/>
 > > >  > >  >             <library name="log4j-1.2.9.jar"/>
 > > >  > >  >             <library name="velocity-1.4.jar"/>
 > > >  > >  >        </runtime>
 > > >  > >  >     </plugin>
 > > >  > >  >
 > > >  > >  >
 > > >  > >  > The build.properties (I think is all right):
 > > >  > >  >     source.. = src/
 > > >  > >  >     output.. = bin/
 > > >  > >  >     bin.includes = plugin.xml,\
 > > >  > >  >                    META-INF/,\
 > > >  > >  >                    resources/,\
 > > >  > >  >                    .,\
 > > >  > >  >                    icons/,\
 > > >  > >  >                    commons-beanutils.jar,\
 > > >  > >  >                    commons-collections-3.1.jar,\
 > > >  > >  >                    commons-configuration-1.1.jar,\
 > > >  > >  >                    commons-lang-2.0.jar,\
 > > >  > >  >                    commons-logging.jar,\
 > > >  > >  >                    core-umt0.81.jar,\
 > > >  > >  >                    gerador-codigo-netra.jar,\
 > > >  > >  >                    velocity-1.4.jar,\
 > > >  > >  >                    log4j-1.2.9.jar,\
 > > >  > >  >                    build.properties
 > > >  > >  >     jars.compile.order = .
 > > >  > >  >     jars.extra.classpath = commons-beanutils.jar,\
 > > >  > >  >                            commons-collections-3.1.jar,\
 > > >  > >  >                            commons-configuration-1.1.jar,\
 > > >  > >  >                            commons-lang-2.0.jar,\
 > > >  > >  >                            commons-logging.jar,\
 > > >  > >  >                            core-umt0.81.jar,\
 > > >  > >  >                            gerador-codigo-netra.jar,\
 > > >  > >  >                            log4j-1.2.9.jar,\
 > > >  > >  >                            velocity-1.4.jar
 > > >  > >  >
 > > >  > >  >
 > > >  > >  > Finally, the MANIFEST.MF:
 > > >  > >  >     Manifest-Version: 1.0
 > > >  > >  >     Bundle-ManifestVersion: 2
 > > >  > >  >     Bundle-Name: Gerador de Código Netra
 > > >  > >  >     Bundle-SymbolicName: br.com.netra.gcn; singleton:=true
 > > >  > >  >     Bundle-Version: 1.0.0
 > > >  > >  >     Bundle-Activator: br.com.netra.gcn.plugin.PluginGCN
 > > >  > >  >     Bundle-Vendor: Netra Tecnologia Ltda
 > > >  > >  >     Bundle-Localization: plugin
 > > >  > >  >     ## I dont know why, but everytime I have to add this line
 > > >  > >  >     ## because the PDE remove it.
 > > >  > >  >     Bundle-Classpath:  commons-beanutils.jar,
 > > >  > >  >      commons-collections-3.1.jar,
 > > >  > >  >      commons-configuration-1.1.jar,
 > > >  > >  >      commons-lang-2.0.jar,
 > > >  > >  >      commons-logging.jar,
 > > >  > >  >      core-umt0.81.jar,
 > > >  > >  >      gerador-codigo-netra.jar,
 > > >  > >  >      velocity-1.4.jar,
 > > >  > >  >      log4j-1.2.9.jar,
 > > >  > >  >      build.properties
 > > >  > >  >     Require-Bundle: org.eclipse.ui,
 > > >  > >  >      org.eclipse.core.runtime,
 > > >  > >  >      org.eclipse.core.resources,
 > > >  > >  >      org.eclipse.ui.editors,
 > > >  > >  >      org.eclipse.ui.ide,
 > > >  > >  >      org.eclipse.ui.workbench.texteditor,
 > > >  > >  >      org.eclipse.ui.forms,
 > > >  > >  >      org.eclipse.ui.console,
 > > >  > >  >      org.eclipse.jface.text
 > > >  > >  >     Eclipse-AutoStart: true
 > > >  > >  >     Export-Package: br.com.netra.gcn.gui,
 > > >  > >  >      br.com.netra.gcn.plugin,
 > > >  > >  >      br.com.netra.gcn.plugin.editors,
 > > >  > >  >      br.com.netra.gcn.plugin.editors.pages,
 > > >  > >  >      br.com.netra.gcn.plugin.wizards,
 > > >  > >  >      br.com.netra.gcn.transformer,
 > > >  > >  >      br.com.netra.gcn.xmilight,
 > > >  > >  >      br.com.netra.gcn.xmilight.enumerations,
 > > >  > >  >      br.com.netra.gcn.xmilight.parse,
 > > >  > >  >      br.com.netra.gcn.xmilight.parse.old
 > > >  > >  >     Export-Package: br.com.netra.gcn.gui,
 > > >  > >  >      br.com.netra.gcn.plugin,
 > > >  > >  >      br.com.netra.gcn.plugin.editors,
 > > >  > >  >      br.com.netra.gcn.plugin.editors.pages,
 > > >  > >  >      br.com.netra.gcn.plugin.wizards,
 > > >  > >  >      br.com.netra.gcn.transformer,
 > > >  > >  >      br.com.netra.gcn.xmilight,
 > > >  > >  >      br.com.netra.gcn.xmilight.enumerations,
 > > >  > >  >      br.com.netra.gcn.xmilight.parse,
 > > >  > >  >      br.com.netra.gcn.xmilight.parse.old,
 > > >  > >  >      umtmain
 > > >  > >  >
 > > >  > >  >
 > > >  > >  > Thank you, Brian.
 > > >  > >  > Vinícius Pitta Lima de Araújo
 > > >  > >  >
 > > >  > >  > On 9/16/05, Brian de Alwis <bsd@xxxxxxxxx> wrote:
 > > >  > >  > > Hi Vinícius.  It would be useful if you posted your
 > MANIFEST.MF,
 > > >  > >  > > plugin.xml, and the actual error.
 > > >  > >  > >
 > > >  > >  > > If you've listed the .jar in the MANIFEST.MF, you don't
 > need it in
 > > >  > >  > > your plugin.xml.
 > > >  > >  > >
 > > >  > >  > > Have you managed to run your plugin using a PDE runtime
 > image?
 > > >  > >  > >
 > > >  > >  > > Brian.
 > > >  > >  > >
 > > >  > >  > > --
 > > >  > >  > >  Brian de Alwis | Software Practices Lab | UBC |
 > > >  > >  > http://www.cs.ubc.ca/~bsd/
 > > >  > >  > > "There is much pleasure to be gained in useless
 > knowledge." -
 > > >  > >  > Bertrand Russell
 > > >  > >  > >
 > > >  > >  > _______________________________________________
 > > >  > >  > pde-dev mailing list
 > > >  > >  > pde-dev@xxxxxxxxxxx
 > > >  > >  > https://dev.eclipse.org/mailman/listinfo/pde-dev
 > > >  > >  >
 > > >  > >
 > > >  > >
 > > >  > > _______________________________________________
 > > >  > > pde-dev mailing list
 > > >  > > pde-dev@xxxxxxxxxxx
 > > >  > > https://dev.eclipse.org/mailman/listinfo/pde-dev
 > > >  > >
 > > >  > _______________________________________________
 > > >  > pde-dev mailing list
 > > >  > pde-dev@xxxxxxxxxxx
 > > >  > https://dev.eclipse.org/mailman/listinfo/pde-dev
 > > >  >
 > > >
 > > >
 > > >
 > > _______________________________________________
 > > pde-dev mailing list
 > > pde-dev@xxxxxxxxxxx
 > > https://dev.eclipse.org/mailman/listinfo/pde-dev
 > >
 >




Back to the top