users@glassfish.java.net

Re: Using optional packages in client

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Wed, 16 Apr 2008 09:05:18 -0500

Hi, Markus.

I should have been clearer in my earlier message.

The names in your JAR manifest's Extension-List must refer to the
extension names given in the manifests for the JARs that formally define
those extensions. (Look in the JavaDoc for the Manifest class and click
on the "Manifest format specification" link near the top for a much
better and more complete discussion than what follows here.)

Briefly, the manifest for a true extension JAR needs to include (for the
mythical extension named TimsExt):

Extension-Name: TimsExt

and then your JAR's manifest can include

Extension-List: TimsExt

to refer to that extension.

The JAR that defines the extension TimsExt could be named anything, such
as markus.jar. The name of the JAR is not necessarily related to the
name of the extension which the JAR might define.

The key point here, though, is that the manifest in JDIC's jdic.jar does
not seem to define JDIC as an extension at all. So your JAR's attempt
to refer to an extension that way will not work.

Or, putting it another way, when your manifest refers to the extension
names jdic.jar (and friends) GlassFish is essentially doing what any
class loader would do in processing your JAR - GlassFish tries to find a
JAR in the class path that has a manifest containing

Extension-Name: jdic.jar

and there is no JAR in the class path that does that. Even if jdic.jar
is on the class path (by virtue of being in the Java SE extension
directory) there is still the missing piece of the Extension-Name:
definition that is absent in the jdic.jar's manifest.

(I do not think there is a restriction prohibiting dots from extension
names but I'm not absolutely positive about that. I'm just following
through with your example.)

Does this make sense?

- Tim

Markus KARG wrote:
> Tim,
>
> thank you for your answer. In fact, I do not use
> "jdic.jar-Extension-Name" anywhere. Here is the sole Extension-List
> entry:
>
> Extension-List: jmf.jar jdic.jar jdic_stub.jar
>
> So the string "jdic.jar-Extension-Name" seems to be generated
> internally in GlassFish.
>
> As soon as you can commit that it really is a bug I will file an issue
> in the tracker, but I first want to be sure that it isn't my personal
> fault.
>
> Thanks
> Markus
>
> glassfish_at_javadesktop.org schrieb:
>> [I sent the following e-mail reply to the mailing list yesterday.]
>>
>> Hello, Markus.
>>
>> The flagged line from the stack trace is trying to get the manifest
>> attribute value jdic.jar-Extension-Name from a manifest. I suspect
>> what you really want there is jdic-Extension-Name (no .jar suffix).
>> There could be other similar problems, either for other attributes
>> (such as version) for jdic or for other packages.
>>
>> Could you please check your manifest and make sure the attributes are
>> as you want them?
>>
>> As an aside, the GlassFish error handling for this sort of problem
>> could use some improvement. Could I interest you in opening an issue?
>>
>> - Tim
>> [Message sent by forum member 'tjquinn' (tjquinn)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=269456
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>