You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Matteo Barbieri <m....@ste-energy.com> on 2006/03/01 16:23:47 UTC

ClassLoader Exception

Hi,
I have a web application where I use Torque to read/write a MySQL database.
When I use it on a first client, all works well.
But when I load a second client that has to read data from database I
have the following exception:

1-mar-2006 15.49.03 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped
already.  Could not load java.net.BindException. 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:1238)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at
com.mysql.jdbc.CommunicationsException.<init>(CommunicationsException.java:155)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2710)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2621)
        at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1338)
        at com.mysql.jdbc.Connection.realClose(Connection.java:4429)
        at com.mysql.jdbc.Connection.cleanup(Connection.java:1973)
        at com.mysql.jdbc.Connection.finalize(Connection.java:3114)
        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)
1-mar-2006 15.49.04 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped
already.  Could not load com.mysql.jdbc.Messages.  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:1238)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at
com.mysql.jdbc.CommunicationsException.<init>(CommunicationsException.java:174)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2710)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2621)
        at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1338)
        at com.mysql.jdbc.Connection.realClose(Connection.java:4429)
        at com.mysql.jdbc.Connection.cleanup(Connection.java:1973)
        at com.mysql.jdbc.Connection.finalize(Connection.java:3114)
        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)


Asking aroud I found that it could be a transaction problem, so maybe
you could know something about this and the way Propel uses MySQL
connections.

Thank you


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: ClassLoader Exception

Posted by Thomas Fischer <fi...@seitenbau.net>.
Torque handles all transaction via its Transaction class. For the source
code, see

http://svn.apache.org/viewcvs.cgi/db/torque/runtime/trunk/src/java/org/apache/torque/util/Transaction.java?rev=239636&view=log

    Thomas

Matteo Barbieri <m....@ste-energy.com> schrieb am 09.03.2006 17:12:16:

> Thomas Fischer ha scritto:
>
> >This does not seem to be a problem of Torque.
> >A general advice would be to check the places where the mysql driver
> >classes are loaded from. Make sure that for each application, the driver
> >can be loaded only from one place.
> >
> >   Thomas
> >
> >
> After more investigation I found that this problem could be caused by
> the interaction of Torque and another library I use (ZK).
> To better understanding the problem I would like to know how Torque
> creates and closes transactions.
> If you can tell me something or point me to the right source code, thank
> you.
>
> Bye
>
> --
> Matteo Barbieri
> S.T.E. s.r.l.
> m.barbieri@ste-energy.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: ClassLoader Exception

Posted by Matteo Barbieri <m....@ste-energy.com>.
Thomas Fischer ha scritto:

>This does not seem to be a problem of Torque.
>A general advice would be to check the places where the mysql driver
>classes are loaded from. Make sure that for each application, the driver
>can be loaded only from one place.
>
>   Thomas
>  
>
After more investigation I found that this problem could be caused by
the interaction of Torque and another library I use (ZK).
To better understanding the problem I would like to know how Torque
creates and closes transactions.
If you can tell me something or point me to the right source code, thank
you.

Bye

-- 
Matteo Barbieri
S.T.E. s.r.l.
m.barbieri@ste-energy.com


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: ClassLoader Exception

Posted by Thomas Fischer <fi...@seitenbau.net>.
This does not seem to be a problem of Torque.
A general advice would be to check the places where the mysql driver
classes are loaded from. Make sure that for each application, the driver
can be loaded only from one place.

   Thomas

Matteo Barbieri <m....@ste-energy.com> schrieb am 01.03.2006 16:23:47:

> Hi,
> I have a web application where I use Torque to read/write a MySQL
database.
> When I use it on a first client, all works well.
> But when I load a second client that has to read data from database I
> have the following exception:
>
> 1-mar-2006 15.49.03 org.apache.catalina.loader.WebappClassLoader
loadClass
> INFO: Illegal access: this web application instance has been stopped
> already.  Could not load java.net.BindException. 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:1238)
>         at
> org.apache.catalina.loader.WebappClassLoader.
> loadClass(WebappClassLoader.java:1198)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at
> com.mysql.jdbc.CommunicationsException.
> <init>(CommunicationsException.java:155)
>         at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2710)
>         at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2621)
>         at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1338)
>         at com.mysql.jdbc.Connection.realClose(Connection.java:4429)
>         at com.mysql.jdbc.Connection.cleanup(Connection.java:1973)
>         at com.mysql.jdbc.Connection.finalize(Connection.java:3114)
>         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)
> 1-mar-2006 15.49.04 org.apache.catalina.loader.WebappClassLoader
loadClass
> INFO: Illegal access: this web application instance has been stopped
> already.  Could not load com.mysql.jdbc.Messages.  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:1238)
>         at
> org.apache.catalina.loader.WebappClassLoader.
> loadClass(WebappClassLoader.java:1198)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at
> com.mysql.jdbc.CommunicationsException.
> <init>(CommunicationsException.java:174)
>         at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2710)
>         at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2621)
>         at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1338)
>         at com.mysql.jdbc.Connection.realClose(Connection.java:4429)
>         at com.mysql.jdbc.Connection.cleanup(Connection.java:1973)
>         at com.mysql.jdbc.Connection.finalize(Connection.java:3114)
>         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)
>
>
> Asking aroud I found that it could be a transaction problem, so maybe
> you could know something about this and the way Propel uses MySQL
> connections.
>
> Thank you
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org