Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Error during publish jetty 10.0.11(Publishing artifacts throws error)
Error during publish jetty 10.0.11 [message #1854758] Thu, 08 September 2022 07:01 Go to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 142
Registered: June 2014
Senior Member

I am using jetty 10.0.11 plugins in my application. During the publish, it is not publishing the jetty jar files. I get below error.
Could you please help?

org.osgi.framework.BundleException: Invalid manifest header Import-Package: "" : Cannot specify java.* packages in Import/Export headers ""
        at org.eclipse.osgi.internal.resolver.StateBuilder.checkImportExportSyntax(
        at org.eclipse.osgi.internal.resolver.StateBuilder.validateHeaders(
        at org.eclipse.osgi.internal.resolver.StateBuilder.createBundleDescription(
        at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.createBundleDescription(
        at org.eclipse.osgi.service.resolver.StateObjectFactory$StateObjectFactoryProxy.createBundleDescription(
        at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.createBundleDescription(
        at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.createBundleDescription(
        at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.getBundleDescriptions(
        at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.perform(
        at org.eclipse.equinox.p2.publisher.Publisher$
        at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.executeBatch(
        at org.eclipse.equinox.p2.publisher.Publisher.publish(
        at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.start(
Re: Error during publish jetty 10.0.11 [message #1854772 is a reply to message #1854758] Fri, 09 September 2022 08:55 Go to previous messageGo to next message
cristelle AMELDA is currently offline cristelle AMELDAFriend
Messages: 5
Registered: August 2022
Junior Member
I would also like to know how to do this
Re: Error during publish jetty 10.0.11 [message #1854778 is a reply to message #1854772] Fri, 09 September 2022 16:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33011
Registered: July 2009
Senior Member
I'm not sure if this is a bug in OSGi, though I think not because I see this message in a properties file:

READER_PACKAGE_JAVA=Cannot specify java.* packages in Export headers \"{0}\"

You might ask for clarification here:

In the case that is just wrong to have this in a header then I think it's a problem that Jetty needs to fix:

BTW, Cristelle, my sense, looking at all your terse posts, is that you are just posting enough times until you case post links. But if you do that, I will ask that all your posts be removed and that your account be blocked.

Ed Merks
Professional Support:
Re: Error during publish jetty 10.0.11 [message #1854782 is a reply to message #1854778] Fri, 09 September 2022 21:36 Go to previous message
BJ Hargrave is currently offline BJ HargraveFriend
Messages: 60
Registered: July 2009
Starting with OSGi Release 7, the OSGi framework must now support imports of
In additional to specifying the version of the execution environment via an requirement, see Namespace, a Bundle may also import java.* packages using the Import-Package header. Imports of java.* packages by a bundle will be used during the resolution process, see Resolving Process, to ensure the bundle has visibility to the requested packages by wiring the bundle's import of a java.* package to the export of the java.* package by the Framework's system bundle. However, a bundle always loads classes in java.* packages via parent delegation. See Parent Delegation. Therefore, a bundle is not required to import a java.* package to have visibility to the classes in the package, if the package is present in the current runtime. It only needs to import a java.* package to have the resolution process ensure the package is available from the execution environment. This can avoid a NoClassDefFoundError during execution of the bundle due to a missing java.* package required by the bundle. 

So Bnd will now generate imports for
packages when certain conditions are present for the bundle. See

The exception above is because p2 uses old OSGi resolving code which is not updated to understand that importing of
packages are now permitted for OSGi R7 frameworks.

Note: Jetty can change their builds to configure the maven-bundle-plugin to instruct Bnd to not import
packages. This can be done by either adding
to the
instruction or adding a new

Previous Topic:Eclipse RCP 4.8 support for oauth2 or sso login
Next Topic: Plug-in org.eclipse.jdt.ui was unable to load
Goto Forum:

Current Time: Sun Dec 10 18:23:21 GMT 2023

Powered by FUDForum. Page generated in 0.04862 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top