You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Aaron Zeckoski <aa...@vt.edu> on 2009/04/15 18:41:43 UTC

Bundle fragments in Felix?

I am trying to deploy a bundle fragment in Felix but having some
issues. (using bundlerepository-1.4.0.jar in Sling)
Fragment source here:
https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/

The manifest looks like this:
Manifest-Version: 1.0
Built-By: azeckoski
Created-By: Apache Maven Bundle Plugin
Bnd-LastModified: 1239812300139
Bundle-Version: 1.0
Bundle-Name: PAX WEB Jetty Config Fragment - CARET
Bundle-Description: A bundle fragment for configuring Jetty in Pax-Web
  (requires version 0.5.2 or better to work)
Build-Jdk: 1.5.0_16
Private-Package: .
Bundle-ManifestVersion: 2
Fragment-Host: org.ops4j.pax.web.service
Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
Tool: Bnd-0.0.311
Embed-Dependency: *;scope=compile|runtime;inline=true

However, the fragment does not seem to get deployed with just the xml
file. When I add in the classes needed for ajp to work in jetty then I
get a failure:
org.osgi.framework.BundleException: Fragments with exports, imports,
or native code are not currently supported.
	at org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
	at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
	at org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
	at org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
	at org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
	at org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)

So, the 2 questions are:
1) When will classes be supported in fragments?
2) How would I just get the jetty.xml to deploy correctly in felix?

-AZ

-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by Dan J Hrivnak <da...@raytheon.com>.
Bundle fragments are not currently supported (at least not in 1.4.0).  I 
think they are working on it though.


Aaron Zeckoski wrote:
> I am trying to deploy a bundle fragment in Felix but having some
> issues. (using bundlerepository-1.4.0.jar in Sling)
> Fragment source here:
> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>
> The manifest looks like this:
> Manifest-Version: 1.0
> Built-By: azeckoski
> Created-By: Apache Maven Bundle Plugin
> Bnd-LastModified: 1239812300139
> Bundle-Version: 1.0
> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
> Bundle-Description: A bundle fragment for configuring Jetty in Pax-Web
>   (requires version 0.5.2 or better to work)
> Build-Jdk: 1.5.0_16
> Private-Package: .
> Bundle-ManifestVersion: 2
> Fragment-Host: org.ops4j.pax.web.service
> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
> Tool: Bnd-0.0.311
> Embed-Dependency: *;scope=compile|runtime;inline=true
>
> However, the fragment does not seem to get deployed with just the xml
> file. When I add in the classes needed for ajp to work in jetty then I
> get a failure:
> org.osgi.framework.BundleException: Fragments with exports, imports,
> or native code are not currently supported.
> 	at org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
> 	at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
> 	at org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
> 	at org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
> 	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
> 	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
> 	at org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
> 	at org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>
> So, the 2 questions are:
> 1) When will classes be supported in fragments?
> 2) How would I just get the jetty.xml to deploy correctly in felix?
>
> -AZ
>
>   

Re: Bundle fragments in Felix?

Posted by Aaron Zeckoski <aa...@vt.edu>.
OK, I will look at upgrading the felix version.
Thanks
:-)
-AZ


On Wed, Apr 15, 2009 at 6:33 PM, Richard S. Hall <he...@ungoverned.org> wrote:
> Ok, I finally understand.
>
> Well, the simple thing to do is install both the host and the fragment and
> then type:
>
>    resolve <host-bundle-id>
>
> Where <host-bundle-id> is the bundle ID of the host bundle, this will
> resolve the host and attach the fragment to it, if all goes well.
>
> To verify this, you will probably need to change the log level to 4 in
> conf/config.properties so you can see the wiring information get logged.
>
> -> richard
>
> p.s. I would consider upgrading to Felix 1.6.0 if I were you, since there
> was a fragment bug fixed in the release.
>
> On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
>>
>> It installs but pax-web does not seem to pick up the actual jetty.xml
>> file when I restart so it seems that the fragment is not being placed
>> into the parent bundle but maybe I am just doing something dumb. When
>> I trace the pax-web startup it fails to find the file. Is there a way
>> to figure out if felix is actually placing the xml file in the pax-web
>> bundle? Something I can look at or a breakpoint I can place?
>> Sorry for being so dense here.
>> :-)
>> -AZ
>>
>> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<he...@ungoverned.org>
>>  wrote:
>>
>>>
>>> I must be missing something. The bundle you attached installs fine into
>>> Felix for me:
>>>
>>> ->  ps
>>> START LEVEL 1
>>>   ID   State         Level  Name
>>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository
>>> (1.5.0.SNAPSHOT)
>>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>
>>> I think you are looking at the manifest for the XML only fragment instead
>>> of
>>> the manifest for the fragment containing classes. The one with classes
>>> must
>>> have imports...just a guess.
>>>
>>> ->  richard
>>>
>>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>>
>>>>
>>>> Pretty sure. If you want to check our the source from the link and run
>>>> mvn clean install you can build the same one I am building. I will go
>>>> ahead and attach it.
>>>> -AZ
>>>>
>>>>
>>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>>>  wrote:
>>>>
>>>>
>>>>>
>>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>>>> to a newer version of felix?
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> No, it should work with 1.4.0 too.
>>>>>
>>>>> Seems odd, since Felix is complaining that your fragment bundle has
>>>>> imports
>>>>> or exports. Are you sure that's the complete manifest?
>>>>>
>>>>> ->    richard
>>>>>
>>>>>
>>>>>>
>>>>>> -AZ
>>>>>>
>>>>>>
>>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>  wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> You can have classes in fragments, but currently fragments cannot
>>>>>>> have
>>>>>>> imports or exports.
>>>>>>>
>>>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>>>> priority list although pushed down a little bit recently...
>>>>>>>
>>>>>>> ->      richard
>>>>>>>
>>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>>>> Fragment source here:
>>>>>>>>
>>>>>>>>
>>>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>>>
>>>>>>>> The manifest looks like this:
>>>>>>>> Manifest-Version: 1.0
>>>>>>>> Built-By: azeckoski
>>>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>>>> Bnd-LastModified: 1239812300139
>>>>>>>> Bundle-Version: 1.0
>>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in
>>>>>>>> Pax-Web
>>>>>>>>   (requires version 0.5.2 or better to work)
>>>>>>>> Build-Jdk: 1.5.0_16
>>>>>>>> Private-Package: .
>>>>>>>> Bundle-ManifestVersion: 2
>>>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>>>> Tool: Bnd-0.0.311
>>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>>>
>>>>>>>> However, the fragment does not seem to get deployed with just the
>>>>>>>> xml
>>>>>>>> file. When I add in the classes needed for ajp to work in jetty then
>>>>>>>> I
>>>>>>>> get a failure:
>>>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>>>> or native code are not currently supported.
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>>>        at
>>>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>>>        at
>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>>>        at
>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>>>
>>>>>>>> So, the 2 questions are:
>>>>>>>> 1) When will classes be supported in fragments?
>>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>>>
>>>>>>>> -AZ
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>
>>
>>
>>
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by Stuart McCulloch <mc...@gmail.com>.
2009/4/16 Aaron Zeckoski <aa...@vt.edu>

> Looks like that tip was the key to figuring out the issue.
> -> stop 8
> -> ps -s
> START LEVEL 1
>   ID   State         Level  Symbolic name
> [   0] [Active     ] [    0] org.apache.felix.framework (1.6.0)
> [   1] [Active     ] [    1] org.apache.felix.shell (1.2.0)
> [   2] [Active     ] [    1] org.apache.felix.shell.tui (1.2.0)
> [   3] [Active     ] [    1] org.apache.felix.bundlerepository (1.4.0)
> [   7] [Active     ] [    1] org.apache.felix.log (1.0.0)
> [   8] [Resolved   ] [    1] org.ops4j.pax.web.pax-web-service (0.6.0)
> [   9] [Active     ] [    1] org.osgi.core (4.1)
> [  10] [Active     ] [    1] org.osgi.compendium (4.1.0)
> [  11] [Installed  ] [    1] org.ops4j.pax.web.service.jetty-config (1.0)
> -> resolve 11
> WARNING: Unable to resolve bundle 11
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> 11: host; (bundle-symbolic-name=org.ops4j.pax.web.service))
>
> I think I made a mistake or the name of this changed at some point.
>

the name changed in 0.6.0 to help the Buckminster team (who assume
artifactId == bsn):

   http://issues.ops4j.org/browse/PAXWEB-124

( this is a good example of the problems with named dependencies ;)

Either way, the name was wrong in my fragment. I updated the fragment
> and I get this now:
> -> update 11 file:bundle/jetty-config-1.0.jar
> -> resolve 11
> DEBUG: WIRE: 8.0 -> javax.security.cert -> 0
> DEBUG: WIRE: 8.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 8.0 -> javax.xml.parsers -> 0
> DEBUG: WIRE: 8.0 -> org.xml.sax -> 0
> DEBUG: WIRE: 8.0 -> org.osgi.service.http -> 10.0
> DEBUG: WIRE: 8.0 -> org.osgi.service.cm -> 10.0
> DEBUG: WIRE: 8.0 -> org.xml.sax.helpers -> 0
> DEBUG: WIRE: 8.0 -> javax.net.ssl -> 0
> DEBUG: (FRAGMENT) WIRE: 8.0 -> hosts -> 11.0
> -> start 8
>
> Tracing the code shows that the jetty.xml is getting picked up
> correctly so everything looks good.
>
> Is there any way I can trigger the resolve operation through the web
> console? If not, is it a good idea to have that capability?
>
> Thanks for all the help!
> :-)
> -AZ
>
> On Thu, Apr 16, 2009 at 12:44 PM, Karl Pauls <ka...@gmail.com> wrote:
> > I think you should try to resolve 11 not 8 before you start 8 and not
> > 11. In other words, right now you did:
> >
> > start 11
> > resolve 8
> >
> > and I think it should be:
> >
> > resolve 11
> > start 8
> >
> > regards,
> >
> > Karl
> >
> > On Thu, Apr 16, 2009 at 1:01 PM, Aaron Zeckoski <aa...@vt.edu> wrote:
> >> I am getting the following output when felix starts though which seems
> >> to indicate it cannot find the jetty.xml in the pax-web bundle:
> >>
> >> Welcome to Felix.
> >> =================
> >>
> >> DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
> >> DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
> >> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> >> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> >> DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
> >> -> DEBUG: WIRE: 3.0 -> org.osgi.service.log -> 7.0
> >> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> >> DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
> >> DEBUG: DYNAMIC WIRE: 3.0 -> org.apache.felix.shell -> 1.0
> >> DEBUG: WIRE: 8.0 -> javax.security.cert -> 0
> >> DEBUG: WIRE: 8.0 -> org.osgi.framework -> 0
> >> DEBUG: WIRE: 8.0 -> javax.xml.parsers -> 0
> >> DEBUG: WIRE: 8.0 -> org.xml.sax -> 0
> >> DEBUG: WIRE: 8.0 -> org.osgi.service.cm -> 10.0
> >> DEBUG: WIRE: 8.0 -> org.xml.sax.helpers -> 0
> >> DEBUG: WIRE: 8.0 -> javax.net.ssl -> 0
> >> DEBUG: jetty.xml
> >> (org.apache.felix.moduleloader.ResourceNotFoundException: jetty.xml)
> >> DEBUG: WIRE: 9.0 -> org.osgi.service.packageadmin -> 0
> >> DEBUG: WIRE: 9.0 -> org.osgi.service.url -> 0
> >> DEBUG: WIRE: 9.0 -> org.osgi.service.startlevel -> 0
> >> DEBUG: WIRE: 9.0 -> org.osgi.framework -> 0
> >>
> >> I am open to any suggestions or help that anyone can offer.
> >> Thanks
> >> -AZ
> >>
> >> On Thu, Apr 16, 2009 at 11:58 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
> >>> Here is the output running things in felix directly:
> >>> -> ps
> >>> START LEVEL 1
> >>>   ID   State         Level  Name
> >>> [   0] [Active     ] [    0] System Bundle (1.6.0)
> >>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
> >>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
> >>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
> >>> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
> >>> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
> >>> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
> >>> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
> >>> -> install file:bundle/jetty-config-1.0.jar
> >>> Bundle ID: 11
> >>> -> start 11
> >>> org.osgi.framework.BundleException: Fragment bundles can not be
> started.
> >>> -> resolve 8
> >>> -> ps
> >>> START LEVEL 1
> >>>   ID   State         Level  Name
> >>> [   0] [Active     ] [    0] System Bundle (1.6.0)
> >>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
> >>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
> >>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
> >>> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
> >>> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
> >>> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
> >>> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
> >>> [  11] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET
> (1.0)
> >>>
> >>> I am getting other DEBUG lines but nothing when I try the resolve
> >>> command. Any ideas?
> >>>
> >>> -AZ
> >>>
> >>>
> >>> On Thu, Apr 16, 2009 at 11:25 AM, Aaron Zeckoski <aa...@vt.edu>
> wrote:
> >>>> I figured out the command shell part using the remote shell (very
> nice).
> >>>> http://felix.apache.org/site/apache-felix-remote-shell.html
> >>>>
> >>>> Here is the output I am seeing:
> >>>> -> ps
> >>>> ... snip ...
> >>>> [  42] [Active     ] [    5] OPS4J Pax Web - Service (0.6.0)
> >>>> [  43] [Installed  ] [    2] PAX WEB Jetty Config Fragment - CARET
> (1.0)
> >>>> ... snip ...
> >>>> -> resolve 42
> >>>> ->
> >>>>
> >>>> There is no output in the logs when I run this command however there
> >>>> are tons of other debug lines. I will try just doing this on a
> >>>> separate instance of felix next to see if maybe sling is causing
> >>>> problems here.
> >>>> -AZ
> >>>>
> >>>> On Thu, Apr 16, 2009 at 8:28 AM, Aaron Zeckoski <aa...@vt.edu>
> wrote:
> >>>>> OK, the version in sling is definitely 1.6.0 (bundlerepository 1.4.0
> >>>>> is part of that version) so that is not the issue. The odd thing is
> >>>>> that before sling upgraded felix this was working for the jetty.xml
> >>>>> file by itself (i.e. I could see it being loaded) though not with the
> >>>>> included classes. I think that I figured out the issue with the
> >>>>> classes bundle though (I am no longer getting an error) so I am
> >>>>> attaching that as an example.
> >>>>>
> >>>>> I am not quite sure I follow the instructions here though. Where do I
> >>>>> type in this resolve command? I have been doing most of the stuff
> >>>>> through the felix web management console but I am guessing there is
> >>>>> some command line tool I need in order to do the resolve command.
> >>>>>
> >>>>> I used the admin interface to set the logging level of felix to debug
> >>>>> which produces a whoel lot of stuff so as soon as I can figure out
> how
> >>>>> to trigger the resolve I should be good to go. (Let me know if that
> is
> >>>>> not good enough, I would prefer to not modify the felix jar if
> >>>>> possible).
> >>>>>
> >>>>> -AZ
> >>>>>
> >>>>> On Wed, Apr 15, 2009 at 6:33 PM, Richard S. Hall <
> heavy@ungoverned.org> wrote:
> >>>>>> Ok, I finally understand.
> >>>>>>
> >>>>>> Well, the simple thing to do is install both the host and the
> fragment and
> >>>>>> then type:
> >>>>>>
> >>>>>>    resolve <host-bundle-id>
> >>>>>>
> >>>>>> Where <host-bundle-id> is the bundle ID of the host bundle, this
> will
> >>>>>> resolve the host and attach the fragment to it, if all goes well.
> >>>>>>
> >>>>>> To verify this, you will probably need to change the log level to 4
> in
> >>>>>> conf/config.properties so you can see the wiring information get
> logged.
> >>>>>>
> >>>>>> -> richard
> >>>>>>
> >>>>>> p.s. I would consider upgrading to Felix 1.6.0 if I were you, since
> there
> >>>>>> was a fragment bug fixed in the release.
> >>>>>>
> >>>>>> On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
> >>>>>>>
> >>>>>>> It installs but pax-web does not seem to pick up the actual
> jetty.xml
> >>>>>>> file when I restart so it seems that the fragment is not being
> placed
> >>>>>>> into the parent bundle but maybe I am just doing something dumb.
> When
> >>>>>>> I trace the pax-web startup it fails to find the file. Is there a
> way
> >>>>>>> to figure out if felix is actually placing the xml file in the
> pax-web
> >>>>>>> bundle? Something I can look at or a breakpoint I can place?
> >>>>>>> Sorry for being so dense here.
> >>>>>>> :-)
> >>>>>>> -AZ
> >>>>>>>
> >>>>>>> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<
> heavy@ungoverned.org>
> >>>>>>>  wrote:
> >>>>>>>
> >>>>>>>>
> >>>>>>>> I must be missing something. The bundle you attached installs fine
> into
> >>>>>>>> Felix for me:
> >>>>>>>>
> >>>>>>>> ->  ps
> >>>>>>>> START LEVEL 1
> >>>>>>>>   ID   State         Level  Name
> >>>>>>>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
> >>>>>>>> [   1] [Active     ] [    1] Apache Felix Shell Service
> (1.3.0.SNAPSHOT)
> >>>>>>>> [   2] [Active     ] [    1] Apache Felix Shell TUI
> (1.3.0.SNAPSHOT)
> >>>>>>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository
> >>>>>>>> (1.5.0.SNAPSHOT)
> >>>>>>>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET
> (1.0)
> >>>>>>>>
> >>>>>>>> I think you are looking at the manifest for the XML only fragment
> instead
> >>>>>>>> of
> >>>>>>>> the manifest for the fragment containing classes. The one with
> classes
> >>>>>>>> must
> >>>>>>>> have imports...just a guess.
> >>>>>>>>
> >>>>>>>> ->  richard
> >>>>>>>>
> >>>>>>>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
> >>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Pretty sure. If you want to check our the source from the link
> and run
> >>>>>>>>> mvn clean install you can build the same one I am building. I
> will go
> >>>>>>>>> ahead and attach it.
> >>>>>>>>> -AZ
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<
> heavy@ungoverned.org>
> >>>>>>>>>  wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> I have no imports or exports. Are you saying I need to upgrade
> sling
> >>>>>>>>>>> to a newer version of felix?
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> No, it should work with 1.4.0 too.
> >>>>>>>>>>
> >>>>>>>>>> Seems odd, since Felix is complaining that your fragment bundle
> has
> >>>>>>>>>> imports
> >>>>>>>>>> or exports. Are you sure that's the complete manifest?
> >>>>>>>>>>
> >>>>>>>>>> ->    richard
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> -AZ
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<
> heavy@ungoverned.org>
> >>>>>>>>>>>  wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> You can have classes in fragments, but currently fragments
> cannot
> >>>>>>>>>>>> have
> >>>>>>>>>>>> imports or exports.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Not sure on a timeframe, but they are definitely toward the
> top of my
> >>>>>>>>>>>> priority list although pushed down a little bit recently...
> >>>>>>>>>>>>
> >>>>>>>>>>>> ->      richard
> >>>>>>>>>>>>
> >>>>>>>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> I am trying to deploy a bundle fragment in Felix but having
> some
> >>>>>>>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
> >>>>>>>>>>>>> Fragment source here:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> The manifest looks like this:
> >>>>>>>>>>>>> Manifest-Version: 1.0
> >>>>>>>>>>>>> Built-By: azeckoski
> >>>>>>>>>>>>> Created-By: Apache Maven Bundle Plugin
> >>>>>>>>>>>>> Bnd-LastModified: 1239812300139
> >>>>>>>>>>>>> Bundle-Version: 1.0
> >>>>>>>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
> >>>>>>>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty
> in
> >>>>>>>>>>>>> Pax-Web
> >>>>>>>>>>>>>   (requires version 0.5.2 or better to work)
> >>>>>>>>>>>>> Build-Jdk: 1.5.0_16
> >>>>>>>>>>>>> Private-Package: .
> >>>>>>>>>>>>> Bundle-ManifestVersion: 2
> >>>>>>>>>>>>> Fragment-Host: org.ops4j.pax.web.service
> >>>>>>>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
> >>>>>>>>>>>>> Tool: Bnd-0.0.311
> >>>>>>>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> However, the fragment does not seem to get deployed with just
> the
> >>>>>>>>>>>>> xml
> >>>>>>>>>>>>> file. When I add in the classes needed for ajp to work in
> jetty then
> >>>>>>>>>>>>> I
> >>>>>>>>>>>>> get a failure:
> >>>>>>>>>>>>> org.osgi.framework.BundleException: Fragments with exports,
> imports,
> >>>>>>>>>>>>> or native code are not currently supported.
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
> >>>>>>>>>>>>>        at
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> So, the 2 questions are:
> >>>>>>>>>>>>> 1) When will classes be supported in fragments?
> >>>>>>>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in
> felix?
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> -AZ
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> ---------------------------------------------------------------------
> >>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> ------------------------------------------------------------------------
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> ---------------------------------------------------------------------
> >>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Aaron Zeckoski (aaronz@vt.edu)
> >>>>> Senior Research Engineer - CARET - Cambridge University
> >>>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/<http://bugs.sakaiproject.org/confluence/display/%7Eaaronz/>
> ]
> >>>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Aaron Zeckoski (aaronz@vt.edu)
> >>>> Senior Research Engineer - CARET - Cambridge University
> >>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/<http://bugs.sakaiproject.org/confluence/display/%7Eaaronz/>
> ]
> >>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Aaron Zeckoski (aaronz@vt.edu)
> >>> Senior Research Engineer - CARET - Cambridge University
> >>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/<http://bugs.sakaiproject.org/confluence/display/%7Eaaronz/>
> ]
> >>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
> >>>
> >>
> >>
> >>
> >> --
> >> Aaron Zeckoski (aaronz@vt.edu)
> >> Senior Research Engineer - CARET - Cambridge University
> >> [http://bugs.sakaiproject.org/confluence/display/~aaronz/<http://bugs.sakaiproject.org/confluence/display/%7Eaaronz/>
> ]
> >> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
> >
> >
> >
> > --
> > Karl Pauls
> > karlpauls@gmail.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
> --
> Aaron Zeckoski (aaronz@vt.edu)
> Senior Research Engineer - CARET - Cambridge University
> [http://bugs.sakaiproject.org/confluence/display/~aaronz/<http://bugs.sakaiproject.org/confluence/display/%7Eaaronz/>
> ]
> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
-- 
Cheers, Stuart

Re: Bundle fragments in Felix?

Posted by Aaron Zeckoski <aa...@vt.edu>.
Looks like that tip was the key to figuring out the issue.
-> stop 8
-> ps -s
START LEVEL 1
   ID   State         Level  Symbolic name
[   0] [Active     ] [    0] org.apache.felix.framework (1.6.0)
[   1] [Active     ] [    1] org.apache.felix.shell (1.2.0)
[   2] [Active     ] [    1] org.apache.felix.shell.tui (1.2.0)
[   3] [Active     ] [    1] org.apache.felix.bundlerepository (1.4.0)
[   7] [Active     ] [    1] org.apache.felix.log (1.0.0)
[   8] [Resolved   ] [    1] org.ops4j.pax.web.pax-web-service (0.6.0)
[   9] [Active     ] [    1] org.osgi.core (4.1)
[  10] [Active     ] [    1] org.osgi.compendium (4.1.0)
[  11] [Installed  ] [    1] org.ops4j.pax.web.service.jetty-config (1.0)
-> resolve 11
WARNING: Unable to resolve bundle 11
(org.osgi.framework.BundleException: Unresolved constraint in bundle
11: host; (bundle-symbolic-name=org.ops4j.pax.web.service))

I think I made a mistake or the name of this changed at some point.
Either way, the name was wrong in my fragment. I updated the fragment
and I get this now:
-> update 11 file:bundle/jetty-config-1.0.jar
-> resolve 11
DEBUG: WIRE: 8.0 -> javax.security.cert -> 0
DEBUG: WIRE: 8.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 8.0 -> javax.xml.parsers -> 0
DEBUG: WIRE: 8.0 -> org.xml.sax -> 0
DEBUG: WIRE: 8.0 -> org.osgi.service.http -> 10.0
DEBUG: WIRE: 8.0 -> org.osgi.service.cm -> 10.0
DEBUG: WIRE: 8.0 -> org.xml.sax.helpers -> 0
DEBUG: WIRE: 8.0 -> javax.net.ssl -> 0
DEBUG: (FRAGMENT) WIRE: 8.0 -> hosts -> 11.0
-> start 8

Tracing the code shows that the jetty.xml is getting picked up
correctly so everything looks good.

Is there any way I can trigger the resolve operation through the web
console? If not, is it a good idea to have that capability?

Thanks for all the help!
:-)
-AZ

On Thu, Apr 16, 2009 at 12:44 PM, Karl Pauls <ka...@gmail.com> wrote:
> I think you should try to resolve 11 not 8 before you start 8 and not
> 11. In other words, right now you did:
>
> start 11
> resolve 8
>
> and I think it should be:
>
> resolve 11
> start 8
>
> regards,
>
> Karl
>
> On Thu, Apr 16, 2009 at 1:01 PM, Aaron Zeckoski <aa...@vt.edu> wrote:
>> I am getting the following output when felix starts though which seems
>> to indicate it cannot find the jetty.xml in the pax-web bundle:
>>
>> Welcome to Felix.
>> =================
>>
>> DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
>> DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
>> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
>> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
>> DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
>> -> DEBUG: WIRE: 3.0 -> org.osgi.service.log -> 7.0
>> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
>> DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
>> DEBUG: DYNAMIC WIRE: 3.0 -> org.apache.felix.shell -> 1.0
>> DEBUG: WIRE: 8.0 -> javax.security.cert -> 0
>> DEBUG: WIRE: 8.0 -> org.osgi.framework -> 0
>> DEBUG: WIRE: 8.0 -> javax.xml.parsers -> 0
>> DEBUG: WIRE: 8.0 -> org.xml.sax -> 0
>> DEBUG: WIRE: 8.0 -> org.osgi.service.cm -> 10.0
>> DEBUG: WIRE: 8.0 -> org.xml.sax.helpers -> 0
>> DEBUG: WIRE: 8.0 -> javax.net.ssl -> 0
>> DEBUG: jetty.xml
>> (org.apache.felix.moduleloader.ResourceNotFoundException: jetty.xml)
>> DEBUG: WIRE: 9.0 -> org.osgi.service.packageadmin -> 0
>> DEBUG: WIRE: 9.0 -> org.osgi.service.url -> 0
>> DEBUG: WIRE: 9.0 -> org.osgi.service.startlevel -> 0
>> DEBUG: WIRE: 9.0 -> org.osgi.framework -> 0
>>
>> I am open to any suggestions or help that anyone can offer.
>> Thanks
>> -AZ
>>
>> On Thu, Apr 16, 2009 at 11:58 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>>> Here is the output running things in felix directly:
>>> -> ps
>>> START LEVEL 1
>>>   ID   State         Level  Name
>>> [   0] [Active     ] [    0] System Bundle (1.6.0)
>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
>>> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
>>> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
>>> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
>>> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
>>> -> install file:bundle/jetty-config-1.0.jar
>>> Bundle ID: 11
>>> -> start 11
>>> org.osgi.framework.BundleException: Fragment bundles can not be started.
>>> -> resolve 8
>>> -> ps
>>> START LEVEL 1
>>>   ID   State         Level  Name
>>> [   0] [Active     ] [    0] System Bundle (1.6.0)
>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
>>> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
>>> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
>>> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
>>> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
>>> [  11] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>
>>> I am getting other DEBUG lines but nothing when I try the resolve
>>> command. Any ideas?
>>>
>>> -AZ
>>>
>>>
>>> On Thu, Apr 16, 2009 at 11:25 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>>>> I figured out the command shell part using the remote shell (very nice).
>>>> http://felix.apache.org/site/apache-felix-remote-shell.html
>>>>
>>>> Here is the output I am seeing:
>>>> -> ps
>>>> ... snip ...
>>>> [  42] [Active     ] [    5] OPS4J Pax Web - Service (0.6.0)
>>>> [  43] [Installed  ] [    2] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>> ... snip ...
>>>> -> resolve 42
>>>> ->
>>>>
>>>> There is no output in the logs when I run this command however there
>>>> are tons of other debug lines. I will try just doing this on a
>>>> separate instance of felix next to see if maybe sling is causing
>>>> problems here.
>>>> -AZ
>>>>
>>>> On Thu, Apr 16, 2009 at 8:28 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>>>>> OK, the version in sling is definitely 1.6.0 (bundlerepository 1.4.0
>>>>> is part of that version) so that is not the issue. The odd thing is
>>>>> that before sling upgraded felix this was working for the jetty.xml
>>>>> file by itself (i.e. I could see it being loaded) though not with the
>>>>> included classes. I think that I figured out the issue with the
>>>>> classes bundle though (I am no longer getting an error) so I am
>>>>> attaching that as an example.
>>>>>
>>>>> I am not quite sure I follow the instructions here though. Where do I
>>>>> type in this resolve command? I have been doing most of the stuff
>>>>> through the felix web management console but I am guessing there is
>>>>> some command line tool I need in order to do the resolve command.
>>>>>
>>>>> I used the admin interface to set the logging level of felix to debug
>>>>> which produces a whoel lot of stuff so as soon as I can figure out how
>>>>> to trigger the resolve I should be good to go. (Let me know if that is
>>>>> not good enough, I would prefer to not modify the felix jar if
>>>>> possible).
>>>>>
>>>>> -AZ
>>>>>
>>>>> On Wed, Apr 15, 2009 at 6:33 PM, Richard S. Hall <he...@ungoverned.org> wrote:
>>>>>> Ok, I finally understand.
>>>>>>
>>>>>> Well, the simple thing to do is install both the host and the fragment and
>>>>>> then type:
>>>>>>
>>>>>>    resolve <host-bundle-id>
>>>>>>
>>>>>> Where <host-bundle-id> is the bundle ID of the host bundle, this will
>>>>>> resolve the host and attach the fragment to it, if all goes well.
>>>>>>
>>>>>> To verify this, you will probably need to change the log level to 4 in
>>>>>> conf/config.properties so you can see the wiring information get logged.
>>>>>>
>>>>>> -> richard
>>>>>>
>>>>>> p.s. I would consider upgrading to Felix 1.6.0 if I were you, since there
>>>>>> was a fragment bug fixed in the release.
>>>>>>
>>>>>> On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
>>>>>>>
>>>>>>> It installs but pax-web does not seem to pick up the actual jetty.xml
>>>>>>> file when I restart so it seems that the fragment is not being placed
>>>>>>> into the parent bundle but maybe I am just doing something dumb. When
>>>>>>> I trace the pax-web startup it fails to find the file. Is there a way
>>>>>>> to figure out if felix is actually placing the xml file in the pax-web
>>>>>>> bundle? Something I can look at or a breakpoint I can place?
>>>>>>> Sorry for being so dense here.
>>>>>>> :-)
>>>>>>> -AZ
>>>>>>>
>>>>>>> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>  wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> I must be missing something. The bundle you attached installs fine into
>>>>>>>> Felix for me:
>>>>>>>>
>>>>>>>> ->  ps
>>>>>>>> START LEVEL 1
>>>>>>>>   ID   State         Level  Name
>>>>>>>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
>>>>>>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
>>>>>>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
>>>>>>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository
>>>>>>>> (1.5.0.SNAPSHOT)
>>>>>>>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>>>>>>
>>>>>>>> I think you are looking at the manifest for the XML only fragment instead
>>>>>>>> of
>>>>>>>> the manifest for the fragment containing classes. The one with classes
>>>>>>>> must
>>>>>>>> have imports...just a guess.
>>>>>>>>
>>>>>>>> ->  richard
>>>>>>>>
>>>>>>>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Pretty sure. If you want to check our the source from the link and run
>>>>>>>>> mvn clean install you can build the same one I am building. I will go
>>>>>>>>> ahead and attach it.
>>>>>>>>> -AZ
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>>>>>>>>> to a newer version of felix?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> No, it should work with 1.4.0 too.
>>>>>>>>>>
>>>>>>>>>> Seems odd, since Felix is complaining that your fragment bundle has
>>>>>>>>>> imports
>>>>>>>>>> or exports. Are you sure that's the complete manifest?
>>>>>>>>>>
>>>>>>>>>> ->    richard
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> -AZ
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>>>>>  wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> You can have classes in fragments, but currently fragments cannot
>>>>>>>>>>>> have
>>>>>>>>>>>> imports or exports.
>>>>>>>>>>>>
>>>>>>>>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>>>>>>>>> priority list although pushed down a little bit recently...
>>>>>>>>>>>>
>>>>>>>>>>>> ->      richard
>>>>>>>>>>>>
>>>>>>>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>>>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>>>>>>>>> Fragment source here:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>>>>>>>>
>>>>>>>>>>>>> The manifest looks like this:
>>>>>>>>>>>>> Manifest-Version: 1.0
>>>>>>>>>>>>> Built-By: azeckoski
>>>>>>>>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>>>>>>>>> Bnd-LastModified: 1239812300139
>>>>>>>>>>>>> Bundle-Version: 1.0
>>>>>>>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>>>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in
>>>>>>>>>>>>> Pax-Web
>>>>>>>>>>>>>   (requires version 0.5.2 or better to work)
>>>>>>>>>>>>> Build-Jdk: 1.5.0_16
>>>>>>>>>>>>> Private-Package: .
>>>>>>>>>>>>> Bundle-ManifestVersion: 2
>>>>>>>>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>>>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>>>>>>>>> Tool: Bnd-0.0.311
>>>>>>>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>>>>>>>>
>>>>>>>>>>>>> However, the fragment does not seem to get deployed with just the
>>>>>>>>>>>>> xml
>>>>>>>>>>>>> file. When I add in the classes needed for ajp to work in jetty then
>>>>>>>>>>>>> I
>>>>>>>>>>>>> get a failure:
>>>>>>>>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>>>>>>>>> or native code are not currently supported.
>>>>>>>>>>>>>        at
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>>>>>>>>        at
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>>>>>>>>
>>>>>>>>>>>>> So, the 2 questions are:
>>>>>>>>>>>>> 1) When will classes be supported in fragments?
>>>>>>>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>>>>>>>>
>>>>>>>>>>>>> -AZ
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Aaron Zeckoski (aaronz@vt.edu)
>>>>> Senior Research Engineer - CARET - Cambridge University
>>>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>>>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Aaron Zeckoski (aaronz@vt.edu)
>>>> Senior Research Engineer - CARET - Cambridge University
>>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>>>
>>>
>>>
>>>
>>> --
>>> Aaron Zeckoski (aaronz@vt.edu)
>>> Senior Research Engineer - CARET - Cambridge University
>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>>
>>
>>
>>
>> --
>> Aaron Zeckoski (aaronz@vt.edu)
>> Senior Research Engineer - CARET - Cambridge University
>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by Karl Pauls <ka...@gmail.com>.
I think you should try to resolve 11 not 8 before you start 8 and not
11. In other words, right now you did:

start 11
resolve 8

and I think it should be:

resolve 11
start 8

regards,

Karl

On Thu, Apr 16, 2009 at 1:01 PM, Aaron Zeckoski <aa...@vt.edu> wrote:
> I am getting the following output when felix starts though which seems
> to indicate it cannot find the jetty.xml in the pax-web bundle:
>
> Welcome to Felix.
> =================
>
> DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
> DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
> -> DEBUG: WIRE: 3.0 -> org.osgi.service.log -> 7.0
> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
> DEBUG: DYNAMIC WIRE: 3.0 -> org.apache.felix.shell -> 1.0
> DEBUG: WIRE: 8.0 -> javax.security.cert -> 0
> DEBUG: WIRE: 8.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 8.0 -> javax.xml.parsers -> 0
> DEBUG: WIRE: 8.0 -> org.xml.sax -> 0
> DEBUG: WIRE: 8.0 -> org.osgi.service.cm -> 10.0
> DEBUG: WIRE: 8.0 -> org.xml.sax.helpers -> 0
> DEBUG: WIRE: 8.0 -> javax.net.ssl -> 0
> DEBUG: jetty.xml
> (org.apache.felix.moduleloader.ResourceNotFoundException: jetty.xml)
> DEBUG: WIRE: 9.0 -> org.osgi.service.packageadmin -> 0
> DEBUG: WIRE: 9.0 -> org.osgi.service.url -> 0
> DEBUG: WIRE: 9.0 -> org.osgi.service.startlevel -> 0
> DEBUG: WIRE: 9.0 -> org.osgi.framework -> 0
>
> I am open to any suggestions or help that anyone can offer.
> Thanks
> -AZ
>
> On Thu, Apr 16, 2009 at 11:58 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>> Here is the output running things in felix directly:
>> -> ps
>> START LEVEL 1
>>   ID   State         Level  Name
>> [   0] [Active     ] [    0] System Bundle (1.6.0)
>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
>> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
>> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
>> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
>> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
>> -> install file:bundle/jetty-config-1.0.jar
>> Bundle ID: 11
>> -> start 11
>> org.osgi.framework.BundleException: Fragment bundles can not be started.
>> -> resolve 8
>> -> ps
>> START LEVEL 1
>>   ID   State         Level  Name
>> [   0] [Active     ] [    0] System Bundle (1.6.0)
>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
>> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
>> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
>> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
>> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
>> [  11] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>
>> I am getting other DEBUG lines but nothing when I try the resolve
>> command. Any ideas?
>>
>> -AZ
>>
>>
>> On Thu, Apr 16, 2009 at 11:25 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>>> I figured out the command shell part using the remote shell (very nice).
>>> http://felix.apache.org/site/apache-felix-remote-shell.html
>>>
>>> Here is the output I am seeing:
>>> -> ps
>>> ... snip ...
>>> [  42] [Active     ] [    5] OPS4J Pax Web - Service (0.6.0)
>>> [  43] [Installed  ] [    2] PAX WEB Jetty Config Fragment - CARET (1.0)
>>> ... snip ...
>>> -> resolve 42
>>> ->
>>>
>>> There is no output in the logs when I run this command however there
>>> are tons of other debug lines. I will try just doing this on a
>>> separate instance of felix next to see if maybe sling is causing
>>> problems here.
>>> -AZ
>>>
>>> On Thu, Apr 16, 2009 at 8:28 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>>>> OK, the version in sling is definitely 1.6.0 (bundlerepository 1.4.0
>>>> is part of that version) so that is not the issue. The odd thing is
>>>> that before sling upgraded felix this was working for the jetty.xml
>>>> file by itself (i.e. I could see it being loaded) though not with the
>>>> included classes. I think that I figured out the issue with the
>>>> classes bundle though (I am no longer getting an error) so I am
>>>> attaching that as an example.
>>>>
>>>> I am not quite sure I follow the instructions here though. Where do I
>>>> type in this resolve command? I have been doing most of the stuff
>>>> through the felix web management console but I am guessing there is
>>>> some command line tool I need in order to do the resolve command.
>>>>
>>>> I used the admin interface to set the logging level of felix to debug
>>>> which produces a whoel lot of stuff so as soon as I can figure out how
>>>> to trigger the resolve I should be good to go. (Let me know if that is
>>>> not good enough, I would prefer to not modify the felix jar if
>>>> possible).
>>>>
>>>> -AZ
>>>>
>>>> On Wed, Apr 15, 2009 at 6:33 PM, Richard S. Hall <he...@ungoverned.org> wrote:
>>>>> Ok, I finally understand.
>>>>>
>>>>> Well, the simple thing to do is install both the host and the fragment and
>>>>> then type:
>>>>>
>>>>>    resolve <host-bundle-id>
>>>>>
>>>>> Where <host-bundle-id> is the bundle ID of the host bundle, this will
>>>>> resolve the host and attach the fragment to it, if all goes well.
>>>>>
>>>>> To verify this, you will probably need to change the log level to 4 in
>>>>> conf/config.properties so you can see the wiring information get logged.
>>>>>
>>>>> -> richard
>>>>>
>>>>> p.s. I would consider upgrading to Felix 1.6.0 if I were you, since there
>>>>> was a fragment bug fixed in the release.
>>>>>
>>>>> On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
>>>>>>
>>>>>> It installs but pax-web does not seem to pick up the actual jetty.xml
>>>>>> file when I restart so it seems that the fragment is not being placed
>>>>>> into the parent bundle but maybe I am just doing something dumb. When
>>>>>> I trace the pax-web startup it fails to find the file. Is there a way
>>>>>> to figure out if felix is actually placing the xml file in the pax-web
>>>>>> bundle? Something I can look at or a breakpoint I can place?
>>>>>> Sorry for being so dense here.
>>>>>> :-)
>>>>>> -AZ
>>>>>>
>>>>>> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>  wrote:
>>>>>>
>>>>>>>
>>>>>>> I must be missing something. The bundle you attached installs fine into
>>>>>>> Felix for me:
>>>>>>>
>>>>>>> ->  ps
>>>>>>> START LEVEL 1
>>>>>>>   ID   State         Level  Name
>>>>>>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
>>>>>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
>>>>>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
>>>>>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository
>>>>>>> (1.5.0.SNAPSHOT)
>>>>>>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>>>>>
>>>>>>> I think you are looking at the manifest for the XML only fragment instead
>>>>>>> of
>>>>>>> the manifest for the fragment containing classes. The one with classes
>>>>>>> must
>>>>>>> have imports...just a guess.
>>>>>>>
>>>>>>> ->  richard
>>>>>>>
>>>>>>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Pretty sure. If you want to check our the source from the link and run
>>>>>>>> mvn clean install you can build the same one I am building. I will go
>>>>>>>> ahead and attach it.
>>>>>>>> -AZ
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>>  wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>>>>>>>> to a newer version of felix?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> No, it should work with 1.4.0 too.
>>>>>>>>>
>>>>>>>>> Seems odd, since Felix is complaining that your fragment bundle has
>>>>>>>>> imports
>>>>>>>>> or exports. Are you sure that's the complete manifest?
>>>>>>>>>
>>>>>>>>> ->    richard
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -AZ
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>>>>  wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> You can have classes in fragments, but currently fragments cannot
>>>>>>>>>>> have
>>>>>>>>>>> imports or exports.
>>>>>>>>>>>
>>>>>>>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>>>>>>>> priority list although pushed down a little bit recently...
>>>>>>>>>>>
>>>>>>>>>>> ->      richard
>>>>>>>>>>>
>>>>>>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>>>>>>>> Fragment source here:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>>>>>>>
>>>>>>>>>>>> The manifest looks like this:
>>>>>>>>>>>> Manifest-Version: 1.0
>>>>>>>>>>>> Built-By: azeckoski
>>>>>>>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>>>>>>>> Bnd-LastModified: 1239812300139
>>>>>>>>>>>> Bundle-Version: 1.0
>>>>>>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in
>>>>>>>>>>>> Pax-Web
>>>>>>>>>>>>   (requires version 0.5.2 or better to work)
>>>>>>>>>>>> Build-Jdk: 1.5.0_16
>>>>>>>>>>>> Private-Package: .
>>>>>>>>>>>> Bundle-ManifestVersion: 2
>>>>>>>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>>>>>>>> Tool: Bnd-0.0.311
>>>>>>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>>>>>>>
>>>>>>>>>>>> However, the fragment does not seem to get deployed with just the
>>>>>>>>>>>> xml
>>>>>>>>>>>> file. When I add in the classes needed for ajp to work in jetty then
>>>>>>>>>>>> I
>>>>>>>>>>>> get a failure:
>>>>>>>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>>>>>>>> or native code are not currently supported.
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>>>>>>>        at
>>>>>>>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>>>>>>>        at
>>>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>>>>>>>        at
>>>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>>>>>>>
>>>>>>>>>>>> So, the 2 questions are:
>>>>>>>>>>>> 1) When will classes be supported in fragments?
>>>>>>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>>>>>>>
>>>>>>>>>>>> -AZ
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Aaron Zeckoski (aaronz@vt.edu)
>>>> Senior Research Engineer - CARET - Cambridge University
>>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>>>
>>>
>>>
>>>
>>> --
>>> Aaron Zeckoski (aaronz@vt.edu)
>>> Senior Research Engineer - CARET - Cambridge University
>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>>
>>
>>
>>
>> --
>> Aaron Zeckoski (aaronz@vt.edu)
>> Senior Research Engineer - CARET - Cambridge University
>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>
>
>
>
> --
> Aaron Zeckoski (aaronz@vt.edu)
> Senior Research Engineer - CARET - Cambridge University
> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Aaron,

It looks like you are creating a startup order dependency: For the jetty
bundle (number 5) to pick up the jetty.xml, it must be started after the
fragment bundle (number 11) has been attached to it.

Unfortunately, I cannot provide you with a proper solution, but I fear
building a fragment for a host bundle and require the host bundle to not
start before the fragment has been attached will not really work...

Maybe Alin Dreghiciu can help here. Or you might want to ask on the PAX
Web lists (since I think this is more of a problem of injecting
functionality into the PAX Web Service than a problem of fragments).

Regards
Felix

Aaron Zeckoski schrieb:
> I am getting the following output when felix starts though which seems
> to indicate it cannot find the jetty.xml in the pax-web bundle:
> 
> Welcome to Felix.
> =================
> 
> DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
> DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
> -> DEBUG: WIRE: 3.0 -> org.osgi.service.log -> 7.0
> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
> DEBUG: DYNAMIC WIRE: 3.0 -> org.apache.felix.shell -> 1.0
> DEBUG: WIRE: 8.0 -> javax.security.cert -> 0
> DEBUG: WIRE: 8.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 8.0 -> javax.xml.parsers -> 0
> DEBUG: WIRE: 8.0 -> org.xml.sax -> 0
> DEBUG: WIRE: 8.0 -> org.osgi.service.cm -> 10.0
> DEBUG: WIRE: 8.0 -> org.xml.sax.helpers -> 0
> DEBUG: WIRE: 8.0 -> javax.net.ssl -> 0
> DEBUG: jetty.xml
> (org.apache.felix.moduleloader.ResourceNotFoundException: jetty.xml)
> DEBUG: WIRE: 9.0 -> org.osgi.service.packageadmin -> 0
> DEBUG: WIRE: 9.0 -> org.osgi.service.url -> 0
> DEBUG: WIRE: 9.0 -> org.osgi.service.startlevel -> 0
> DEBUG: WIRE: 9.0 -> org.osgi.framework -> 0
> 
> I am open to any suggestions or help that anyone can offer.
> Thanks
> -AZ
> 
> On Thu, Apr 16, 2009 at 11:58 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>> Here is the output running things in felix directly:
>> -> ps
>> START LEVEL 1
>>   ID   State         Level  Name
>> [   0] [Active     ] [    0] System Bundle (1.6.0)
>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
>> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
>> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
>> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
>> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
>> -> install file:bundle/jetty-config-1.0.jar
>> Bundle ID: 11
>> -> start 11
>> org.osgi.framework.BundleException: Fragment bundles can not be started.
>> -> resolve 8
>> -> ps
>> START LEVEL 1
>>   ID   State         Level  Name
>> [   0] [Active     ] [    0] System Bundle (1.6.0)
>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
>> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
>> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
>> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
>> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
>> [  11] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>
>> I am getting other DEBUG lines but nothing when I try the resolve
>> command. Any ideas?
>>
>> -AZ
>>
>>
>> On Thu, Apr 16, 2009 at 11:25 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>>> I figured out the command shell part using the remote shell (very nice).
>>> http://felix.apache.org/site/apache-felix-remote-shell.html
>>>
>>> Here is the output I am seeing:
>>> -> ps
>>> ... snip ...
>>> [  42] [Active     ] [    5] OPS4J Pax Web - Service (0.6.0)
>>> [  43] [Installed  ] [    2] PAX WEB Jetty Config Fragment - CARET (1.0)
>>> ... snip ...
>>> -> resolve 42
>>> ->
>>>
>>> There is no output in the logs when I run this command however there
>>> are tons of other debug lines. I will try just doing this on a
>>> separate instance of felix next to see if maybe sling is causing
>>> problems here.
>>> -AZ
>>>
>>> On Thu, Apr 16, 2009 at 8:28 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>>>> OK, the version in sling is definitely 1.6.0 (bundlerepository 1.4.0
>>>> is part of that version) so that is not the issue. The odd thing is
>>>> that before sling upgraded felix this was working for the jetty.xml
>>>> file by itself (i.e. I could see it being loaded) though not with the
>>>> included classes. I think that I figured out the issue with the
>>>> classes bundle though (I am no longer getting an error) so I am
>>>> attaching that as an example.
>>>>
>>>> I am not quite sure I follow the instructions here though. Where do I
>>>> type in this resolve command? I have been doing most of the stuff
>>>> through the felix web management console but I am guessing there is
>>>> some command line tool I need in order to do the resolve command.
>>>>
>>>> I used the admin interface to set the logging level of felix to debug
>>>> which produces a whoel lot of stuff so as soon as I can figure out how
>>>> to trigger the resolve I should be good to go. (Let me know if that is
>>>> not good enough, I would prefer to not modify the felix jar if
>>>> possible).
>>>>
>>>> -AZ
>>>>
>>>> On Wed, Apr 15, 2009 at 6:33 PM, Richard S. Hall <he...@ungoverned.org> wrote:
>>>>> Ok, I finally understand.
>>>>>
>>>>> Well, the simple thing to do is install both the host and the fragment and
>>>>> then type:
>>>>>
>>>>>    resolve <host-bundle-id>
>>>>>
>>>>> Where <host-bundle-id> is the bundle ID of the host bundle, this will
>>>>> resolve the host and attach the fragment to it, if all goes well.
>>>>>
>>>>> To verify this, you will probably need to change the log level to 4 in
>>>>> conf/config.properties so you can see the wiring information get logged.
>>>>>
>>>>> -> richard
>>>>>
>>>>> p.s. I would consider upgrading to Felix 1.6.0 if I were you, since there
>>>>> was a fragment bug fixed in the release.
>>>>>
>>>>> On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
>>>>>> It installs but pax-web does not seem to pick up the actual jetty.xml
>>>>>> file when I restart so it seems that the fragment is not being placed
>>>>>> into the parent bundle but maybe I am just doing something dumb. When
>>>>>> I trace the pax-web startup it fails to find the file. Is there a way
>>>>>> to figure out if felix is actually placing the xml file in the pax-web
>>>>>> bundle? Something I can look at or a breakpoint I can place?
>>>>>> Sorry for being so dense here.
>>>>>> :-)
>>>>>> -AZ
>>>>>>
>>>>>> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>  wrote:
>>>>>>
>>>>>>> I must be missing something. The bundle you attached installs fine into
>>>>>>> Felix for me:
>>>>>>>
>>>>>>> ->  ps
>>>>>>> START LEVEL 1
>>>>>>>   ID   State         Level  Name
>>>>>>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
>>>>>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
>>>>>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
>>>>>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository
>>>>>>> (1.5.0.SNAPSHOT)
>>>>>>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>>>>>
>>>>>>> I think you are looking at the manifest for the XML only fragment instead
>>>>>>> of
>>>>>>> the manifest for the fragment containing classes. The one with classes
>>>>>>> must
>>>>>>> have imports...just a guess.
>>>>>>>
>>>>>>> ->  richard
>>>>>>>
>>>>>>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>>>>>>
>>>>>>>> Pretty sure. If you want to check our the source from the link and run
>>>>>>>> mvn clean install you can build the same one I am building. I will go
>>>>>>>> ahead and attach it.
>>>>>>>> -AZ
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>>  wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>>>>>>>> to a newer version of felix?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> No, it should work with 1.4.0 too.
>>>>>>>>>
>>>>>>>>> Seems odd, since Felix is complaining that your fragment bundle has
>>>>>>>>> imports
>>>>>>>>> or exports. Are you sure that's the complete manifest?
>>>>>>>>>
>>>>>>>>> ->    richard
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> -AZ
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>>>>  wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> You can have classes in fragments, but currently fragments cannot
>>>>>>>>>>> have
>>>>>>>>>>> imports or exports.
>>>>>>>>>>>
>>>>>>>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>>>>>>>> priority list although pushed down a little bit recently...
>>>>>>>>>>>
>>>>>>>>>>> ->      richard
>>>>>>>>>>>
>>>>>>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>>>>>>>> Fragment source here:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>>>>>>>
>>>>>>>>>>>> The manifest looks like this:
>>>>>>>>>>>> Manifest-Version: 1.0
>>>>>>>>>>>> Built-By: azeckoski
>>>>>>>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>>>>>>>> Bnd-LastModified: 1239812300139
>>>>>>>>>>>> Bundle-Version: 1.0
>>>>>>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in
>>>>>>>>>>>> Pax-Web
>>>>>>>>>>>>   (requires version 0.5.2 or better to work)
>>>>>>>>>>>> Build-Jdk: 1.5.0_16
>>>>>>>>>>>> Private-Package: .
>>>>>>>>>>>> Bundle-ManifestVersion: 2
>>>>>>>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>>>>>>>> Tool: Bnd-0.0.311
>>>>>>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>>>>>>>
>>>>>>>>>>>> However, the fragment does not seem to get deployed with just the
>>>>>>>>>>>> xml
>>>>>>>>>>>> file. When I add in the classes needed for ajp to work in jetty then
>>>>>>>>>>>> I
>>>>>>>>>>>> get a failure:
>>>>>>>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>>>>>>>> or native code are not currently supported.
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>>>>>>>        at
>>>>>>>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>>>>>>>        at
>>>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>>>>>>>        at
>>>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>>>>>>>        at
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>>>>>>>
>>>>>>>>>>>> So, the 2 questions are:
>>>>>>>>>>>> 1) When will classes be supported in fragments?
>>>>>>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>>>>>>>
>>>>>>>>>>>> -AZ
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> Aaron Zeckoski (aaronz@vt.edu)
>>>> Senior Research Engineer - CARET - Cambridge University
>>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>>>
>>>
>>>
>>> --
>>> Aaron Zeckoski (aaronz@vt.edu)
>>> Senior Research Engineer - CARET - Cambridge University
>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>>
>>
>>
>> --
>> Aaron Zeckoski (aaronz@vt.edu)
>> Senior Research Engineer - CARET - Cambridge University
>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by Aaron Zeckoski <aa...@vt.edu>.
I am getting the following output when felix starts though which seems
to indicate it cannot find the jetty.xml in the pax-web bundle:

Welcome to Felix.
=================

DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
-> DEBUG: WIRE: 3.0 -> org.osgi.service.log -> 7.0
DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
DEBUG: DYNAMIC WIRE: 3.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 8.0 -> javax.security.cert -> 0
DEBUG: WIRE: 8.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 8.0 -> javax.xml.parsers -> 0
DEBUG: WIRE: 8.0 -> org.xml.sax -> 0
DEBUG: WIRE: 8.0 -> org.osgi.service.cm -> 10.0
DEBUG: WIRE: 8.0 -> org.xml.sax.helpers -> 0
DEBUG: WIRE: 8.0 -> javax.net.ssl -> 0
DEBUG: jetty.xml
(org.apache.felix.moduleloader.ResourceNotFoundException: jetty.xml)
DEBUG: WIRE: 9.0 -> org.osgi.service.packageadmin -> 0
DEBUG: WIRE: 9.0 -> org.osgi.service.url -> 0
DEBUG: WIRE: 9.0 -> org.osgi.service.startlevel -> 0
DEBUG: WIRE: 9.0 -> org.osgi.framework -> 0

I am open to any suggestions or help that anyone can offer.
Thanks
-AZ

On Thu, Apr 16, 2009 at 11:58 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
> Here is the output running things in felix directly:
> -> ps
> START LEVEL 1
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (1.6.0)
> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
> -> install file:bundle/jetty-config-1.0.jar
> Bundle ID: 11
> -> start 11
> org.osgi.framework.BundleException: Fragment bundles can not be started.
> -> resolve 8
> -> ps
> START LEVEL 1
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (1.6.0)
> [   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
> [   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
> [   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
> [   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
> [  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
> [  11] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>
> I am getting other DEBUG lines but nothing when I try the resolve
> command. Any ideas?
>
> -AZ
>
>
> On Thu, Apr 16, 2009 at 11:25 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>> I figured out the command shell part using the remote shell (very nice).
>> http://felix.apache.org/site/apache-felix-remote-shell.html
>>
>> Here is the output I am seeing:
>> -> ps
>> ... snip ...
>> [  42] [Active     ] [    5] OPS4J Pax Web - Service (0.6.0)
>> [  43] [Installed  ] [    2] PAX WEB Jetty Config Fragment - CARET (1.0)
>> ... snip ...
>> -> resolve 42
>> ->
>>
>> There is no output in the logs when I run this command however there
>> are tons of other debug lines. I will try just doing this on a
>> separate instance of felix next to see if maybe sling is causing
>> problems here.
>> -AZ
>>
>> On Thu, Apr 16, 2009 at 8:28 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>>> OK, the version in sling is definitely 1.6.0 (bundlerepository 1.4.0
>>> is part of that version) so that is not the issue. The odd thing is
>>> that before sling upgraded felix this was working for the jetty.xml
>>> file by itself (i.e. I could see it being loaded) though not with the
>>> included classes. I think that I figured out the issue with the
>>> classes bundle though (I am no longer getting an error) so I am
>>> attaching that as an example.
>>>
>>> I am not quite sure I follow the instructions here though. Where do I
>>> type in this resolve command? I have been doing most of the stuff
>>> through the felix web management console but I am guessing there is
>>> some command line tool I need in order to do the resolve command.
>>>
>>> I used the admin interface to set the logging level of felix to debug
>>> which produces a whoel lot of stuff so as soon as I can figure out how
>>> to trigger the resolve I should be good to go. (Let me know if that is
>>> not good enough, I would prefer to not modify the felix jar if
>>> possible).
>>>
>>> -AZ
>>>
>>> On Wed, Apr 15, 2009 at 6:33 PM, Richard S. Hall <he...@ungoverned.org> wrote:
>>>> Ok, I finally understand.
>>>>
>>>> Well, the simple thing to do is install both the host and the fragment and
>>>> then type:
>>>>
>>>>    resolve <host-bundle-id>
>>>>
>>>> Where <host-bundle-id> is the bundle ID of the host bundle, this will
>>>> resolve the host and attach the fragment to it, if all goes well.
>>>>
>>>> To verify this, you will probably need to change the log level to 4 in
>>>> conf/config.properties so you can see the wiring information get logged.
>>>>
>>>> -> richard
>>>>
>>>> p.s. I would consider upgrading to Felix 1.6.0 if I were you, since there
>>>> was a fragment bug fixed in the release.
>>>>
>>>> On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
>>>>>
>>>>> It installs but pax-web does not seem to pick up the actual jetty.xml
>>>>> file when I restart so it seems that the fragment is not being placed
>>>>> into the parent bundle but maybe I am just doing something dumb. When
>>>>> I trace the pax-web startup it fails to find the file. Is there a way
>>>>> to figure out if felix is actually placing the xml file in the pax-web
>>>>> bundle? Something I can look at or a breakpoint I can place?
>>>>> Sorry for being so dense here.
>>>>> :-)
>>>>> -AZ
>>>>>
>>>>> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>  wrote:
>>>>>
>>>>>>
>>>>>> I must be missing something. The bundle you attached installs fine into
>>>>>> Felix for me:
>>>>>>
>>>>>> ->  ps
>>>>>> START LEVEL 1
>>>>>>   ID   State         Level  Name
>>>>>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
>>>>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
>>>>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
>>>>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository
>>>>>> (1.5.0.SNAPSHOT)
>>>>>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>>>>
>>>>>> I think you are looking at the manifest for the XML only fragment instead
>>>>>> of
>>>>>> the manifest for the fragment containing classes. The one with classes
>>>>>> must
>>>>>> have imports...just a guess.
>>>>>>
>>>>>> ->  richard
>>>>>>
>>>>>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>>>>>
>>>>>>>
>>>>>>> Pretty sure. If you want to check our the source from the link and run
>>>>>>> mvn clean install you can build the same one I am building. I will go
>>>>>>> ahead and attach it.
>>>>>>> -AZ
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>  wrote:
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>>>>>>> to a newer version of felix?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> No, it should work with 1.4.0 too.
>>>>>>>>
>>>>>>>> Seems odd, since Felix is complaining that your fragment bundle has
>>>>>>>> imports
>>>>>>>> or exports. Are you sure that's the complete manifest?
>>>>>>>>
>>>>>>>> ->    richard
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> -AZ
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> You can have classes in fragments, but currently fragments cannot
>>>>>>>>>> have
>>>>>>>>>> imports or exports.
>>>>>>>>>>
>>>>>>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>>>>>>> priority list although pushed down a little bit recently...
>>>>>>>>>>
>>>>>>>>>> ->      richard
>>>>>>>>>>
>>>>>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>>>>>>> Fragment source here:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>>>>>>
>>>>>>>>>>> The manifest looks like this:
>>>>>>>>>>> Manifest-Version: 1.0
>>>>>>>>>>> Built-By: azeckoski
>>>>>>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>>>>>>> Bnd-LastModified: 1239812300139
>>>>>>>>>>> Bundle-Version: 1.0
>>>>>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in
>>>>>>>>>>> Pax-Web
>>>>>>>>>>>   (requires version 0.5.2 or better to work)
>>>>>>>>>>> Build-Jdk: 1.5.0_16
>>>>>>>>>>> Private-Package: .
>>>>>>>>>>> Bundle-ManifestVersion: 2
>>>>>>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>>>>>>> Tool: Bnd-0.0.311
>>>>>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>>>>>>
>>>>>>>>>>> However, the fragment does not seem to get deployed with just the
>>>>>>>>>>> xml
>>>>>>>>>>> file. When I add in the classes needed for ajp to work in jetty then
>>>>>>>>>>> I
>>>>>>>>>>> get a failure:
>>>>>>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>>>>>>> or native code are not currently supported.
>>>>>>>>>>>        at
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>>>>>>        at
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>>>>>>        at
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>>>>>>        at
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>>>>>>        at
>>>>>>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>>>>>>        at
>>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>>>>>>        at
>>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>>>>>>        at
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>>>>>>        at
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>>>>>>        at
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>>>>>>
>>>>>>>>>>> So, the 2 questions are:
>>>>>>>>>>> 1) When will classes be supported in fragments?
>>>>>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>>>>>>
>>>>>>>>>>> -AZ
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Aaron Zeckoski (aaronz@vt.edu)
>>> Senior Research Engineer - CARET - Cambridge University
>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>>
>>
>>
>>
>> --
>> Aaron Zeckoski (aaronz@vt.edu)
>> Senior Research Engineer - CARET - Cambridge University
>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>
>
>
>
> --
> Aaron Zeckoski (aaronz@vt.edu)
> Senior Research Engineer - CARET - Cambridge University
> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by Aaron Zeckoski <aa...@vt.edu>.
Here is the output running things in felix directly:
-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.6.0)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
[   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
[   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
[   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
[  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
-> install file:bundle/jetty-config-1.0.jar
Bundle ID: 11
-> start 11
org.osgi.framework.BundleException: Fragment bundles can not be started.
-> resolve 8
-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.6.0)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
[   7] [Active     ] [    1] Apache Felix Log Service (1.0.0)
[   8] [Active     ] [    1] OPS4J Pax Web - Service (0.6.0)
[   9] [Active     ] [    1] OSGi R4 Core Bundle (4.1)
[  10] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
[  11] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)

I am getting other DEBUG lines but nothing when I try the resolve
command. Any ideas?

-AZ


On Thu, Apr 16, 2009 at 11:25 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
> I figured out the command shell part using the remote shell (very nice).
> http://felix.apache.org/site/apache-felix-remote-shell.html
>
> Here is the output I am seeing:
> -> ps
> ... snip ...
> [  42] [Active     ] [    5] OPS4J Pax Web - Service (0.6.0)
> [  43] [Installed  ] [    2] PAX WEB Jetty Config Fragment - CARET (1.0)
> ... snip ...
> -> resolve 42
> ->
>
> There is no output in the logs when I run this command however there
> are tons of other debug lines. I will try just doing this on a
> separate instance of felix next to see if maybe sling is causing
> problems here.
> -AZ
>
> On Thu, Apr 16, 2009 at 8:28 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>> OK, the version in sling is definitely 1.6.0 (bundlerepository 1.4.0
>> is part of that version) so that is not the issue. The odd thing is
>> that before sling upgraded felix this was working for the jetty.xml
>> file by itself (i.e. I could see it being loaded) though not with the
>> included classes. I think that I figured out the issue with the
>> classes bundle though (I am no longer getting an error) so I am
>> attaching that as an example.
>>
>> I am not quite sure I follow the instructions here though. Where do I
>> type in this resolve command? I have been doing most of the stuff
>> through the felix web management console but I am guessing there is
>> some command line tool I need in order to do the resolve command.
>>
>> I used the admin interface to set the logging level of felix to debug
>> which produces a whoel lot of stuff so as soon as I can figure out how
>> to trigger the resolve I should be good to go. (Let me know if that is
>> not good enough, I would prefer to not modify the felix jar if
>> possible).
>>
>> -AZ
>>
>> On Wed, Apr 15, 2009 at 6:33 PM, Richard S. Hall <he...@ungoverned.org> wrote:
>>> Ok, I finally understand.
>>>
>>> Well, the simple thing to do is install both the host and the fragment and
>>> then type:
>>>
>>>    resolve <host-bundle-id>
>>>
>>> Where <host-bundle-id> is the bundle ID of the host bundle, this will
>>> resolve the host and attach the fragment to it, if all goes well.
>>>
>>> To verify this, you will probably need to change the log level to 4 in
>>> conf/config.properties so you can see the wiring information get logged.
>>>
>>> -> richard
>>>
>>> p.s. I would consider upgrading to Felix 1.6.0 if I were you, since there
>>> was a fragment bug fixed in the release.
>>>
>>> On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
>>>>
>>>> It installs but pax-web does not seem to pick up the actual jetty.xml
>>>> file when I restart so it seems that the fragment is not being placed
>>>> into the parent bundle but maybe I am just doing something dumb. When
>>>> I trace the pax-web startup it fails to find the file. Is there a way
>>>> to figure out if felix is actually placing the xml file in the pax-web
>>>> bundle? Something I can look at or a breakpoint I can place?
>>>> Sorry for being so dense here.
>>>> :-)
>>>> -AZ
>>>>
>>>> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<he...@ungoverned.org>
>>>>  wrote:
>>>>
>>>>>
>>>>> I must be missing something. The bundle you attached installs fine into
>>>>> Felix for me:
>>>>>
>>>>> ->  ps
>>>>> START LEVEL 1
>>>>>   ID   State         Level  Name
>>>>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
>>>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
>>>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
>>>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository
>>>>> (1.5.0.SNAPSHOT)
>>>>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>>>
>>>>> I think you are looking at the manifest for the XML only fragment instead
>>>>> of
>>>>> the manifest for the fragment containing classes. The one with classes
>>>>> must
>>>>> have imports...just a guess.
>>>>>
>>>>> ->  richard
>>>>>
>>>>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>>>>
>>>>>>
>>>>>> Pretty sure. If you want to check our the source from the link and run
>>>>>> mvn clean install you can build the same one I am building. I will go
>>>>>> ahead and attach it.
>>>>>> -AZ
>>>>>>
>>>>>>
>>>>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>  wrote:
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>>>>>> to a newer version of felix?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> No, it should work with 1.4.0 too.
>>>>>>>
>>>>>>> Seems odd, since Felix is complaining that your fragment bundle has
>>>>>>> imports
>>>>>>> or exports. Are you sure that's the complete manifest?
>>>>>>>
>>>>>>> ->    richard
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> -AZ
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>>  wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> You can have classes in fragments, but currently fragments cannot
>>>>>>>>> have
>>>>>>>>> imports or exports.
>>>>>>>>>
>>>>>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>>>>>> priority list although pushed down a little bit recently...
>>>>>>>>>
>>>>>>>>> ->      richard
>>>>>>>>>
>>>>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>>>>>> Fragment source here:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>>>>>
>>>>>>>>>> The manifest looks like this:
>>>>>>>>>> Manifest-Version: 1.0
>>>>>>>>>> Built-By: azeckoski
>>>>>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>>>>>> Bnd-LastModified: 1239812300139
>>>>>>>>>> Bundle-Version: 1.0
>>>>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in
>>>>>>>>>> Pax-Web
>>>>>>>>>>   (requires version 0.5.2 or better to work)
>>>>>>>>>> Build-Jdk: 1.5.0_16
>>>>>>>>>> Private-Package: .
>>>>>>>>>> Bundle-ManifestVersion: 2
>>>>>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>>>>>> Tool: Bnd-0.0.311
>>>>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>>>>>
>>>>>>>>>> However, the fragment does not seem to get deployed with just the
>>>>>>>>>> xml
>>>>>>>>>> file. When I add in the classes needed for ajp to work in jetty then
>>>>>>>>>> I
>>>>>>>>>> get a failure:
>>>>>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>>>>>> or native code are not currently supported.
>>>>>>>>>>        at
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>>>>>        at
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>>>>>        at
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>>>>>        at
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>>>>>        at
>>>>>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>>>>>        at
>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>>>>>        at
>>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>>>>>        at
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>>>>>        at
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>>>>>        at
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>>>>>
>>>>>>>>>> So, the 2 questions are:
>>>>>>>>>> 1) When will classes be supported in fragments?
>>>>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>>>>>
>>>>>>>>>> -AZ
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>> --
>> Aaron Zeckoski (aaronz@vt.edu)
>> Senior Research Engineer - CARET - Cambridge University
>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>
>
>
>
> --
> Aaron Zeckoski (aaronz@vt.edu)
> Senior Research Engineer - CARET - Cambridge University
> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by Aaron Zeckoski <aa...@vt.edu>.
I figured out the command shell part using the remote shell (very nice).
http://felix.apache.org/site/apache-felix-remote-shell.html

Here is the output I am seeing:
-> ps
... snip ...
[  42] [Active     ] [    5] OPS4J Pax Web - Service (0.6.0)
[  43] [Installed  ] [    2] PAX WEB Jetty Config Fragment - CARET (1.0)
... snip ...
-> resolve 42
->

There is no output in the logs when I run this command however there
are tons of other debug lines. I will try just doing this on a
separate instance of felix next to see if maybe sling is causing
problems here.
-AZ

On Thu, Apr 16, 2009 at 8:28 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
> OK, the version in sling is definitely 1.6.0 (bundlerepository 1.4.0
> is part of that version) so that is not the issue. The odd thing is
> that before sling upgraded felix this was working for the jetty.xml
> file by itself (i.e. I could see it being loaded) though not with the
> included classes. I think that I figured out the issue with the
> classes bundle though (I am no longer getting an error) so I am
> attaching that as an example.
>
> I am not quite sure I follow the instructions here though. Where do I
> type in this resolve command? I have been doing most of the stuff
> through the felix web management console but I am guessing there is
> some command line tool I need in order to do the resolve command.
>
> I used the admin interface to set the logging level of felix to debug
> which produces a whoel lot of stuff so as soon as I can figure out how
> to trigger the resolve I should be good to go. (Let me know if that is
> not good enough, I would prefer to not modify the felix jar if
> possible).
>
> -AZ
>
> On Wed, Apr 15, 2009 at 6:33 PM, Richard S. Hall <he...@ungoverned.org> wrote:
>> Ok, I finally understand.
>>
>> Well, the simple thing to do is install both the host and the fragment and
>> then type:
>>
>>    resolve <host-bundle-id>
>>
>> Where <host-bundle-id> is the bundle ID of the host bundle, this will
>> resolve the host and attach the fragment to it, if all goes well.
>>
>> To verify this, you will probably need to change the log level to 4 in
>> conf/config.properties so you can see the wiring information get logged.
>>
>> -> richard
>>
>> p.s. I would consider upgrading to Felix 1.6.0 if I were you, since there
>> was a fragment bug fixed in the release.
>>
>> On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
>>>
>>> It installs but pax-web does not seem to pick up the actual jetty.xml
>>> file when I restart so it seems that the fragment is not being placed
>>> into the parent bundle but maybe I am just doing something dumb. When
>>> I trace the pax-web startup it fails to find the file. Is there a way
>>> to figure out if felix is actually placing the xml file in the pax-web
>>> bundle? Something I can look at or a breakpoint I can place?
>>> Sorry for being so dense here.
>>> :-)
>>> -AZ
>>>
>>> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<he...@ungoverned.org>
>>>  wrote:
>>>
>>>>
>>>> I must be missing something. The bundle you attached installs fine into
>>>> Felix for me:
>>>>
>>>> ->  ps
>>>> START LEVEL 1
>>>>   ID   State         Level  Name
>>>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
>>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
>>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
>>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository
>>>> (1.5.0.SNAPSHOT)
>>>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>>
>>>> I think you are looking at the manifest for the XML only fragment instead
>>>> of
>>>> the manifest for the fragment containing classes. The one with classes
>>>> must
>>>> have imports...just a guess.
>>>>
>>>> ->  richard
>>>>
>>>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>>>
>>>>>
>>>>> Pretty sure. If you want to check our the source from the link and run
>>>>> mvn clean install you can build the same one I am building. I will go
>>>>> ahead and attach it.
>>>>> -AZ
>>>>>
>>>>>
>>>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>  wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>>>>> to a newer version of felix?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> No, it should work with 1.4.0 too.
>>>>>>
>>>>>> Seems odd, since Felix is complaining that your fragment bundle has
>>>>>> imports
>>>>>> or exports. Are you sure that's the complete manifest?
>>>>>>
>>>>>> ->    richard
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> -AZ
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>>  wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> You can have classes in fragments, but currently fragments cannot
>>>>>>>> have
>>>>>>>> imports or exports.
>>>>>>>>
>>>>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>>>>> priority list although pushed down a little bit recently...
>>>>>>>>
>>>>>>>> ->      richard
>>>>>>>>
>>>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>>>>> Fragment source here:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>>>>
>>>>>>>>> The manifest looks like this:
>>>>>>>>> Manifest-Version: 1.0
>>>>>>>>> Built-By: azeckoski
>>>>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>>>>> Bnd-LastModified: 1239812300139
>>>>>>>>> Bundle-Version: 1.0
>>>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in
>>>>>>>>> Pax-Web
>>>>>>>>>   (requires version 0.5.2 or better to work)
>>>>>>>>> Build-Jdk: 1.5.0_16
>>>>>>>>> Private-Package: .
>>>>>>>>> Bundle-ManifestVersion: 2
>>>>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>>>>> Tool: Bnd-0.0.311
>>>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>>>>
>>>>>>>>> However, the fragment does not seem to get deployed with just the
>>>>>>>>> xml
>>>>>>>>> file. When I add in the classes needed for ajp to work in jetty then
>>>>>>>>> I
>>>>>>>>> get a failure:
>>>>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>>>>> or native code are not currently supported.
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>>>>        at
>>>>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>>>>        at
>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>>>>        at
>>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>>>>        at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>>>>
>>>>>>>>> So, the 2 questions are:
>>>>>>>>> 1) When will classes be supported in fragments?
>>>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>>>>
>>>>>>>>> -AZ
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>
>>>
>>>
>>>
>>>
>>
>
>
>
> --
> Aaron Zeckoski (aaronz@vt.edu)
> Senior Research Engineer - CARET - Cambridge University
> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by Aaron Zeckoski <aa...@vt.edu>.
OK, the version in sling is definitely 1.6.0 (bundlerepository 1.4.0
is part of that version) so that is not the issue. The odd thing is
that before sling upgraded felix this was working for the jetty.xml
file by itself (i.e. I could see it being loaded) though not with the
included classes. I think that I figured out the issue with the
classes bundle though (I am no longer getting an error) so I am
attaching that as an example.

I am not quite sure I follow the instructions here though. Where do I
type in this resolve command? I have been doing most of the stuff
through the felix web management console but I am guessing there is
some command line tool I need in order to do the resolve command.

I used the admin interface to set the logging level of felix to debug
which produces a whoel lot of stuff so as soon as I can figure out how
to trigger the resolve I should be good to go. (Let me know if that is
not good enough, I would prefer to not modify the felix jar if
possible).

-AZ

On Wed, Apr 15, 2009 at 6:33 PM, Richard S. Hall <he...@ungoverned.org> wrote:
> Ok, I finally understand.
>
> Well, the simple thing to do is install both the host and the fragment and
> then type:
>
>    resolve <host-bundle-id>
>
> Where <host-bundle-id> is the bundle ID of the host bundle, this will
> resolve the host and attach the fragment to it, if all goes well.
>
> To verify this, you will probably need to change the log level to 4 in
> conf/config.properties so you can see the wiring information get logged.
>
> -> richard
>
> p.s. I would consider upgrading to Felix 1.6.0 if I were you, since there
> was a fragment bug fixed in the release.
>
> On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
>>
>> It installs but pax-web does not seem to pick up the actual jetty.xml
>> file when I restart so it seems that the fragment is not being placed
>> into the parent bundle but maybe I am just doing something dumb. When
>> I trace the pax-web startup it fails to find the file. Is there a way
>> to figure out if felix is actually placing the xml file in the pax-web
>> bundle? Something I can look at or a breakpoint I can place?
>> Sorry for being so dense here.
>> :-)
>> -AZ
>>
>> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<he...@ungoverned.org>
>>  wrote:
>>
>>>
>>> I must be missing something. The bundle you attached installs fine into
>>> Felix for me:
>>>
>>> ->  ps
>>> START LEVEL 1
>>>   ID   State         Level  Name
>>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
>>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
>>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
>>> [   3] [Active     ] [    1] Apache Felix Bundle Repository
>>> (1.5.0.SNAPSHOT)
>>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>>
>>> I think you are looking at the manifest for the XML only fragment instead
>>> of
>>> the manifest for the fragment containing classes. The one with classes
>>> must
>>> have imports...just a guess.
>>>
>>> ->  richard
>>>
>>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>>
>>>>
>>>> Pretty sure. If you want to check our the source from the link and run
>>>> mvn clean install you can build the same one I am building. I will go
>>>> ahead and attach it.
>>>> -AZ
>>>>
>>>>
>>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>>>  wrote:
>>>>
>>>>
>>>>>
>>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>>>> to a newer version of felix?
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> No, it should work with 1.4.0 too.
>>>>>
>>>>> Seems odd, since Felix is complaining that your fragment bundle has
>>>>> imports
>>>>> or exports. Are you sure that's the complete manifest?
>>>>>
>>>>> ->    richard
>>>>>
>>>>>
>>>>>>
>>>>>> -AZ
>>>>>>
>>>>>>
>>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>>  wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> You can have classes in fragments, but currently fragments cannot
>>>>>>> have
>>>>>>> imports or exports.
>>>>>>>
>>>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>>>> priority list although pushed down a little bit recently...
>>>>>>>
>>>>>>> ->      richard
>>>>>>>
>>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>>>> Fragment source here:
>>>>>>>>
>>>>>>>>
>>>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>>>
>>>>>>>> The manifest looks like this:
>>>>>>>> Manifest-Version: 1.0
>>>>>>>> Built-By: azeckoski
>>>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>>>> Bnd-LastModified: 1239812300139
>>>>>>>> Bundle-Version: 1.0
>>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in
>>>>>>>> Pax-Web
>>>>>>>>   (requires version 0.5.2 or better to work)
>>>>>>>> Build-Jdk: 1.5.0_16
>>>>>>>> Private-Package: .
>>>>>>>> Bundle-ManifestVersion: 2
>>>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>>>> Tool: Bnd-0.0.311
>>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>>>
>>>>>>>> However, the fragment does not seem to get deployed with just the
>>>>>>>> xml
>>>>>>>> file. When I add in the classes needed for ajp to work in jetty then
>>>>>>>> I
>>>>>>>> get a failure:
>>>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>>>> or native code are not currently supported.
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>>>        at
>>>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>>>        at
>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>>>        at
>>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>>>        at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>>>
>>>>>>>> So, the 2 questions are:
>>>>>>>> 1) When will classes be supported in fragments?
>>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>>>
>>>>>>>> -AZ
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>
>>
>>
>>
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

Re: Bundle fragments in Felix?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Ok, I finally understand.

Well, the simple thing to do is install both the host and the fragment 
and then type:

     resolve <host-bundle-id>

Where <host-bundle-id> is the bundle ID of the host bundle, this will 
resolve the host and attach the fragment to it, if all goes well.

To verify this, you will probably need to change the log level to 4 in 
conf/config.properties so you can see the wiring information get logged.

-> richard

p.s. I would consider upgrading to Felix 1.6.0 if I were you, since 
there was a fragment bug fixed in the release.

On 4/15/09 1:26 PM, Aaron Zeckoski wrote:
> It installs but pax-web does not seem to pick up the actual jetty.xml
> file when I restart so it seems that the fragment is not being placed
> into the parent bundle but maybe I am just doing something dumb. When
> I trace the pax-web startup it fails to find the file. Is there a way
> to figure out if felix is actually placing the xml file in the pax-web
> bundle? Something I can look at or a breakpoint I can place?
> Sorry for being so dense here.
> :-)
> -AZ
>
> On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall<he...@ungoverned.org>  wrote:
>    
>> I must be missing something. The bundle you attached installs fine into
>> Felix for me:
>>
>> ->  ps
>> START LEVEL 1
>>    ID   State         Level  Name
>> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
>> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
>> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.5.0.SNAPSHOT)
>> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>>
>> I think you are looking at the manifest for the XML only fragment instead of
>> the manifest for the fragment containing classes. The one with classes must
>> have imports...just a guess.
>>
>> ->  richard
>>
>> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>      
>>> Pretty sure. If you want to check our the source from the link and run
>>> mvn clean install you can build the same one I am building. I will go
>>> ahead and attach it.
>>> -AZ
>>>
>>>
>>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>>   wrote:
>>>
>>>        
>>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>>
>>>>          
>>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>>> to a newer version of felix?
>>>>>
>>>>>
>>>>>            
>>>> No, it should work with 1.4.0 too.
>>>>
>>>> Seems odd, since Felix is complaining that your fragment bundle has
>>>> imports
>>>> or exports. Are you sure that's the complete manifest?
>>>>
>>>> ->    richard
>>>>
>>>>          
>>>>> -AZ
>>>>>
>>>>>
>>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>>   wrote:
>>>>>
>>>>>
>>>>>            
>>>>>> You can have classes in fragments, but currently fragments cannot have
>>>>>> imports or exports.
>>>>>>
>>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>>> priority list although pushed down a little bit recently...
>>>>>>
>>>>>> ->      richard
>>>>>>
>>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>>
>>>>>>
>>>>>>              
>>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>>> Fragment source here:
>>>>>>>
>>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>>
>>>>>>> The manifest looks like this:
>>>>>>> Manifest-Version: 1.0
>>>>>>> Built-By: azeckoski
>>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>>> Bnd-LastModified: 1239812300139
>>>>>>> Bundle-Version: 1.0
>>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in Pax-Web
>>>>>>>    (requires version 0.5.2 or better to work)
>>>>>>> Build-Jdk: 1.5.0_16
>>>>>>> Private-Package: .
>>>>>>> Bundle-ManifestVersion: 2
>>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>>> Tool: Bnd-0.0.311
>>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>>
>>>>>>> However, the fragment does not seem to get deployed with just the xml
>>>>>>> file. When I add in the classes needed for ajp to work in jetty then I
>>>>>>> get a failure:
>>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>>> or native code are not currently supported.
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>>         at
>>>>>>>
>>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>>         at
>>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>>         at
>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>>         at
>>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>>
>>>>>>> So, the 2 questions are:
>>>>>>> 1) When will classes be supported in fragments?
>>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>>
>>>>>>> -AZ
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>              
>>>>>
>>>>>            
>>>
>>>    ------------------------------------------------------------------------
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>        
>
>
>
>    

Re: Bundle fragments in Felix?

Posted by Aaron Zeckoski <aa...@vt.edu>.
It installs but pax-web does not seem to pick up the actual jetty.xml
file when I restart so it seems that the fragment is not being placed
into the parent bundle but maybe I am just doing something dumb. When
I trace the pax-web startup it fails to find the file. Is there a way
to figure out if felix is actually placing the xml file in the pax-web
bundle? Something I can look at or a breakpoint I can place?
Sorry for being so dense here.
:-)
-AZ

On Wed, Apr 15, 2009 at 6:21 PM, Richard S. Hall <he...@ungoverned.org> wrote:
> I must be missing something. The bundle you attached installs fine into
> Felix for me:
>
> -> ps
> START LEVEL 1
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
> [   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
> [   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
> [   3] [Active     ] [    1] Apache Felix Bundle Repository (1.5.0.SNAPSHOT)
> [   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)
>
> I think you are looking at the manifest for the XML only fragment instead of
> the manifest for the fragment containing classes. The one with classes must
> have imports...just a guess.
>
> -> richard
>
> On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
>>
>> Pretty sure. If you want to check our the source from the link and run
>> mvn clean install you can build the same one I am building. I will go
>> ahead and attach it.
>> -AZ
>>
>>
>> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>
>>  wrote:
>>
>>>
>>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>>
>>>>
>>>> I have no imports or exports. Are you saying I need to upgrade sling
>>>> to a newer version of felix?
>>>>
>>>>
>>>
>>> No, it should work with 1.4.0 too.
>>>
>>> Seems odd, since Felix is complaining that your fragment bundle has
>>> imports
>>> or exports. Are you sure that's the complete manifest?
>>>
>>> ->  richard
>>>
>>>>
>>>> -AZ
>>>>
>>>>
>>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>>  wrote:
>>>>
>>>>
>>>>>
>>>>> You can have classes in fragments, but currently fragments cannot have
>>>>> imports or exports.
>>>>>
>>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>>> priority list although pushed down a little bit recently...
>>>>>
>>>>> ->    richard
>>>>>
>>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>>> Fragment source here:
>>>>>>
>>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>>
>>>>>> The manifest looks like this:
>>>>>> Manifest-Version: 1.0
>>>>>> Built-By: azeckoski
>>>>>> Created-By: Apache Maven Bundle Plugin
>>>>>> Bnd-LastModified: 1239812300139
>>>>>> Bundle-Version: 1.0
>>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>>> Bundle-Description: A bundle fragment for configuring Jetty in Pax-Web
>>>>>>   (requires version 0.5.2 or better to work)
>>>>>> Build-Jdk: 1.5.0_16
>>>>>> Private-Package: .
>>>>>> Bundle-ManifestVersion: 2
>>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>>> Tool: Bnd-0.0.311
>>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>>
>>>>>> However, the fragment does not seem to get deployed with just the xml
>>>>>> file. When I add in the classes needed for ajp to work in jetty then I
>>>>>> get a failure:
>>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>>> or native code are not currently supported.
>>>>>>        at
>>>>>>
>>>>>>
>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>>        at
>>>>>>
>>>>>>
>>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>>        at
>>>>>>
>>>>>>
>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>>        at
>>>>>>
>>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>>        at
>>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>>        at
>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>>        at
>>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>>        at
>>>>>>
>>>>>>
>>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>>        at
>>>>>>
>>>>>>
>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>>        at
>>>>>>
>>>>>>
>>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>>
>>>>>> So, the 2 questions are:
>>>>>> 1) When will classes be supported in fragments?
>>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>>
>>>>>> -AZ
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>>   ------------------------------------------------------------------------
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
I must be missing something. The bundle you attached installs fine into 
Felix for me:

-> ps
START LEVEL 1
    ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.7.0.SNAPSHOT)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.3.0.SNAPSHOT)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.3.0.SNAPSHOT)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.5.0.SNAPSHOT)
[   4] [Installed  ] [    1] PAX WEB Jetty Config Fragment - CARET (1.0)

I think you are looking at the manifest for the XML only fragment 
instead of the manifest for the fragment containing classes. The one 
with classes must have imports...just a guess.

-> richard

On 4/15/09 1:13 PM, Aaron Zeckoski wrote:
> Pretty sure. If you want to check our the source from the link and run
> mvn clean install you can build the same one I am building. I will go
> ahead and attach it.
> -AZ
>
>
> On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall<he...@ungoverned.org>  wrote:
>    
>> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>      
>>> I have no imports or exports. Are you saying I need to upgrade sling
>>> to a newer version of felix?
>>>
>>>        
>> No, it should work with 1.4.0 too.
>>
>> Seems odd, since Felix is complaining that your fragment bundle has imports
>> or exports. Are you sure that's the complete manifest?
>>
>> ->  richard
>>      
>>> -AZ
>>>
>>>
>>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>>   wrote:
>>>
>>>        
>>>> You can have classes in fragments, but currently fragments cannot have
>>>> imports or exports.
>>>>
>>>> Not sure on a timeframe, but they are definitely toward the top of my
>>>> priority list although pushed down a little bit recently...
>>>>
>>>> ->    richard
>>>>
>>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>>
>>>>          
>>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>>> Fragment source here:
>>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>>
>>>>> The manifest looks like this:
>>>>> Manifest-Version: 1.0
>>>>> Built-By: azeckoski
>>>>> Created-By: Apache Maven Bundle Plugin
>>>>> Bnd-LastModified: 1239812300139
>>>>> Bundle-Version: 1.0
>>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>>> Bundle-Description: A bundle fragment for configuring Jetty in Pax-Web
>>>>>    (requires version 0.5.2 or better to work)
>>>>> Build-Jdk: 1.5.0_16
>>>>> Private-Package: .
>>>>> Bundle-ManifestVersion: 2
>>>>> Fragment-Host: org.ops4j.pax.web.service
>>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>>> Tool: Bnd-0.0.311
>>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>>
>>>>> However, the fragment does not seem to get deployed with just the xml
>>>>> file. When I add in the classes needed for ajp to work in jetty then I
>>>>> get a failure:
>>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>>> or native code are not currently supported.
>>>>>         at
>>>>>
>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>>         at
>>>>>
>>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>>         at
>>>>>
>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>>         at
>>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>>         at
>>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>>         at
>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>>         at
>>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>>         at
>>>>>
>>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>>         at
>>>>>
>>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>>         at
>>>>>
>>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>>
>>>>> So, the 2 questions are:
>>>>> 1) When will classes be supported in fragments?
>>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>>
>>>>> -AZ
>>>>>
>>>>>
>>>>>
>>>>>            
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>>>>          
>>>
>>>
>>>        
>
>
>
>    
> ------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org

Re: Bundle fragments in Felix?

Posted by Aaron Zeckoski <aa...@vt.edu>.
Pretty sure. If you want to check our the source from the link and run
mvn clean install you can build the same one I am building. I will go
ahead and attach it.
-AZ


On Wed, Apr 15, 2009 at 6:11 PM, Richard S. Hall <he...@ungoverned.org> wrote:
> On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
>>
>> I have no imports or exports. Are you saying I need to upgrade sling
>> to a newer version of felix?
>>
>
> No, it should work with 1.4.0 too.
>
> Seems odd, since Felix is complaining that your fragment bundle has imports
> or exports. Are you sure that's the complete manifest?
>
> -> richard
>>
>> -AZ
>>
>>
>> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>
>>  wrote:
>>
>>>
>>> You can have classes in fragments, but currently fragments cannot have
>>> imports or exports.
>>>
>>> Not sure on a timeframe, but they are definitely toward the top of my
>>> priority list although pushed down a little bit recently...
>>>
>>> ->  richard
>>>
>>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>>
>>>>
>>>> I am trying to deploy a bundle fragment in Felix but having some
>>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>>> Fragment source here:
>>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>>
>>>> The manifest looks like this:
>>>> Manifest-Version: 1.0
>>>> Built-By: azeckoski
>>>> Created-By: Apache Maven Bundle Plugin
>>>> Bnd-LastModified: 1239812300139
>>>> Bundle-Version: 1.0
>>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>>> Bundle-Description: A bundle fragment for configuring Jetty in Pax-Web
>>>>   (requires version 0.5.2 or better to work)
>>>> Build-Jdk: 1.5.0_16
>>>> Private-Package: .
>>>> Bundle-ManifestVersion: 2
>>>> Fragment-Host: org.ops4j.pax.web.service
>>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>>> Tool: Bnd-0.0.311
>>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>>
>>>> However, the fragment does not seem to get deployed with just the xml
>>>> file. When I add in the classes needed for ajp to work in jetty then I
>>>> get a failure:
>>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>>> or native code are not currently supported.
>>>>        at
>>>>
>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>>        at
>>>>
>>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>>        at
>>>>
>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>>        at
>>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>>        at
>>>> org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>>        at
>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>>        at
>>>> org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>>        at
>>>>
>>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>>        at
>>>>
>>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>>        at
>>>>
>>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>>
>>>> So, the 2 questions are:
>>>> 1) When will classes be supported in fragments?
>>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>>
>>>> -AZ
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>
>>
>>
>>
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

Re: Bundle fragments in Felix?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 4/15/09 12:53 PM, Aaron Zeckoski wrote:
> I have no imports or exports. Are you saying I need to upgrade sling
> to a newer version of felix?
>    

No, it should work with 1.4.0 too.

Seems odd, since Felix is complaining that your fragment bundle has 
imports or exports. Are you sure that's the complete manifest?

-> richard
> -AZ
>
>
> On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall<he...@ungoverned.org>  wrote:
>    
>> You can have classes in fragments, but currently fragments cannot have
>> imports or exports.
>>
>> Not sure on a timeframe, but they are definitely toward the top of my
>> priority list although pushed down a little bit recently...
>>
>> ->  richard
>>
>> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>      
>>> I am trying to deploy a bundle fragment in Felix but having some
>>> issues. (using bundlerepository-1.4.0.jar in Sling)
>>> Fragment source here:
>>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>>
>>> The manifest looks like this:
>>> Manifest-Version: 1.0
>>> Built-By: azeckoski
>>> Created-By: Apache Maven Bundle Plugin
>>> Bnd-LastModified: 1239812300139
>>> Bundle-Version: 1.0
>>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>>> Bundle-Description: A bundle fragment for configuring Jetty in Pax-Web
>>>    (requires version 0.5.2 or better to work)
>>> Build-Jdk: 1.5.0_16
>>> Private-Package: .
>>> Bundle-ManifestVersion: 2
>>> Fragment-Host: org.ops4j.pax.web.service
>>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>>> Tool: Bnd-0.0.311
>>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>>
>>> However, the fragment does not seem to get deployed with just the xml
>>> file. When I add in the classes needed for ajp to work in jetty then I
>>> get a failure:
>>> org.osgi.framework.BundleException: Fragments with exports, imports,
>>> or native code are not currently supported.
>>>         at
>>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>>         at
>>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>>         at
>>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>>         at
>>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>>         at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>>         at org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>>         at org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>>         at
>>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>>         at
>>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>>         at
>>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>>
>>> So, the 2 questions are:
>>> 1) When will classes be supported in fragments?
>>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>>
>>> -AZ
>>>
>>>
>>>        
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>      
>
>
>
>    

Re: Bundle fragments in Felix?

Posted by Aaron Zeckoski <aa...@vt.edu>.
I have no imports or exports. Are you saying I need to upgrade sling
to a newer version of felix?
-AZ


On Wed, Apr 15, 2009 at 5:51 PM, Richard S. Hall <he...@ungoverned.org> wrote:
> You can have classes in fragments, but currently fragments cannot have
> imports or exports.
>
> Not sure on a timeframe, but they are definitely toward the top of my
> priority list although pushed down a little bit recently...
>
> -> richard
>
> On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
>>
>> I am trying to deploy a bundle fragment in Felix but having some
>> issues. (using bundlerepository-1.4.0.jar in Sling)
>> Fragment source here:
>> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>>
>> The manifest looks like this:
>> Manifest-Version: 1.0
>> Built-By: azeckoski
>> Created-By: Apache Maven Bundle Plugin
>> Bnd-LastModified: 1239812300139
>> Bundle-Version: 1.0
>> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
>> Bundle-Description: A bundle fragment for configuring Jetty in Pax-Web
>>   (requires version 0.5.2 or better to work)
>> Build-Jdk: 1.5.0_16
>> Private-Package: .
>> Bundle-ManifestVersion: 2
>> Fragment-Host: org.ops4j.pax.web.service
>> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
>> Tool: Bnd-0.0.311
>> Embed-Dependency: *;scope=compile|runtime;inline=true
>>
>> However, the fragment does not seem to get deployed with just the xml
>> file. When I add in the classes needed for ajp to work in jetty then I
>> get a failure:
>> org.osgi.framework.BundleException: Fragments with exports, imports,
>> or native code are not currently supported.
>>        at
>> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
>>        at
>> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
>>        at
>> org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
>>        at
>> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
>>        at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
>>        at org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
>>        at org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
>>        at
>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>>        at
>> org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
>>        at
>> org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>>
>> So, the 2 questions are:
>> 1) When will classes be supported in fragments?
>> 2) How would I just get the jetty.xml to deploy correctly in felix?
>>
>> -AZ
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle fragments in Felix?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
You can have classes in fragments, but currently fragments cannot have 
imports or exports.

Not sure on a timeframe, but they are definitely toward the top of my 
priority list although pushed down a little bit recently...

-> richard

On 4/15/09 12:41 PM, Aaron Zeckoski wrote:
> I am trying to deploy a bundle fragment in Felix but having some
> issues. (using bundlerepository-1.4.0.jar in Sling)
> Fragment source here:
> https://source.caret.cam.ac.uk/camtools/trunk/sling/sling-jetty-config/
>
> The manifest looks like this:
> Manifest-Version: 1.0
> Built-By: azeckoski
> Created-By: Apache Maven Bundle Plugin
> Bnd-LastModified: 1239812300139
> Bundle-Version: 1.0
> Bundle-Name: PAX WEB Jetty Config Fragment - CARET
> Bundle-Description: A bundle fragment for configuring Jetty in Pax-Web
>    (requires version 0.5.2 or better to work)
> Build-Jdk: 1.5.0_16
> Private-Package: .
> Bundle-ManifestVersion: 2
> Fragment-Host: org.ops4j.pax.web.service
> Bundle-SymbolicName: org.ops4j.pax.web.service.jetty-config
> Tool: Bnd-0.0.311
> Embed-Dependency: *;scope=compile|runtime;inline=true
>
> However, the fragment does not seem to get deployed with just the xml
> file. When I add in the classes needed for ajp to work in jetty then I
> get a failure:
> org.osgi.framework.BundleException: Fragments with exports, imports,
> or native code are not currently supported.
> 	at org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:291)
> 	at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:121)
> 	at org.apache.felix.framework.searchpolicy.ModuleImpl.<init>(ModuleImpl.java:155)
> 	at org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:965)
> 	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:79)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2123)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2026)
> 	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
> 	at org.apache.felix.webconsole.internal.core.InstallAction$1.doRun(InstallAction.java:258)
> 	at org.apache.felix.webconsole.internal.core.InstallAction$InstallHelper.run(InstallAction.java:338)
>
> So, the 2 questions are:
> 1) When will classes be supported in fragments?
> 2) How would I just get the jetty.xml to deploy correctly in felix?
>
> -AZ
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org