You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alberto SOUZA <al...@gmail.com> on 2013/08/01 20:33:00 UTC

javaagent is messing with webapp classpath

Hi,

I have a javaagent that changes some specific classes of my project. But,
when i start the server using the agent I get a lot of
ClassNotFoundException for a  lot of classes... Like
ServletContextListener. When I don't use the javaagent argument everything
goes fine. Does anyone have an idea?

Thanks!!

Re: javaagent is messing with webapp classpath

Posted by Alberto SOUZA <al...@gmail.com>.
Hi again, the problem is that my agent is generated with same classes that
are used inside my webapp. My guess is that tomcat is getting lost with the
classloader...


On Thu, Aug 1, 2013 at 7:53 PM, Alberto SOUZA <al...@gmail.com> wrote:

> I see... even if i leave my agent empty? Because i did this test and, just
> with the presence of agent, tomcat got lost. And the same agent works fine
> in GlassFish(3 and 4) and Jboss(7 and 8). Right now, for some reason, my
> impression is that the agent is requesting that every class used for my
> application should  be in agent jar. For example, if i have a
> ServletContextListener, tomcat is forcing the agent to have the jar bundled
> in the agent's jar.
>
> regards
>
>
>
> On Thu, Aug 1, 2013 at 7:05 PM, Leon Rosenberg <ro...@gmail.com>wrote:
>
>> Hello,
>>
>> yes, your java agent is probably not well coded :-)
>>
>> regards
>> Leon
>>
>>
>> On Thu, Aug 1, 2013 at 8:33 PM, Alberto SOUZA <al...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > I have a javaagent that changes some specific classes of my project.
>> But,
>> > when i start the server using the agent I get a lot of
>> > ClassNotFoundException for a  lot of classes... Like
>> > ServletContextListener. When I don't use the javaagent argument
>> everything
>> > goes fine. Does anyone have an idea?
>> >
>> > Thanks!!
>> >
>>
>
>

Re: javaagent is messing with webapp classpath

Posted by Alberto SOUZA <al...@gmail.com>.
I see... even if i leave my agent empty? Because i did this test and, just
with the presence of agent, tomcat got lost. And the same agent works fine
in GlassFish(3 and 4) and Jboss(7 and 8). Right now, for some reason, my
impression is that the agent is requesting that every class used for my
application should  be in agent jar. For example, if i have a
ServletContextListener, tomcat is forcing the agent to have the jar bundled
in the agent's jar.

regards


On Thu, Aug 1, 2013 at 7:05 PM, Leon Rosenberg <ro...@gmail.com>wrote:

> Hello,
>
> yes, your java agent is probably not well coded :-)
>
> regards
> Leon
>
>
> On Thu, Aug 1, 2013 at 8:33 PM, Alberto SOUZA <al...@gmail.com> wrote:
>
> > Hi,
> >
> > I have a javaagent that changes some specific classes of my project. But,
> > when i start the server using the agent I get a lot of
> > ClassNotFoundException for a  lot of classes... Like
> > ServletContextListener. When I don't use the javaagent argument
> everything
> > goes fine. Does anyone have an idea?
> >
> > Thanks!!
> >
>

Re: javaagent is messing with webapp classpath

Posted by Leon Rosenberg <ro...@gmail.com>.
Hello,

yes, your java agent is probably not well coded :-)

regards
Leon


On Thu, Aug 1, 2013 at 8:33 PM, Alberto SOUZA <al...@gmail.com> wrote:

> Hi,
>
> I have a javaagent that changes some specific classes of my project. But,
> when i start the server using the agent I get a lot of
> ClassNotFoundException for a  lot of classes... Like
> ServletContextListener. When I don't use the javaagent argument everything
> goes fine. Does anyone have an idea?
>
> Thanks!!
>