Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] java.lang.ClassNotFoundException: org.eclipse.jetty.servlets.ProxyServlet$Transparent

you can set the webapp context to expose more of those classes, but
then your war is locked into using jetty, which is not necessarily a
bad thing...just that portable war files are better policy in general

jesse

--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx


On Sun, Jun 17, 2012 at 12:59 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
> The WebAppContext specifies rules on what you can and cannot see from the
> Server Classloader.
>
> Here's the default set of rules (as found in our source control master. aka
> jetty-7)
> http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java#n92
>
> --
> Joakim Erdfelt <joakim@xxxxxxxxxxx>
> www.webtide.com
> Developer advice, services and support
> from the Jetty & CometD experts.
>
>
>
> On Sun, Jun 17, 2012 at 10:38 AM, ccleve <ccleve.tech@xxxxxxxxx> wrote:
>>
>> Oddly, my webapp is able to see classes like HttpServletRequest, which
>> exists only in /lib. It can also see a bunch of my custom classes in
>> /lib/mysubdirectory. What makes ProxyServlet.Transparent different?
>>
>> Is there any way to have the webapp classloader see all the classes in
>> /lib?
>>
>>
>>
>>
>> On 6/17/2012 11:35 AM, Jesse McConnell wrote:
>>>
>>> you should put it _in_ your war
>>>
>>> webapps execute in an isolated classloader separate from the things in
>>> /lib
>>>
>>> jesse
>>>
>>> --
>>> jesse mcconnell
>>> jesse.mcconnell@xxxxxxxxx
>>>
>>>
>>> On Sun, Jun 17, 2012 at 11:25 AM, ccleve <ccleve.tech@xxxxxxxxx> wrote:
>>>>
>>>> I've subclassed ProxyServlet.Transparent for our own proxy server. It
>>>> runs
>>>> fine in Eclipse. When I start the server at the command line using
>>>> start.jar, I get the ClassNotFoundException in the title.
>>>>
>>>> My subclass is in a jar that I put in /lib/mysubdirectory, and I added
>>>> that
>>>> subdirectory in start.ini with OPTIONS=Server,....,mysubdirectory
>>>>
>>>> It looks like ProxyServer.Transparent is in jetty-servlets.x.x.x.jar,
>>>> which
>>>> is in the /lib directory. If I'm reading the code in start.config in
>>>> start.jar correctly, it should get picked up and put on the classpath
>>>> properly.
>>>>
>>>> I'm loading my proxy subclass in web.xml using a <servlet> tag.
>>>>
>>>> Is start.jar doing some funny classloader stuff that keeps that class
>>>> invisible? How can I make it visible?
>>>>
>>>> _______________________________________________
>>>> jetty-users mailing list
>>>> jetty-users@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>>
>>
>>
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>


Back to the top