Salut,
Igor Minar wrote:
> no worries.
>
> I created the custom AsyncHandler, but now I seem to have issues with
> getting the classpath right for v3. There is always something! :)
>
> In GF2 it was enough to drop a jar into glassfish2/lib/. In GF3 I'm
> trying glassfish3/glassfish/domain/domain1/lib/applib or ext and I get
> [1] or [2] respectively.
>
> Do you have a recommendation?
ouf....v3 classloader are quite complicated :-( Can you ask the question
on dev_at_glassfish? As a workaround, if you add your class inside
glassfish.home/modules/grizzly-module.jar, does it work? You might have
to rename your class from com.igorminar.grizzly to com.sun.grizzly.
Sorry event if the property worked, I think all the classloading changes
in v3 brokes Grizzly extension point :-(
A+
-- Jeanfrancois
>
> thanks,
> Igor
>
>
> [1]
> java.lang.ClassNotFoundException:
> com.igorminar.grizzlysendfile.SendfileAsyncHandler
> at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
>
> at
> org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
>
> at
> org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:164)
> at
> com.sun.grizzly.http.SelectorThreadConfig.loadClassAndInstanciate(SelectorThreadConfig.java:324)
>
> at
> com.sun.grizzly.http.SelectorThreadConfig.configureProperties(SelectorThreadConfig.java:217)
>
> at
> com.sun.grizzly.http.SelectorThreadConfig.configure(SelectorThreadConfig.java:318)
>
> at
> com.sun.grizzly.http.SelectorThread.initEndpoint(SelectorThread.java:1059)
> at
> com.sun.enterprise.v3.services.impl.GrizzlyServiceListener.start(GrizzlyServiceListener.java:74)
>
> at
> com.sun.enterprise.v3.services.impl.GrizzlyProxy$1.run(GrizzlyProxy.java:222)
>
> Caused by: java.lang.ClassNotFoundException:
> com.igorminar.grizzlysendfile.SendfileAsyncHandler
> at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:486)
>
> at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)
>
> ... 12 more
>
> [2]
> [#|2008-10-28T11:41:09.232-0700|SEVERE|GlassFish10.0|javax.enterprise.system.core|_ThreadID=15;_ThreadName=Thread-3;|com/sun/grizzly/arp/DefaultAsyncHandler:com.igorminar.grizzlysendfile.SendfileAsyncHandler
>
> java.lang.NoClassDefFoundError: com/sun/grizzly/arp/DefaultAsyncHandler
> at java.lang.ClassLoader.defineClass2(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:774)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
> at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:436)
>
> at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)
>
> at
> org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
>
> at
> org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:164)
> at
> com.sun.grizzly.http.SelectorThreadConfig.loadClassAndInstanciate(SelectorThreadConfig.java:324)
>
> at
> com.sun.grizzly.http.SelectorThreadConfig.configureProperties(SelectorThreadConfig.java:217)
>
> at
> com.sun.grizzly.http.SelectorThreadConfig.configure(SelectorThreadConfig.java:318)
>
> at
> com.sun.grizzly.http.SelectorThread.initEndpoint(SelectorThread.java:1059)
> at
> com.sun.enterprise.v3.services.impl.GrizzlyServiceListener.start(GrizzlyServiceListener.java:74)
>
> at
> com.sun.enterprise.v3.services.impl.GrizzlyProxy$1.run(GrizzlyProxy.java:222)
>
>
>
>
>
>
> On Oct 28, 2008, at 10:26 AM, Jeanfrancois Arcand wrote:
>
>> Thanks and really sorry for the glitch. My fault.
>>
>> -- Jeanfrancois
>>
>> Igor Minar wrote:
>>> I submitted the bug
>>> https://grizzly.dev.java.net/issues/show_bug.cgi?id=289 and will try
>>> the workaround.
>>> Thanks,
>>> Igor
>>> On Oct 28, 2008, at 10:04 AM, Jeanfrancois Arcand wrote:
>>>> Salut,
>>>>
>>>> Igor Minar wrote:
>>>>> Hi there,
>>>>> I ported my ARP filter to glassfish v3, but I can't seem to
>>>>> configure glassfish v3 to use it.
>>>>> In v2 I used this config in domain.xml:
>>>>> <jvm-options>-Dcom.sun.enterprise.web.connector.grizzly.asyncHandlerClass=com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncHandler</jvm-options>
>>>>> <jvm-options>-Dcom.sun.enterprise.web.connector.grizzly.asyncHandler.ports=8080</jvm-options>
>>>>> <jvm-options>-Dcom.sun.enterprise.web.connector.grizzly.asyncFilters=com.igorminar.grizzlysendfile.SendfileFilter</jvm-options>
>>>>> in v3 I changed it to:
>>>>> <jvm-options>-Dcom.sun.grizzly.asyncHandlerClass=com.sun.grizzly.arp.DefaultAsyncHandler</jvm-options>
>>>>> <jvm-options>-Dcom.sun.grizzly.asyncHandler.ports=8080</jvm-options>
>>>>> <jvm-options>-Dcom.sun.grizzly.asyncFilters=com.igorminar.grizzlysendfile.SendfileFilter</jvm-options>
>>>>> But when I try to send any request to port 8080 it just times out
>>>>> after 30 seconds. I debugged my filter briefly, but it doesn't even
>>>>> look like the doFilter method is being called.
>>>>> Any idea what's wrong?
>>>>
>>>> Hum....looking at the code, the -Dcom.sun.grizzly.asyncFilters is no
>>>> longer working, hence it means the AsyncHandler cannot load your
>>>> AsyncFilter. Can you file a bug and I will fix it. The fix is very
>>>> simple, but for a reason I can't explain, the property support as
>>>> been removed (most probably my fault).
>>>>
>>>> A workaround for you is to extend the DefaultAsyncHandler and invoke
>>>> addAsyncFilter(new com.igorminar.grizzlysendfile.SendfileFilter);
>>>> inside the default constructor. Not an ideal solution, but will
>>>> works with the current v3 Prelude.
>>>>
>>>> Thanks
>>>>
>>>> -- Jeanfrancois
>>>>
>>>>
>>>>
>>>>> thanks,
>>>>> Igor
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>