Re: IllegalAccessError when run from Tomcat

2002-04-18 Thread Peter Davison

Has anyone found a solution for this problem yet?

I've scanned the news groups, search the web all to no avail.
This error happens in my servlet when I used JTidy to parse an uploaded file.

Any help would be greatly appreciated.

Thanks.
Pete.

On Fri, 15 Jun 2001 11:20:22 -0400
[EMAIL PROTECTED] wrote:

> When running a servlet from within Tomcat I get the following exception:
> 
> java.lang.IllegalAccessError: try to access field
> org.w3c.tidy.ParserImpl._parseHead from class
> org.w3c.tidy.ParserImpl$ParseHTML at
> org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java) at
> org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java) at
> org.w3c.tidy.Tidy.parse(Tidy.java) at
> org.w3c.tidy.Tidy.parseDOM(Tidy.java)...
> 
> A method in the inner class $ParseHTML is trying to access a private field
> _parseHead in the containing class, but that is legal as far as I know.
> When I move the body of this servlet to a stand alone application it runs
> fine - no exceptions.  Is there some strange JVM security manager here that
> is different from running as a real application?  Anyone have an idea what
> is going on?


--
Peter Davison
[EMAIL PROTECTED]

Mary Tyler Moore's SEVENTH HUSBAND is wearing my DACRON TANK TOP in a
cheap hotel in HONOLULU!

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: IllegalAccessError when run from Tomcat

2001-06-18 Thread sappling

After further investigation this seems to be something specific to the
4.0b5 version of Tomcat.  It does not occur in 3.3 milestone 3 or 3.2.  I
think this may indicate a  classloader problem.  I will investigate further
and post something to the bug database.  Thanks for your suggestions.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 11:20 AM
Subject: IllegalAccessError when run from Tomcat


> When running a servlet from within Tomcat I get the following exception:
>
> java.lang.IllegalAccessError: try to access field
org.w3c.tidy.ParserImpl._parseHead from class
org.w3c.tidy.ParserImpl$ParseHTML
>  at org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
>  at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
>  at org.w3c.tidy.Tidy.parse(Tidy.java)
>  at org.w3c.tidy.Tidy.parseDOM(Tidy.java)
> ...
>
> A method in the inner class $ParseHTML is trying to access a private field
> _parseHead in the containing class, but that is legal as far as I know.
> When I move the body of this servlet to a stand alone application it runs
> fine - no exceptions.  Is there some strange JVM security manager here
that
> is different from running as a real application?  Anyone have an idea what
> is going on?
>




Re: IllegalAccessError when run from Tomcat

2001-06-15 Thread Luba Powell

This is a good suggestion. However,  I have been working with Jini for
awhile where classes: inner and otherwise are being shipped, deserialized
and loaded cross the world, but didn't run into this one.  Although
MarshalledObject wrapper
protects classes from being misinterpreted in my case.

We'll keep digging.

- Original Message -
From: "Robert Schweng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 4:42 PM
Subject: Re: IllegalAccessError when run from Tomcat


> hi,
> could it be, it is in reason that classes over the web are interpreted
> as URIs.
> many systems could cause trouble when
> interpreting a dir path like com.class.class$innerclass
> to com/class/class?innerclass in Linux
> or on NT to com\class\class?innerclass
>
>
> cheers
> Robert
>
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 15, 2001 10:19 PM
> Subject: Re: IllegalAccessError when run from Tomcat
>
>
> > Good idea, I didn't realize System.getSecurityManager existed.  It is
> > returning null, so there is no SecurityManager established and that
isn't
> > my problem.  Anyone have other ideas?  I'm pretty sure this is legal, it
> > works when not run under Tomcat, and it is 3'rd party code I'm running
so
> I
> > don't want to pull out the inner class.  This is happening in JTidy.
> JTidy
> > isn't used anywhere else in Tomcat is it (in one of the standard jars)?
> Do
> > I have some wierd conflict between different versions of classes with
the
> > same name?  I searched, but didn't find anything like that.  Thanks for
> the
> > ideas so far - I would love some other suggestions on what to try?
> >
> > >Put:
> > >System.out.println(System.getSecurityManager()) into your program.
> > >Let us know what it says.
> > >
> > >- Original Message -
> > >From: <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >Sent: Friday, June 15, 2001 11:20 AM
> > >Subject: IllegalAccessError when run from Tomcat
> > >
> > >
> > >> When running a servlet from within Tomcat I get the following
> exception:
> > >>
> > >> java.lang.IllegalAccessError: try to access field
> > >org.w3c.tidy.ParserImpl._parseHead from class
> > >org.w3c.tidy.ParserImpl$ParseHTML
> > >>  at org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
> > >>  at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
> > >>  at org.w3c.tidy.Tidy.parse(Tidy.java)
> > >>  at org.w3c.tidy.Tidy.parseDOM(Tidy.java)
> > >> ...
> > >>
> > >> A method in the inner class $ParseHTML is trying to access a private
> field
> > >> _parseHead in the containing class, but that is legal as far as I
know.
> > >> When I move the body of this servlet to a stand alone application it
> runs
> > >> fine - no exceptions.  Is there some strange JVM security manager
here
> that
> > >> is different from running as a real application?  Anyone have an idea
> what
> > >> is going on?
> > >>
> >
> >
>




Re: IllegalAccessError when run from Tomcat

2001-06-15 Thread Robert Schweng

hi,
could it be, it is in reason that classes over the web are interpreted
as URIs.
many systems could cause trouble when
interpreting a dir path like com.class.class$innerclass
to com/class/class?innerclass in Linux
or on NT to com\class\class?innerclass


cheers
Robert


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 10:19 PM
Subject: Re: IllegalAccessError when run from Tomcat


> Good idea, I didn't realize System.getSecurityManager existed.  It is
> returning null, so there is no SecurityManager established and that isn't
> my problem.  Anyone have other ideas?  I'm pretty sure this is legal, it
> works when not run under Tomcat, and it is 3'rd party code I'm running so
I
> don't want to pull out the inner class.  This is happening in JTidy.
JTidy
> isn't used anywhere else in Tomcat is it (in one of the standard jars)?
Do
> I have some wierd conflict between different versions of classes with the
> same name?  I searched, but didn't find anything like that.  Thanks for
the
> ideas so far - I would love some other suggestions on what to try?
>
> >Put:
> >System.out.println(System.getSecurityManager()) into your program.
> >Let us know what it says.
> >
> >- Original Message -----
> >From: <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Friday, June 15, 2001 11:20 AM
> >Subject: IllegalAccessError when run from Tomcat
> >
> >
> >> When running a servlet from within Tomcat I get the following
exception:
> >>
> >> java.lang.IllegalAccessError: try to access field
> >org.w3c.tidy.ParserImpl._parseHead from class
> >org.w3c.tidy.ParserImpl$ParseHTML
> >>  at org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
> >>  at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
> >>  at org.w3c.tidy.Tidy.parse(Tidy.java)
> >>  at org.w3c.tidy.Tidy.parseDOM(Tidy.java)
> >> ...
> >>
> >> A method in the inner class $ParseHTML is trying to access a private
field
> >> _parseHead in the containing class, but that is legal as far as I know.
> >> When I move the body of this servlet to a stand alone application it
runs
> >> fine - no exceptions.  Is there some strange JVM security manager here
that
> >> is different from running as a real application?  Anyone have an idea
what
> >> is going on?
> >>
>
>




Re: IllegalAccessError when run from Tomcat

2001-06-15 Thread Luba Powell

 <>

It seems that way. This is linkage error, meaning, it went thru compiler
fine, but at run time the field definition changed.

R/Luba

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 4:19 PM
Subject: Re: IllegalAccessError when run from Tomcat


> Good idea, I didn't realize System.getSecurityManager existed.  It is
> returning null, so there is no SecurityManager established and that isn't
> my problem.  Anyone have other ideas?  I'm pretty sure this is legal, it
> works when not run under Tomcat, and it is 3'rd party code I'm running so
I
> don't want to pull out the inner class.  This is happening in JTidy.
JTidy
> isn't used anywhere else in Tomcat is it (in one of the standard jars)?
Do
> I have some wierd conflict between different versions of classes with the
> same name?  I searched, but didn't find anything like that.  Thanks for
the
> ideas so far - I would love some other suggestions on what to try?
>
> >Put:
> >System.out.println(System.getSecurityManager()) into your program.
> >Let us know what it says.
> >
> >- Original Message -
> >From: <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Friday, June 15, 2001 11:20 AM
> >Subject: IllegalAccessError when run from Tomcat
> >
> >
> >> When running a servlet from within Tomcat I get the following
exception:
> >>
> >> java.lang.IllegalAccessError: try to access field
> >org.w3c.tidy.ParserImpl._parseHead from class
> >org.w3c.tidy.ParserImpl$ParseHTML
> >>  at org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
> >>  at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
> >>  at org.w3c.tidy.Tidy.parse(Tidy.java)
> >>  at org.w3c.tidy.Tidy.parseDOM(Tidy.java)
> >> ...
> >>
> >> A method in the inner class $ParseHTML is trying to access a private
field
> >> _parseHead in the containing class, but that is legal as far as I know.
> >> When I move the body of this servlet to a stand alone application it
runs
> >> fine - no exceptions.  Is there some strange JVM security manager here
that
> >> is different from running as a real application?  Anyone have an idea
what
> >> is going on?
> >>
>
>




Re: IllegalAccessError when run from Tomcat

2001-06-15 Thread sappling

Good idea, I didn't realize System.getSecurityManager existed.  It is
returning null, so there is no SecurityManager established and that isn't
my problem.  Anyone have other ideas?  I'm pretty sure this is legal, it
works when not run under Tomcat, and it is 3'rd party code I'm running so I
don't want to pull out the inner class.  This is happening in JTidy.  JTidy
isn't used anywhere else in Tomcat is it (in one of the standard jars)?  Do
I have some wierd conflict between different versions of classes with the
same name?  I searched, but didn't find anything like that.  Thanks for the
ideas so far - I would love some other suggestions on what to try?

>Put:
>System.out.println(System.getSecurityManager()) into your program.
>Let us know what it says.
>
>- Original Message -
>From: <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, June 15, 2001 11:20 AM
>Subject: IllegalAccessError when run from Tomcat
>
>
>> When running a servlet from within Tomcat I get the following exception:
>>
>> java.lang.IllegalAccessError: try to access field
>org.w3c.tidy.ParserImpl._parseHead from class
>org.w3c.tidy.ParserImpl$ParseHTML
>>  at org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
>>  at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
>>  at org.w3c.tidy.Tidy.parse(Tidy.java)
>>  at org.w3c.tidy.Tidy.parseDOM(Tidy.java)
>> ...
>>
>> A method in the inner class $ParseHTML is trying to access a private field
>> _parseHead in the containing class, but that is legal as far as I know.
>> When I move the body of this servlet to a stand alone application it runs
>> fine - no exceptions.  Is there some strange JVM security manager here that
>> is different from running as a real application?  Anyone have an idea what
>> is going on?
>>





Re: IllegalAccessError when run from Tomcat

2001-06-15 Thread Robert Schweng

i am not perfectly sure, but as far as i know
are inner classes  in beans not allowed!!.
so i could imagine this is also a fact for
servlets.
but dont ask me why.
anyway would it be worth to try cause its pretty simple to make
the inner classe outer classes.

cheers
hype



- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 5:20 PM
Subject: IllegalAccessError when run from Tomcat


> When running a servlet from within Tomcat I get the following exception:
>
> java.lang.IllegalAccessError: try to access field
org.w3c.tidy.ParserImpl._parseHead from class
org.w3c.tidy.ParserImpl$ParseHTML
>  at org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
>  at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
>  at org.w3c.tidy.Tidy.parse(Tidy.java)
>  at org.w3c.tidy.Tidy.parseDOM(Tidy.java)
> ...
>
> A method in the inner class $ParseHTML is trying to access a private field
> _parseHead in the containing class, but that is legal as far as I know.
> When I move the body of this servlet to a stand alone application it runs
> fine - no exceptions.  Is there some strange JVM security manager here
that
> is different from running as a real application?  Anyone have an idea what
> is going on?
>




Re: IllegalAccessError when run from Tomcat

2001-06-15 Thread Luba Powell

Put:
System.out.println(System.getSecurityManager()) into your program.
Let us know what it says.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 11:20 AM
Subject: IllegalAccessError when run from Tomcat


> When running a servlet from within Tomcat I get the following exception:
>
> java.lang.IllegalAccessError: try to access field
org.w3c.tidy.ParserImpl._parseHead from class
org.w3c.tidy.ParserImpl$ParseHTML
>  at org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
>  at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
>  at org.w3c.tidy.Tidy.parse(Tidy.java)
>  at org.w3c.tidy.Tidy.parseDOM(Tidy.java)
> ...
>
> A method in the inner class $ParseHTML is trying to access a private field
> _parseHead in the containing class, but that is legal as far as I know.
> When I move the body of this servlet to a stand alone application it runs
> fine - no exceptions.  Is there some strange JVM security manager here
that
> is different from running as a real application?  Anyone have an idea what
> is going on?
>




IllegalAccessError when run from Tomcat

2001-06-15 Thread sappling

When running a servlet from within Tomcat I get the following exception:

java.lang.IllegalAccessError: try to access field org.w3c.tidy.ParserImpl._parseHead 
from class org.w3c.tidy.ParserImpl$ParseHTML
 at org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java)
 at org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java)
 at org.w3c.tidy.Tidy.parse(Tidy.java)
 at org.w3c.tidy.Tidy.parseDOM(Tidy.java)
...

A method in the inner class $ParseHTML is trying to access a private field
_parseHead in the containing class, but that is legal as far as I know.
When I move the body of this servlet to a stand alone application it runs
fine - no exceptions.  Is there some strange JVM security manager here that
is different from running as a real application?  Anyone have an idea what
is going on?