dev@glassfish.java.net

Re: Export-Package and the mandatory-directive

From: Sheetal Vartak <sheetal.vartak_at_oracle.com>
Date: Tue, 26 Oct 2010 13:00:59 -0700

Hi Richard,

Thanks for your reply.

Yes StateHolderSaver is a class. Even if I specify com.sun.faces.application.view.*, I see the same issue.

One thing to note is that :
jsf-api.jar has only 1 class i.e. StateHolderSaver that belongs to the package com.sun.faces.application.view. Whereas the jsf-impl.jar also has the same package with a lot more classes but it needs to import com.sun.faces.application.view.StateHolderSaver from jsf-api.jar.

Now, the weld-integration.jar (from the GF module) imports com.sun.faces.api package. Yet it complains. That's what is confusing to me.

Sheetal

On Oct 26, 2010, at 12:43 PM, Richard S. Hall wrote:

>
>
> On 10/26/10 13:57, Sheetal Vartak wrote:
>> Hi,
>>
>> I am trying to add the following constraint in the jsf-api.jar :
>>
>> Export-Package: javax.faces.*;version=2.0,\
>> com.sun.faces.application.view.StateHolderSaver;version=2.0;password="com.sun.faces.application.view";mandatory:=password
>
> Maybe the issue is more simple. Is StateHolderSaver a class or a package? You can't export classes.
>
> -> richard
>
>>
>> My jsf-impl.jar has the following :
>>
>> Import-Package:
>> ......
>> com.sun.faces.application.view.StateHolderSaver;version=2.0;password="com.sun.faces.application.view", \
>> ......
>>
>> Now when I drop these 2 jars in the v3.1 workspace and try to start the server, I see the following error message in server.log :
>>
>> [#|2010-10-25T16:12:04.901-0700|SEVERE|glassfish3.1|null|_ThreadID=16;_ThreadName=Thread-1;|Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.web.weld-integration [20]: Unable to resolve 20.0: missing requirement [20.0] package; (&(package=com.sun.faces.spi)(version>=2.0.0)) [caused by: Unable to resolve 50.0: missing requirement [50.0] package; (&(package=com.sun.faces.application.view.StateHolderSaver)(password=com.sun.faces.application.view)(version>=2.0.0))]|#]
>>
>> I checked the Manifest.MF of weld-integration.jar. It has an Import-Package attr specifying "com.sun.faces.spi" as one of them. As you can see above, the mandatory-directive is only for com.sun.faces.application.view.StateHolderSaver. Then what am I missing here?
>>
>> Does weld-integration.jar's Manifest.MF somehow need the mandatory-directive to be specified? And why?
>>
>> Thanks
>> Sheetal
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>