dev@glassfish.java.net

Re: lib/addons - PHP configuration

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Wed, 22 Aug 2007 15:00:38 -0700

Hi Siva,

Your blog is exactly what I needed.

> >>> Has the class loading behavior for lib/addons changed since Mar 2007 ?
>
> There has been some changes related to addons uninstallation but this
> shouldn't affect the earlier addons loading semantics
In that case, any idea why copying the JARs in lib/addons gives a
ClassNotFoundException for the servlet mentioned in web.xml ?

Where as copying to the lib works.

-Arun

>
> >>> What is the recommended directory to copy any JAR files accessible to
> >>> *all* the deployed applications ?
>
> I hope the response in the FAQ above helps. In short, for a JAR to be
> available to all the apps in the domain, place in domains/domain1/lib or
> use classpath-suffix. The former is loaded by the common classloader and
> hence available to all applications whereas the latter is loaded at a
> classloader higher up in the hierarchy [the shared classloader] and
> hence available to everyone including AS implementation classes.
>
> > I see there is a lib\applibs directory.
>
> applibs are for application specific classloading. More details are
> available off
> https://glassfish.dev.java.net/nonav/javaee5/docs/DG/beade.html#gatej
>
>
> Thanks
> --Siva.
>
>
>
> Arun Gupta wrote:
>> Hi Alexis,
>>
>> Thanks for the pointer. I saw those instructions but would like to
>> setup PHP in a default GlassFish instance instead of creating a new
>> instance. If I just copy the jar files to domains\domain1\lib
>> directory (without creating a new instance), that works too!
>>
>> But I was wondering if that is the recommended practice ?
>>
>> I see there is a lib\applibs directory. Keeping Quercus JARs there
>> does not help though.
>>
>> -Arun
>>
>> Alexis Moussine-Pouchkine wrote:
>>> It's working fine for me with RC1 (build 58) and these instructions:
>>> http://blogs.sun.com/alexismp/entry/php_in_glassfish_first_steps
>>> which add PHP capabilities to a given (new) domain using the domain/lib
>>> directory. This is how I had it running back in March too.
>>> -Alexis
>>>
>>> Arun Gupta wrote:
>>>> Ludo posted instructions (Mar 2007) on how to configure Caucho PHP
>>>> in GlassFish at:
>>>>
>>>> http://weblogs.java.net/blog/ludo/archive/2007/03/100_java_quercu.html
>>>>
>>>> These instructions require to copy the JAR files in lib/addons
>>>> directory. But when I follow the same then the CauchoServlet class
>>>> is not found. Instead, if I copy PHP jars in lib directory then it
>>>> works.
>>>>
>>>> Has the class loading behavior for lib/addons changed since Mar 2007 ?
>>>>
>>>> What is the recommended directory to copy any JAR files accessible
>>>> to *all* the deployed applications ?
>>>>
>>>> -Arun
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

-- 
Web Technologies and Standards
Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta