Add jar into feature needs to plugin installation but NoClassDefFoundError [message #185164] |
Wed, 20 December 2006 11:54  |
Eclipse User |
|
|
|
Hello,
I'm developping a feature for a plugin and in my feature I create an
Install handler class in order to execute some code at the plugin
installation.
The MyInstallHandler class and the plugin installation is correctly
executed...
Now, I modify the MyInstallHandler class and I need now some externals jar
which are dom4j-1.6.1.jar and jaxen-1.1-beta-6.jar : I include them into
the Java Build Path property project and I add them into the Binary Build
of the Build tab of feature.xml.
But when I install my plugin, there is an error :
java.lang.NoClassDefFoundError: org/dom4j/io/OutputFormat
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.update.internal.core.InstallHandlerProxy.getLoca lHandler(InstallHandlerProxy.java:561)
at
org.eclipse.update.internal.core.InstallHandlerProxy.initial ize(InstallHandlerProxy.java:159)
at
org.eclipse.update.internal.core.InstallHandlerProxy.<init>(InstallHandlerProxy.java:115)
at org.eclipse.update.core.Feature.install(Feature.java:296)
at org.eclipse.update.internal.core.SiteFile.install(SiteFile.j ava:96)
at
org.eclipse.update.internal.core.ConfiguredSite.install(Conf iguredSite.java:155)
at
org.eclipse.update.internal.core.ConfiguredSite.install(Conf iguredSite.java:119)
at
org.eclipse.update.internal.operations.InstallOperation.exec ute(InstallOperation.java:92)
at
org.eclipse.update.internal.operations.BatchInstallOperation .execute(BatchInstallOperation.java:84)
at
org.eclipse.update.internal.ui.wizards.InstallWizard2.instal l(InstallWizard2.java:374)
at
org.eclipse.update.internal.ui.wizards.InstallWizard2.access $1(InstallWizard2.java:371)
at
org.eclipse.update.internal.ui.wizards.InstallWizard2$1.run( InstallWizard2.java:473)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Classes are not found...
Have I missed something into the feature configuration ?
Greats for your help...
Sophie
Sophie.Andrieu@xrce.xerox.com
XEROX XRCE
|
|
|
|
Re: Add jar into feature needs to plugin installation but NoClassDefFoundError [message #185308 is a reply to message #185196] |
Thu, 21 December 2006 03:48   |
Eclipse User |
|
|
|
Thanks for your help... But I have the same error...
I do the following things :
* Within the plugin project :
As you says, I add the two jars within the plugin project like :
- within the Runtime tab, I add dom4j-1.6.1.jar and jaxen-1.1-beta-6.jar
into the classpath.
- within the Build configuration, I select the two jars into the Binary
Build
Thus, the MANIFEST.MF has a Bundle-ClassPath like :
Bundle-ClassPath: lib/dom4j-1.6.1.jar,
lib/jaxen-1.1-beta-6.jar,
.,
* Within the feature project, the organization is :
myplugin.feature
|- src
|- installhandler
|- MyInstallHandler.java
|- feature.xml
|- build.properties
|- installhandler.jar // it's the jar of MyInstallHandler.java
This feature reference the plugin project (which is added within the
Plug-ins and Fragments tab).
The feature.xml file is :
<feature
id="myplugin.feature"
label="myplugin.feature"
version="1.0.1"
provider-name=""
plugin="myplugin">
<install-handler library="installhandler.jar"
handler="installhandler.MyInstallHandler"/>
<description>
My plugin
</description>
<copyright>
</copyright>
<license>
Yes, you agree.
</license>
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.debug.core"/>
</requires>
<plugin
id="myplugin"
download-size="0"
install-size="0"
version="1.0.1"/>
</feature>
I don't know why it's not run... and why classes are not found...
Thanks
|
|
|
Re: Add jar into feature needs to plugin installation but NoClassDefFoundError [message #185463 is a reply to message #185308] |
Thu, 21 December 2006 16:10  |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Sophie" <Sophie.Andrieu@xrce.xerox.com> wrote in message
news:a323b819c1b945149bd19cbe491afab6$1@www.eclipse.org...
> Thanks for your help... But I have the same error...
>
> I do the following things :
>
> * Within the plugin project :
> As you says, I add the two jars within the plugin project like :
> - within the Runtime tab, I add dom4j-1.6.1.jar and jaxen-1.1-beta-6.jar
> into the classpath.
> - within the Build configuration, I select the two jars into the Binary
> Build
> Thus, the MANIFEST.MF has a Bundle-ClassPath like :
> Bundle-ClassPath: lib/dom4j-1.6.1.jar,
> lib/jaxen-1.1-beta-6.jar,
> .,
>
When the plug-in is installed, does it still contain the jar files? That
is, does the installed plug-in have a lib/ directory, and are
dom4j-1.6.1.jar and jaxen-1.1-beta-6.jar present in that directory?
|
|
|
Powered by
FUDForum. Page generated in 0.08763 seconds