IllegalAccessException for listener

View: New views
3 Messages — Rating Filter:   Alert me  

IllegalAccessException for listener

by Fu-Tung Cheng :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am using tc 6.0.16 with jdk 1.6.0.

I get the following error on startup:

java.lang.IllegalAccessException:
Class org.apache.catalina.core.StandardContext
can not access a member of class
com.mycom.Myclass
with modifiers "private"

web.xml:

<listener>
<listener-class>com.mycom.Myclass</listener-class>
</listener>

where Myclass is located inside my war in WEB-INF/class/com/mycom

Any help?

Thanks,

Fu-Tung


     


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: IllegalAccessException for listener

by Deepak Mishra-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i think, this error is self-expalnatory. you have a problem in the code  
itself,try changing the private modifier to public...or either post your  
program. can you run this program independently (that is, out of server  
root) ?



On Tue, 22 Jul 2008 11:55:01 +0530, Fu-Tung Cheng <futung.cheng@...>  
wrote:

> Hi,
>
> I am using tc 6.0.16 with jdk 1.6.0.
>
> I get the following error on startup:
>
> java.lang.IllegalAccessException:
> Class org.apache.catalina.core.StandardContext
> can not access a member of class
> com.mycom.Myclass
> with modifiers "private"
>
> web.xml:
>
> <listener>
> <listener-class>com.mycom.Myclass</listener-class>
> </listener>
>
> where Myclass is located inside my war in WEB-INF/class/com/mycom
>
> Any help?
>
> Thanks,
>
> Fu-Tung
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: IllegalAccessException for listener

by Fu-Tung Cheng :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I found the issue.  Listeners must implement a public zero argument constructor.  

Fu-Tung

--- On Tue, 7/22/08, Deepak Mishra <dpux4linux@...> wrote:

> From: Deepak Mishra <dpux4linux@...>
> Subject: Re: IllegalAccessException for listener
> To: "Tomcat Users List" <users@...>
> Date: Tuesday, July 22, 2008, 9:17 AM
> i think, this error is self-expalnatory. you have a problem
> in the code  
> itself,try changing the private modifier to public...or
> either post your  
> program. can you run this program independently (that is,
> out of server  
> root) ?


     


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...