I am surprised that you are seeing an issue in 3.2.2 because the default in
3.2 is to delegate to the boot classpath first for all class loads (the
default setting in 3.2 is org.osgi.framework.bootdelegation=*).  The
osgi.compatibility.bootdelegation option was added in 3.3 because we no
longer default to org.osgi.framework.bootdelegation=*.

Be sure that the system property org.osgi.framework.bootdelegation=* in
your 3.2 environment.

Tom




                                                                       
  From:       Jennifer Carlucci/Austin/[EMAIL PROTECTED]                       
                                                                       
  To:         equinox-dev@eclipse.org                                  
                                                                       
  Date:       10/21/2008 04:40 PM                                      
                                                                       
  Subject:    Re: [equinox-dev] Bootdelegation question                
                                                                       






We've come across a problem in which the osgi.compatibility.bootdelegation
property might work for us. We noticed that intermittently, we get a CNFE
from one of our bundle's start() methods when it tries to load one of our
own classes from a jar that is on the boot classpath (not a part of a
plugin). Is this a known issue and do you think in this case that the
osgi.compatibility.bootdelegation property would work? Unfortunately, this
isn't easily reproducible and just seems to happen at random.

We're running on eclipse 3.2.2. I saw that this property isn't documented
until eclipse 3.3. Was this ever back-ported?

Thanks,
Jennifer Carlucci
Lightweight Infrastructure
(949)276-7951
[EMAIL PROTECTED]


AMEN!
Got it! Woks fine now.thx
Oleg
On Oct 8, 2008, at 2:06 PM, Thomas Watson wrote:


See the osgi.compatibility.bootdelegation option in the Eclipse Help.

osgi.compatibility.bootdelegation - if set to "true" then the parent (boot
by default) classloader is delegated to as a last resort if a class or
resource cannot be found. The default value is "true".

When launching Equinox under Eclipse the org.eclipse.equinox.launcher is
used to launch the framework (just like when you launch a normal Eclipse
SDK instance). Launching equinox this way enables the boot delegation
compatibility flag by default. Launching equinox with "-jar
org.eclipse.osgi ..." disables this option and Equinox will use strict OSGi
delegation rules for boot delegation.

Tom



<graycol.gif>Oleg Zhurakousky ---10/08/2008 12:49:27 PM---Thanks guys!!!
Looks like starting Equinox under Eclipse makes the difference, although I
can't see what that would be (checked


                                                                       
 <ecblank.gif>   <ecblank.gif>                                         
 From:           Oleg Zhurakousky <[EMAIL PROTECTED]>  
                                                                       
 <ecblank.gif>   <ecblank.gif>                                         
 To:             Equinox development mailing list <[EMAIL PROTECTED]
                 >                                                     
                                                                       
 <ecblank.gif>   <ecblank.gif>                                         
 Date:           10/08/2008 12:49 PM                                   
                                                                       
 <ecblank.gif>   <ecblank.gif>                                         
 Subject:        Re: [equinox-dev] Bootdelegation question             
                                                                       







Thanks guys!!!
Looks like starting Equinox under Eclipse makes the difference, although I
can't see what that would be (checked generated config.ini etc. . . nothing
suspicious)
Starting the same system bundle from the command line renders the expected
results:

> java -Dorg.osgi.framework.bootdelegation=org.w3c.* -jar
org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar -console -clean

osgi>ss
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.2.R34x_v20080826-1230
1 INSTALLED OSGiBootDelegationBundle_1.0.0

osgi> start 1
class java.lang.String
interface org.w3c.dom.Attr

If bootdelegation option is removed CNFE is thrown during start of the
bundle

Thx
Oleg

On Oct 8, 2008, at 12:57 PM, Stuart McCulloch wrote:%
2008/10/9 Oleg Zhurakousky <[EMAIL PROTECTED]>
Nice to find you here Rob

Yes I am certain (here are all the options that are set)
-Declipse.ignoreApp=true
-Dosgi.noShutdown=true
-Dosgi.clean=true

One thing I will admit that I am running Equinox within eclipse pde. I'll
try from the command line (not sure if it would make the difference)

see also: http://wiki.eclipse.org/Equinox_Boot_Delegation
(IIRC Equinox doesn't run in "strict" OSGi mode by default...)
Oleg

On Oct 8, 2008, at 12:36 PM, Rob Harrop wrote:
Oleg,

Are you certain that the Equinox you are running in doesn't have the boot
delegation set to include org.w3c.*?

Rob

----- "Oleg Zhurakousky" <[EMAIL PROTECTED]> wrote:
If I am reading the spec correctly only java.* are loaded from the
boot class path. All other packages must be declared
with explicit imports.
So something like this without
specifying org.osgi.framework.bootdelegation=org.w3c.*


public void start(BundleContext context) throws Exception {
System. out .println(Class.forName( "java.lang.String" ));
System. out .println(Class.forName( "org.w3c.dom.Attr" ));
}
should result in CNFE on the second line..


Well, it actually works just fine without bootdelegation option. I
figured I missed something, so may be some one can steer me in the
right direction.
Cheers
Oleg
_______________________________________________
equinox-dev mailing list
[EMAIL PROTECTED]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

--
Rob Harrop
SpringSource

Registered in England & Wales - Registration Number 5187766
Registered Office: A2 Yeoman Gate, Yeoman Way, Worthing, West Sussex, BN13
3QZ, UK

This e-mail and any attachments transmitted with it are strictly
confidential and intended solely for the person or entity to whom they are
addressed. Unauthorised use, copying, disclosure or distribution is
prohibited. If you receive this e-mail in error please notify the sender
immediately and then delete it along with any attachments. E-mails should
be checked by the recipient to ensure that there are no viruses and
Interface21 does not accept any responsibility if this is not done. Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Interface21.


_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to