On Thu, Dec 4, 2008 at 3:34 PM, Rob Walker <[EMAIL PROTECTED]> wrote:
>
>
> Paul wrote:
>>
>> Hi felix users,
>>
>> I'm adding modularity to an existing application with the help of felix.
>> I used the "service-based application embedding the framework" approach.
>>
>> My first bundle need to use classes present in the application classpath,
>> ie. not in any bundles. When starting the bundle I get this exception :
>>
>> org.osgi.framework.BundleException: Unresolved constraint in bundle 1:
>> package; (package=net.acme.utils)
>>
>> Do I have to specify which packages in my main classpath are exposed to
>> bundles ?
>>
>
> In short, yes - since OSGi R4  you have to specify all non java.* packages
> you want exposed from your classpath to your bundles
>>
>> There must be something I didn't understood well. Any help appreciated.
>>
>
> You'll need to add them to the declared "system packages" - which by default
> in felix, look something like this:

Not in felix >= 1.4 anymore. Use
org.osgi.framework.system.packages.extra unless you want to override
the default packages :-)

regards,

Karl

>   org.osgi.framework.system.packages=org.osgi.framework; version=1.4.0, \
>    org.osgi.service.packageadmin; version=1.2.0, \
>    org.osgi.service.startlevel; version=1.1.0, \
>    org.osgi.service.url; version=1.0.0, \
>    org.osgi.util.tracker; version=1.3.3 \
>    ${jre-${java.specification.version}}, \
>    com.ascert.vt.launch \
>   #
>   # Java platform package export properties.
>   #
>   jre-1.3=, javax.accessibility; javax.naming; javax.naming.directory;
>   javax.naming.event; javax.naming.ldap; javax.naming.spi; javax.rmi;
>   javax.rmi.CORBA; javax.sound.midi; javax.sound.midi.spi;
>   javax.sound.sampled; javax.sound.sampled.spi; javax.swing;
>   javax.swing.border; javax.swing.colorchooser; javax.swing.event;
>   javax.swing.filechooser; javax.swing.plaf; javax.swing.plaf.basic;
>   javax.swing.plaf.metal; javax.swing.plaf.multi; javax.swing.table;
>   javax.swing.text; javax.swing.text.html;
>   javax.swing.text.html.parser; javax.swing.text.rtf;
>   javax.swing.tree; javax.swing.undo; javax.transaction;
>   org.omg.CORBA; org.omg.CORBA_2_3; org.omg.CORBA_2_3.portable;
>   org.omg.CORBA.DynAnyPackage; org.omg.CORBA.ORBPackage;
>   org.omg.CORBA.portable; org.omg.CORBA.TypeCodePackage;
>   org.omg.CosNaming; org.omg.CosNaming.NamingContextPackage;
>   org.omg.SendingContext; org.omg.stub.java.rmi; version="1.3.0"
>   ... more lines for other JRE levels ...
>
>
> The com.ascert.vt.launch package is one we expose to our bundles
>
> -- Rob
>>
>> Best regards
>>
>> Paul
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> --
>
>
> Ascert - Taking systems to the Edge
> [EMAIL PROTECTED]
> +44 (0)20 7488 3470
> www.ascert.com
>
>



-- 
Karl Pauls
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to