You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Janssen, Roger" <Ro...@ibanx.nl> on 2003/09/02 11:08:20 UTC

Help with PlatformDefaultImpl - Given connection was null, cannot prepare autoCommit state

hi,
(using OJB RC4)

using a MySQL database, i constantly get the annoying errormessage:

ERROR org.apache.ojb.broker.platforms.PlatformDefaultImpl - Given connection
was null, cannot prepare autoCommit state


Checking PlatformDefaultImpl, i notice the following code:

    public void changeAutoCommitState(JdbcConnectionDescriptor jcd,
Connection con, boolean newState)
    {
        if (con == null)
        {
            log.error("Given connection was null, cannot prepare autoCommit
state");
            return;
        }

this code is being called from
org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.

So, my question is, is it really an error if (con==null) occurs (it happens
all the time), i guess then an exception should be thrown instead of just a
return. If not (everything seems to be going alright at first sight), could
this message be an info message instead of an error, so i can filter it out!

thanx,

Roger Janssen
iBanx


*************************************************************************
The information contained in this communication is confidential and is
intended solely for the use of the individual or entity to  whom it is
addressed.You should not copy, disclose or distribute this communication 
without the authority of iBanx bv. iBanx bv is neither liable for 
the proper and complete transmission of the information has been maintained
nor that the communication is free of viruses, interceptions or interference.

If you are not the intended recipient of this communication please return
the communication to the sender and delete and destroy all copies.

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


Re: Help with PlatformDefaultImpl - Given connection was null, cannot prepare autoCommit state

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Roger,

> So, my question is, is it really an error if (con==null) occurs (it
happens
> all the time), i guess then an exception should be thrown instead of
just a
> return. If not (everything seems to be going alright at first sight),
could
> this message be an info message instead of an error, so i can filter
it out!
>
normally you shouldn't get this message. Method
changeAutoCommitState try to reset an temporarily changed
autoCommit state (e.g. from false to true), so it's important.
I try to reproduce your problem without success. Only if I
throw explicit an SQLException in ConnectionManagerImpl
(line 210) the error message was printed.
How can I reproduce your problem?

regards,
Armin

----- Original Message -----
From: "Janssen, Roger" <Ro...@ibanx.nl>
To: "'OJB Users List'" <oj...@db.apache.org>
Sent: Tuesday, September 02, 2003 11:08 AM
Subject: Help with PlatformDefaultImpl - Given connection was null,
cannot prepare autoCommit state


> hi,
> (using OJB RC4)
>
> using a MySQL database, i constantly get the annoying errormessage:
>
> ERROR org.apache.ojb.broker.platforms.PlatformDefaultImpl - Given
connection
> was null, cannot prepare autoCommit state
>
>
> Checking PlatformDefaultImpl, i notice the following code:
>
>     public void changeAutoCommitState(JdbcConnectionDescriptor jcd,
> Connection con, boolean newState)
>     {
>         if (con == null)
>         {
>             log.error("Given connection was null, cannot prepare
autoCommit
> state");
>             return;
>         }
>
> this code is being called from
> org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.
>
> So, my question is, is it really an error if (con==null) occurs (it
happens
> all the time), i guess then an exception should be thrown instead of
just a
> return. If not (everything seems to be going alright at first sight),
could
> this message be an info message instead of an error, so i can filter
it out!
>
> thanx,
>
> Roger Janssen
> iBanx
>
>
>
************************************************************************
*
> The information contained in this communication is confidential and is
> intended solely for the use of the individual or entity to  whom it is
> addressed.You should not copy, disclose or distribute this
communication
> without the authority of iBanx bv. iBanx bv is neither liable for
> the proper and complete transmission of the information has been
maintained
> nor that the communication is free of viruses, interceptions or
interference.
>
> If you are not the intended recipient of this communication please
return
> the communication to the sender and delete and destroy all copies.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>



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