You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Rosenberg <jr...@tabbysplace.org> on 2012/11/02 19:36:27 UTC

Confused: IllegalStateException

Basics: Apache Tomcat/7.0.22 	1.6.0_22-b04

I have a Grails app that I'm deploying to this Tomcat.  During the
deployment, I see the following in catalina.out:

Nov 2, 2012 2:25:18 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive Catalog##0025.war
log4j:WARN No appenders could be found for logger (net.bull.javamelody).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
for more info.
Nov 2, 2012 2:25:41 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped
already.  Could not load com.mysql.jdbc.SQLError.  The eventual
following stack trace is caused by an error thrown for debugging
purposes as well as to attempt to terminate the thread which caused
the illegal access, and has no functional impact.
java.lang.IllegalStateException
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1564)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3352)
        at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1696)
        at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4368)
        at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1361)
        at com.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2729)
        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
        at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

After this, the app seems to continue loading normally.  I have tried
this on 2 Linux boxes (same Tomcat & JVM).  I see this on both, but on
one of the boxes, the app behaves very strangely (causing an error I
haven't tracked down yet).  On the other box, it runs fine.

What is this message trying to tell me?  Is this a true indication of
an error?  Or is it just a warning I can ignore safely?

--
Jonathan Rosenberg
Founder &  Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Confused: IllegalStateException

Posted by Jonathan Rosenberg <jr...@tabbysplace.org>.
Dan,

Thanks for the reply.  See comment embedded below.

On Fri, Nov 2, 2012 at 4:26 PM, Daniel Mikusa <dm...@vmware.com> wrote:
> On Nov 2, 2012, at 3:10 PM, Jonathan Rosenberg wrote:
>
>> On Fri, Nov 2, 2012 at 3:03 PM, Daniel Mikusa <dm...@vmware.com> wrote:
>>> On Nov 2, 2012, at 2:36 PM, Jonathan Rosenberg wrote:
>>>
>>>> Basics: Apache Tomcat/7.0.22  1.6.0_22-b04
>>>>
>>>> I have a Grails app that I'm deploying to this Tomcat.
>>>
>>> How are you deploying the  application?  What are the exact steps that you are taking?
>>
>> I am using Tomcat's WAR upload and deploy (i.e., through manager app).
>
> Thought as much, thanks for confirming.

>>>> Nov 2, 2012 2:25:41 PM org.apache.catalina.loader.WebappClassLoader loadClass
>>>> INFO: Illegal access: this web application instance has been stopped
>>>> already.  Could not load com.mysql.jdbc.SQLError.  The eventual

> Based on this, it would seem that you have the MySQL driver bundled with the application.  You might want to try moving this to the shared class loader (i.e. the "lib" folder).  I think that might clear up the message.
e eventual following stack trace is caused by an error thrown for
debugging purposes as well as to attempt to terminate the thread which
caused the illegal access,"

I ended up restarting Tomcat, cleaning the app directory & rebuilding
the app.  Worked fine after that.

> Hope that helps.
>
> Dan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Confused: IllegalStateException

Posted by Daniel Mikusa <dm...@vmware.com>.
On Nov 2, 2012, at 3:10 PM, Jonathan Rosenberg wrote:

> On Fri, Nov 2, 2012 at 3:03 PM, Daniel Mikusa <dm...@vmware.com> wrote:
>> On Nov 2, 2012, at 2:36 PM, Jonathan Rosenberg wrote:
>> 
>>> Basics: Apache Tomcat/7.0.22  1.6.0_22-b04
>>> 
>>> I have a Grails app that I'm deploying to this Tomcat.
>> 
>> How are you deploying the  application?  What are the exact steps that you are taking?
> 
> I am using Tomcat's WAR upload and deploy (i.e., through manager app).

Thought as much, thanks for confirming.

>>> Nov 2, 2012 2:25:41 PM org.apache.catalina.loader.WebappClassLoader loadClass
>>> INFO: Illegal access: this web application instance has been stopped
>>> already.  Could not load com.mysql.jdbc.SQLError.  The eventual
>>> following stack trace is caused by an error thrown for debugging
>>> purposes as well as to attempt to terminate the thread which caused
>>> the illegal access, and has no functional impact.
>>> java.lang.IllegalStateException
>>>       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1564)
>>>       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
>>>       at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3352)
>>>       at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1696)
>>>       at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4368)
>>>       at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1361)
>>>       at com.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2729)
>>>       at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
>>>       at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
>>>       at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
>>>       at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
>>> 
>>> What is this message trying to tell me?  

This would seem to indicate that an application which has been stopped (possibly because it has been undeployed) is executing code that would require the web application's class loader to load a class (specifically the com.mysql.jdbc.SQLError class).  Since the application has already been stopped, the class loader associated with it is refusing to load the class.

Based on this, it would seem that you have the MySQL driver bundled with the application.  You might want to try moving this to the shared class loader (i.e. the "lib" folder).  I think that might clear up the message.


>>> Is this a true indication of an error?[1]  Or is it just a warning I can ignore safely?[2]

The error message seems to answer these questions…

[1] - "The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access,"

[2] - "and has no functional impact."

Hope that helps.

Dan



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Confused: IllegalStateException

Posted by Jonathan Rosenberg <jr...@tabbysplace.org>.
On Fri, Nov 2, 2012 at 3:03 PM, Daniel Mikusa <dm...@vmware.com> wrote:
> On Nov 2, 2012, at 2:36 PM, Jonathan Rosenberg wrote:
>
>> Basics: Apache Tomcat/7.0.22  1.6.0_22-b04
>>
>> I have a Grails app that I'm deploying to this Tomcat.
>
> How are you deploying the  application?  What are the exact steps that you are taking?

I am using Tomcat's WAR upload and deploy (i.e., through manager app).

--
Jonathan Rosenberg
Founder &  Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/


>
> Dan
>
>> During the
>> deployment, I see the following in catalina.out:
>>
>> Nov 2, 2012 2:25:18 PM org.apache.catalina.startup.HostConfig deployWAR
>> INFO: Deploying web application archive Catalog##0025.war
>> log4j:WARN No appenders could be found for logger (net.bull.javamelody).
>> log4j:WARN Please initialize the log4j system properly.
>> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
>> for more info.
>> Nov 2, 2012 2:25:41 PM org.apache.catalina.loader.WebappClassLoader loadClass
>> INFO: Illegal access: this web application instance has been stopped
>> already.  Could not load com.mysql.jdbc.SQLError.  The eventual
>> following stack trace is caused by an error thrown for debugging
>> purposes as well as to attempt to terminate the thread which caused
>> the illegal access, and has no functional impact.
>> java.lang.IllegalStateException
>>        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1564)
>>        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
>>        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3352)
>>        at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1696)
>>        at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4368)
>>        at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1361)
>>        at com.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2729)
>>        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
>>        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
>>        at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
>>        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
>>
>> After this, the app seems to continue loading normally.  I have tried
>> this on 2 Linux boxes (same Tomcat & JVM).  I see this on both, but on
>> one of the boxes, the app behaves very strangely (causing an error I
>> haven't tracked down yet).  On the other box, it runs fine.
>>
>> What is this message trying to tell me?  Is this a true indication of
>> an error?  Or is it just a warning I can ignore safely?
>>
>> --
>> Jonathan Rosenberg
>> Founder &  Executive Director
>> Tabby's Place, a Cat Sanctuary
>> http://www.tabbysplace.org/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Confused: IllegalStateException

Posted by Daniel Mikusa <dm...@vmware.com>.
On Nov 2, 2012, at 2:36 PM, Jonathan Rosenberg wrote:

> Basics: Apache Tomcat/7.0.22 	1.6.0_22-b04
> 
> I have a Grails app that I'm deploying to this Tomcat.  

How are you deploying the  application?  What are the exact steps that you are taking?

Dan

> During the
> deployment, I see the following in catalina.out:
> 
> Nov 2, 2012 2:25:18 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive Catalog##0025.war
> log4j:WARN No appenders could be found for logger (net.bull.javamelody).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
> for more info.
> Nov 2, 2012 2:25:41 PM org.apache.catalina.loader.WebappClassLoader loadClass
> INFO: Illegal access: this web application instance has been stopped
> already.  Could not load com.mysql.jdbc.SQLError.  The eventual
> following stack trace is caused by an error thrown for debugging
> purposes as well as to attempt to terminate the thread which caused
> the illegal access, and has no functional impact.
> java.lang.IllegalStateException
>        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1564)
>        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
>        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3352)
>        at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1696)
>        at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4368)
>        at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1361)
>        at com.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2729)
>        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
>        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
>        at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
>        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
> 
> After this, the app seems to continue loading normally.  I have tried
> this on 2 Linux boxes (same Tomcat & JVM).  I see this on both, but on
> one of the boxes, the app behaves very strangely (causing an error I
> haven't tracked down yet).  On the other box, it runs fine.
> 
> What is this message trying to tell me?  Is this a true indication of
> an error?  Or is it just a warning I can ignore safely?
> 
> --
> Jonathan Rosenberg
> Founder &  Executive Director
> Tabby's Place, a Cat Sanctuary
> http://www.tabbysplace.org/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org