Home » Eclipse Projects » Plugin Development Environment (PDE) » NoClassDefFoundError during export(Why in "test" everything ok?)
NoClassDefFoundError during export [message #696495] |
Thu, 14 July 2011 06:09 |
MarcoGT Messages: 77 Registered: May 2011 |
Member |
|
|
Hi all,
I am developing an Eclipse plug-in extending an existing one which comes from Eclipse.
Inside I code I have added I need log4j and other classes that are inside other JAR built by me (but this is not a plug-in).
Using the Manifest Editor inside Eclipse I have added these two JARs in "Classpath" inside the "Runtime" tab and if I test my plug-in from inside Eclipse using "Run as Eclipse Application" everything is ok.
Problem comes up when I try to export my plug-in because I get some "import can not be resolved" for classes that are inside one of my JAR.
To add these two JARs to my final JAR plug-in I edited the "Runtime Information" inside tab "Build".
In the Manifest.MF tab I can see these two JARs added with:
Bundle-ClassPath: libs/log4j.jar, libs/common.jar
In fact during export the second JAR is included, but I get "import can not be resolved" inside a log file (created during export).
Why? How can I solve?
Thanks
Marco
[Updated on: Thu, 14 July 2011 06:43] Report message to a moderator
|
|
| | | |
Re: NoClassDefFoundError during export [message #696917 is a reply to message #696676] |
Fri, 15 July 2011 06:10 |
MarcoGT Messages: 77 Registered: May 2011 |
Member |
|
|
Ok, this is Manifest
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wst.xml.ui; singleton:=true
Bundle-Version: 1.1.300.qualifier
Bundle-Activator: org.eclipse.wst.xml.ui.internal.XMLUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.wst.xml.ui,
org.eclipse.wst.xml.ui.internal;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.actions;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.autoedit;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.catalog;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.contentassist;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.contentoutline;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.correction;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.dialogs;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.dnd;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.doubleclick;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.editor;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.editor.propertytester,
org.eclipse.wst.xml.ui.internal.handlers;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.hyperlink;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.nsedit;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.perspective;x-friends:="org.eclipse.wst.xsl.ui",
org.eclipse.wst.xml.ui.internal.preferences;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.projection;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.properties;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.provisional;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.quickoutline,
org.eclipse.wst.xml.ui.internal.registry;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.search;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.selection;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.spelling,
org.eclipse.wst.xml.ui.internal.style;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.tabletree;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.taginfo;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.templates;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.text;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.util;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.validation;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.validation.core.errorinfo;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.internal.views.annotations,
org.eclipse.wst.xml.ui.internal.views.contentmodel,
org.eclipse.wst.xml.ui.internal.wizards;x-friends:="org.eclipse.wst.xsd.ui,org.eclipse.wst.dtd.ui",
org.eclipse.wst.xml.ui.views.contentoutline,
org.eclipse.wst.xml.ui.views.properties
Import-Package: com.ibm.icu.util; version="3.8",
com.ibm.icu.text; version="3.8"
Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui.views;bundle-version="[3.4.0,4.0.0)",
org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
org.eclipse.wst.sse.ui;bundle-version="[1.2.0,1.4.0)",
org.eclipse.wst.sse.core;bundle-version="[1.1.500,1.2.0)",
org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,1.2.0)",
org.eclipse.wst.xml.core;bundle-version="[1.1.500,1.2.0)",
org.eclipse.wst.common.ui;bundle-version="[1.1.400,1.2.0)",
org.eclipse.wst.validation;bundle-version="[1.2.100,1.3.0)",
org.eclipse.core.expressions;bundle-version="[3.4.100,4.0.0)",
org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.wst.xml.ui.internal.validation.core.errorinfo,org.eclipse.wst.xml.ui.internal.editor.propertytester"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: libs/common.jar,
libs/log4j-1.2.15.jar,
.
and this is "build.properties"
###############################################################################
# Copyright (c) 2001, 2006 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# IBM Corporation - initial API and implementation
# Jens Lukowski/Innoopract - initial renaming/restructuring
#
###############################################################################
bin.includes = plugin.xml,\
icons/,\
plugin.properties,\
templates/,\
examples/,\
META-INF/,\
.,\
.options,\
about.html,\
about.ini,\
about.properties,\
about.mappings,\
properties/,\
libs/common.jar,\
libs/log4j-1.2.15.jar
bin.excludes = bin/**,\
@dot/**,\
temp.folder/**
source.. = src/,\
src-multipage/,\
src-wizards/,\
src-catalog/,\
src-validation/
jars.compile.order = libs/log4j-1.2.15.jar,\
libs/common.jar,\
.
source.libs/log4j-1.2.15.jar = libs/
output.libs/log4j-1.2.15.jar = bin/
source.libs/common.jar = libs/
output.libs/common.jar = bin/
And I have "import can not be resolved" for classes inside common.jar
Thanks
Marco
|
|
| | |
Goto Forum:
Current Time: Thu Sep 26 08:38:33 GMT 2024
Powered by FUDForum. Page generated in 0.04241 seconds
|