The missing "." seems to have been my problem.  Thanks for pointing that out!

My current Bundle-ClassPath is more like the following now:

Bundle-ClassPath: ., WEB-INF/classes, [iterated list of all jars in 
WEB-INF/lib/]

The bit about including all the xml files was a desperate attempt to try to get 
the files to be seen.


----- Original Message -----
From: "Richard S. Hall" <[email protected]>
To: [email protected]
Sent: Thursday, October 15, 2009 3:59:38 PM GMT -05:00 US/Canada Eastern
Subject: Re: Bundle.findEntries(..) and Bundle.getResource(..)

On 10/15/09 15:55, [email protected] wrote:
> I've tried a couple of different settings to the same result.  The general 
> layout is below and the full version is available at github [1].
>
> Bundle-ClassPath: [iterated list of all jars in WEB-INF/lib/], 
> WEB-INF/classes, [iterated list of all xml files in WEB-INF/]
>
> [1] 
> http://github.com/thecarlhall/open-experiments/blob/activemq-webconsole/slingtests/osgikernel/bundles/activemq-webconsole/pom.xml
>    

Well, you need to have "." if you expect to find stuff in the bundle JAR 
file itself.

BTW, is that last entry correct for the class path (i.e., list of all 
XML files)? The bundle class path should not contain resources, just 
".", JAR files, or directories.

-> richard

>
> ----- Original Message -----
> From: "Richard S. Hall"<[email protected]>
> To: [email protected]
> Sent: Thursday, October 15, 2009 3:39:34 PM GMT -05:00 US/Canada Eastern
> Subject: Re: Bundle.findEntries(..) and Bundle.getResource(..)
>
> What are you setting your Bundle-ClassPath to for this bundle?
>
> ->  richard
>
> On 10/15/09 12:22, Carl F. Hall wrote:
>    
>> I have a WAR file that is being deployed as an OSGi bundle.  Namely, I'm 
>> wrapping the ActiveMQ web console WAR to be deployed as part of my build.  
>> The bundle installs and I can walk through the activator until sitemesh 
>> tries to find /WEB-INF/decorators.xml which it can't.  I've tried a few 
>> things and have discovered the following:
>>
>> // these were tested in the activator
>> bundle.getResource("/WEB-INF/decorators.xml");   // returns null; this is 
>> what sitemesh looks for.
>> bundle.getResource("/decorators.xml");  // returns proper URL 
>> (bundle://110.0:1/decorators.xml)
>> bundle.findEntries("WEB-INF", "decorators.xml", false);   // iterating the 
>> enumeration shows "bundle://110.0:0/WEB-INF/decorators.xml"
>>
>> Is there a way to get resources in /WEB-INF of the WAR to be retrievable 
>> through getResource(..) at their /WEB-INF/<file>   address?  I can't modify 
>> the sitemesh code, so I'd like to map the resources or discover what I'm 
>> doing wrong.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>      
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to