Re: [osgi-dev] Bundle starts although no OSGi headers in its Manifest

2018-02-12 Thread Neil Bartlett via osgi-dev
Your manifest does not contain the declaration "Bundle-ManifestVersion: 2".
That means it is interpreted as "Bundle-ManifestVersion: 1"... in other
words an OSGi Release 3 (or older) compatible bundle.

Before Release 4, OSGi had no mandatory manifest headers, even
Bundle-SymbolicName. Therefore ALL valid JAR files were also valid bundles.
However this was not very useful since a bundle that does not have any
imports, exports or activator would not be able to do anything.

Neil


On Mon, Feb 12, 2018 at 9:21 AM, Eran Twili via osgi-dev <
osgi-dev@mail.osgi.org> wrote:

> Hi,
>
>
>
> We are implementing OSGi in our product (embedding Equinox
> programmatically).
>
> Designing our Bundles installation error handling, we run some tests.
>
> Surprisingly, we see that when we install a regular jar archive in the FW,
> it’s getting installed, resolved and even active, without any exception
> thrown.
>
> We also see that it has a regular bundle-id and that his 
> *bundle.getSymbolicName()
> *returns null
>
> (Aligns with https://wiki.searchtechnologies.com/
> javadoc/osgi/osgi-javadoc-v41/org/osgi/framework/Bundle.
> html#getSymbolicName() )
>
>
>
> This jar has a Manifest (I think generated by Maven) but it *doesn’t have
> any OSGi header* in it.
>
> This is the Manifest:
>
>
>
> *Manifest-Version: 1.0*
>
> *Built-By: noname*
>
> *Created-By: Apache Maven 3.2.5*
>
> *Build-Jdk: 1.8.0_92*
>
>
>
> *Name: Skeleton Rule*
>
> *Build-Time: 2018-01-31 10:49*
>
> *ArtifactId: skeleton*
>
> *Version: 5.9.2.2-SNAPSHOT*
>
> *GroupId: skel*
>
> We use org.eclipse.osgi version 3.11.2 (which implements R6)
>
> From what I see in the R6 core spec (section 3.12), the FW should throw an
> exception in such case, when installing the jar.
>
>
>
> 3.12 Bundle Validity
>
> ….
>
> The following (non-exhaustive) list of errors causes a bundle to fail to
> install:
>
> • Missing Bundle-SymbolicName.
>
>
>
> Can anyone please clarify what is the expected behavior?
>
>
>
> Regards,
>
> Eran
>
>
>
>
> Confidentiality: This communication and any attachments are intended for
> the above-named persons only and may be confidential and/or legally
> privileged. Any opinions expressed in this communication are not
> necessarily those of NICE Actimize. If this communication has come to you
> in error you must take no action based on it, nor must you copy or show it
> to anyone; please delete/destroy and inform the sender by e-mail
> immediately.
> Monitoring: NICE Actimize may monitor incoming and outgoing e-mails.
> Viruses: Although we have taken steps toward ensuring that this e-mail and
> attachments are free from any virus, we advise that in keeping with good
> computing practice the recipient should ensure they are actually virus free.
>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Bundle starts although no OSGi headers in its Manifest

2018-02-12 Thread Eran Twili via osgi-dev
Hi,

We are implementing OSGi in our product (embedding Equinox programmatically).
Designing our Bundles installation error handling, we run some tests.
Surprisingly, we see that when we install a regular jar archive in the FW, it's 
getting installed, resolved and even active, without any exception thrown.
We also see that it has a regular bundle-id and that his 
bundle.getSymbolicName() returns null
(Aligns with 
https://wiki.searchtechnologies.com/javadoc/osgi/osgi-javadoc-v41/org/osgi/framework/Bundle.html#getSymbolicName()
 )

This jar has a Manifest (I think generated by Maven) but it doesn't have any 
OSGi header in it.
This is the Manifest:

Manifest-Version: 1.0
Built-By: noname
Created-By: Apache Maven 3.2.5
Build-Jdk: 1.8.0_92

Name: Skeleton Rule
Build-Time: 2018-01-31 10:49
ArtifactId: skeleton
Version: 5.9.2.2-SNAPSHOT
GroupId: skel
We use org.eclipse.osgi version 3.11.2 (which implements R6)
>From what I see in the R6 core spec (section 3.12), the FW should throw an 
>exception in such case, when installing the jar.

3.12 Bundle Validity

The following (non-exhaustive) list of errors causes a bundle to fail to 
install:
* Missing Bundle-SymbolicName.

Can anyone please clarify what is the expected behavior?

Regards,
Eran


Confidentiality: This communication and any attachments are intended for the 
above-named persons only and may be confidential and/or legally privileged. Any 
opinions expressed in this communication are not necessarily those of NICE 
Actimize. If this communication has come to you in error you must take no 
action based on it, nor must you copy or show it to anyone; please 
delete/destroy and inform the sender by e-mail immediately.  
Monitoring: NICE Actimize may monitor incoming and outgoing e-mails.
Viruses: Although we have taken steps toward ensuring that this e-mail and 
attachments are free from any virus, we advise that in keeping with good 
computing practice the recipient should ensure they are actually virus free.
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev