Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] classloading problems with custom authenticator

Bill,

I assume you're setting up the custom authenticator in a context xml
file, in which case the classloader in play is NOT the webapp
classloader, as that is initialized after the application of the
context xml file. So it wouldn't work anyway to include your custom
class inside the webapp - it would have to be external to the webapp.
So you're correct that you can drop your custom authenticator jar into
lib/ext, or better yet make a module which is the best way to promote
reuse.

cheers
Jan

On 8 November 2014 09:17, Bill Burke <bburke@xxxxxxxxxx> wrote:
> Looks like the only way is to add my classes to lib/ext or create a module.
>
>
> On 11/7/2014 4:07 PM, Bill Burke wrote:
>>
>> I'm writing my own custom org.eclipse.jetty.security.Authenticator for
>> Jetty 9.2.x.  Works great when embedding Jetty, but I can't get it to
>> work with a WAR deployed within Jetty server.  I keep getting
>> ClassNotFoundException for jetty system classes like:
>>
>> import org.eclipse.jetty.server.HttpChannel;
>> import org.eclipse.jetty.server.Request;
>> import org.eclipse.jetty.server.UserIdentity;
>>
>> I tried setServerClasses "-org.eclipse.jetty.server.", really most
>> combinations here, with no go.  I'm guessing if I include
>> jetty-server.jar I'll then get Class cast exceptions and Linkage errors.
>>   Is there a way around this?
>>
>> Thanks,
>>
>> Bill
>>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users



-- 
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'


Back to the top