Rao, Satish | 1 Jul 2005 15:16

RE: Cache not being flushed

Any suggestions?

-----Original Message-----
From: Brandon Goodin [mailto:brandon.goodin <at> gmail.com] 
Sent: Thursday, June 30, 2005 3:35 PM
To: user-java <at> ibatis.apache.org
Subject: Re: Cache not being flushed

Did you try jiggling the handle?

On 6/30/05, Rao, Satish <satish.rao <at> fmr.com> wrote:
>  
> Hello Clinton, 
>   
> I tried debugging the ibatis source code using WSAD. When the server
starts
> up, I can see the control go into LRUCacheController and reading each
of the
> statements within <flushOnExecute>. I had put breakpoints in flush()
(within
> LRUCacheController and CachModel), but that part of the code never
gets
> called. 
>   
> I also tried using the <statement> tag instead of <insert> tag as
follows,
> and that didn't work either. Also, to keep it simple, I am not using
any
> namespaces. 
>   
(Continue reading)

Larry Meadors | 1 Jul 2005 15:39
Picon
Gravatar

Re: Cache not being flushed

Well, if jiggling the handle didn't work, try setting a breakpoint in
the getObject method of the com.ibatis.sqlmap.engine.cache.CacheModel
class.

That is where the handle is connected. ;-)

Larry

PS: You have to forgive Brandon's silliness lately - he just got a new job. :-)

On 7/1/05, Rao, Satish <satish.rao <at> fmr.com> wrote:
> Any suggestions?
> 
> -----Original Message-----
> From: Brandon Goodin [mailto:brandon.goodin <at> gmail.com]
> Sent: Thursday, June 30, 2005 3:35 PM
> To: user-java <at> ibatis.apache.org
> Subject: Re: Cache not being flushed
> 
> 
> Did you try jiggling the handle?
> 
> On 6/30/05, Rao, Satish <satish.rao <at> fmr.com> wrote:
> >
> > Hello Clinton,
> >
> > I tried debugging the ibatis source code using WSAD. When the server
> starts
> > up, I can see the control go into LRUCacheController and reading each
> of the
(Continue reading)

Ashish Kulkarni | 1 Jul 2005 17:54
Picon
Favicon

Could not find resource error

Hi
I am trying SQLMap as stand alone application,
here is my folder structure
c:
--test
      |
      --com
           |
            ashish
                  |
                  --data
                        |
                        -- SQLMapConfig.xml
                        -- SqlMapConfig.properties

In my SQLMapConfig.xml file i have defined resource
tag as below
<properties
resource="com/ashish/data/SqlMapConfig.properties" /> 

in my java program i do the following
String resource = "com/ashish/data/SQLMapConfig.xml";
Reader reader =
Resources.getResourceAsReader(resource);
sqlMap =
SqlMapClientBuilder.buildSqlMapClient(reader);

But i am getting the following error
Error parsing XPath '/sqlMapConfig/properties'. 
Cause:
(Continue reading)

Larry Meadors | 1 Jul 2005 18:10
Picon
Gravatar

Re: Could not find resource error

SQLMapConfig != SqlMapConfig

Case counts.

Larry

On 7/1/05, Ashish Kulkarni <kulkarni_ash1312 <at> yahoo.com> wrote:
> Hi
> I am trying SQLMap as stand alone application,
> here is my folder structure
> c:
> --test
>       |
>       --com
>            |
>             ashish
>                   |
>                   --data
>                         |
>                         -- SQLMapConfig.xml
>                         -- SqlMapConfig.properties
> 
> In my SQLMapConfig.xml file i have defined resource
> tag as below
> <properties
> resource="com/ashish/data/SqlMapConfig.properties" />
> 
> in my java program i do the following
> String resource = "com/ashish/data/SQLMapConfig.xml";
> Reader reader =
(Continue reading)

Larry Meadors | 1 Jul 2005 18:10
Picon
Gravatar

Re: Could not find resource error

oops, mis read that...hmm

On 7/1/05, Larry Meadors <larry.meadors <at> gmail.com> wrote:
> SQLMapConfig != SqlMapConfig
> 
> Case counts.
> 
> Larry
> 
> On 7/1/05, Ashish Kulkarni <kulkarni_ash1312 <at> yahoo.com> wrote:
> > Hi
> > I am trying SQLMap as stand alone application,
> > here is my folder structure
> > c:
> > --test
> >       |
> >       --com
> >            |
> >             ashish
> >                   |
> >                   --data
> >                         |
> >                         -- SQLMapConfig.xml
> >                         -- SqlMapConfig.properties
> >
> > In my SQLMapConfig.xml file i have defined resource
> > tag as below
> > <properties
> > resource="com/ashish/data/SqlMapConfig.properties" />
> >
(Continue reading)

Niels Beekman | 1 Jul 2005 18:46
Picon

RE: Could not find resource error

Hi,

Seems to me that you are using two config-files or something like that,
you say you are including com/*ashish*/data/SqlMapConfig.properties, but
the debug-output displays
com/*pfizer/maps*/data/SqlMapConfig.properties...

Niels

-----Original Message-----
From: Ashish Kulkarni [mailto:kulkarni_ash1312 <at> yahoo.com] 
Sent: vrijdag 1 juli 2005 17:55
To: user-java <at> ibatis.apache.org
Subject: Could not find resource error

Hi
I am trying SQLMap as stand alone application,
here is my folder structure
c:
--test
      |
      --com
           |
            ashish
                  |
                  --data
                        |
                        -- SQLMapConfig.xml
                        -- SqlMapConfig.properties

(Continue reading)

Ashish Kulkarni | 1 Jul 2005 20:46
Picon
Favicon

There is no READABLE property named error

Hi
I am trying to use SQL Map to insert data into
database,
this table has 124 columns, and i have defined a java
bean to map with this database,
I am sure that the database bean and insert statment
in xml file is correct, 
but still i get this error, is there a way to debug
and find what is going wrong,
is there a limitation to number of columns to be
inserted in table.
How do i debug this problem

Ashish

		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

Ashish Kulkarni | 1 Jul 2005 20:52
Picon
Favicon

Re: There is no READABLE property named error

Hello
I think the problem is because code in my bean is as
below
private java.lang.String P813NAME ;
public void setP813NAME (java.lang.String P813NAME )
{
this.P813NAME = P813NAME;
}
public java.lang.String getP813NAME ()
{
return this.P813NAME ;
}

does this comply to java bean standards

Ashish

--- Ashish Kulkarni <kulkarni_ash1312 <at> yahoo.com>
wrote:

> Hi
> I am trying to use SQL Map to insert data into
> database,
> this table has 124 columns, and i have defined a
> java
> bean to map with this database,
> I am sure that the database bean and insert statment
> in xml file is correct, 
> but still i get this error, is there a way to debug
> and find what is going wrong,
(Continue reading)

Sven Boden | 2 Jul 2005 22:49
Picon

Re: No operations allowed after connection closed.


Catching up... Since the problem in the original mails below where a
iBATIS ping is enable without a valid ping query also appears as e.g.
JIRA IBATIS-158, I would like to propose a few small changes to
SimpleDataSource to minimize this behaviour in the future.

Can I still attach the changes to IBATIS-158 (which is now closed)?

Regards,
Sven Boden

On Wed, 29 Jun 2005 22:13:18 -0600, you wrote:

>Just an FYI:
>
>DBCP and most app server pools also support validation/ping queries.
>
>Clinton
>
>On 6/29/05, Meindert <meindert <at> pastelebusiness.com> wrote:
>> 
>>  Ok, sorry I didn't look very well.
>> 
>>  The answer is in the back of the manual:
>> 
>> SimpleDataSource
>> 
>> Property Name: Pool.PingQuery
>> 
>> The ping query will be run against the database to test the connection
(Continue reading)

Clinton Begin | 3 Jul 2005 02:15
Picon

Re: No operations allowed after connection closed.

Sven,

Let's open up a new issue for improvement sot SimpleDataSource.

It's by far the oldest class in iBATIS, with the fewest changes.  It has served well, but could use some improvements.

The biggest improvement I'd like to make is removal of the exclusive Properties based configuration.  I'd rather have a JavaBean style API for configuration, which could potentually use a Properties file still, but with properties that match exact JavaBeans properties for configuration.

Cheers,
Clinton

On 7/2/05, Sven Boden <list123 <at> pandora.be> wrote:

Catching up... Since the problem in the original mails below where a
iBATIS ping is enable without a valid ping query also appears as e.g.
JIRA IBATIS-158, I would like to propose a few small changes to
SimpleDataSource to minimize this behaviour in the future.

Can I still attach the changes to IBATIS-158 (which is now closed)?

Regards,
Sven Boden

On Wed, 29 Jun 2005 22:13:18 -0600, you wrote:

>Just an FYI:
>
>DBCP and most app server pools also support validation/ping queries.
>
>Clinton
>
>On 6/29/05, Meindert <meindert <at> pastelebusiness.com> wrote:
>>
>>  Ok, sorry I didn't look very well.
>>
>>  The answer is in the back of the manual:
>>
>> SimpleDataSource
>>
>> Property Name: Pool.PingQuery
>>
>> The ping query will be run against the database to test the connection
>>  ------------------------------
>>
>> *From:* Meindert [mailto:meindert <at> pastelebusiness.com]
>> *Sent:* Wednesday, June 29, 2005 9:16 AM
>> *To:* user-java <at> ibatis.apache.org
>> *Subject:* RE: No operations allowed after connection closed.
>>
>>  I have replaced my JDBC driver but am still having the same problem.
>>
>>  Looked a bit around on google and got the following tip:
>>
>> >We solved this same problem by doing essentially what Mark advises
>> >below.
>>
>> >We set the wait_timeout on the server to be a very large number and the
>> >idle timeout for our connection pool to be fairly small. For what we are
>> >doing, the time required to create a new connection is not very
>> >significant, so we usually have the idle timeout for connections in the
>> >pool set to just a few minutes.
>>
>> >Applications using our connection pool can specify an optional
>> >configuration property that the pool manager will use to validate the
>> >connection before it is returned to the application. "SELECT 1" seems to
>> >be succinct, safe, and performant. If the query fails, the connection is
>> >removed from the pool and another one is tried. If the pool is empty, of
>> >course, a new connection is created.
>>
>> >Robert Stewart
>>
>>  Will play around with this, but thought this could be some handy info for
>> users with the same problem
>>
>>  Meindert
>>
>> ------------------------------------
>>
>> I have also seen this same error using a thin client. The first quesy
>> throws a exception about closed connection then creates a new connection and
>> carries on. I am using the same version of mysql but connector 3.1.6..
>> When i use the same client same queries against our hsqldb db we never get
>> the problem. I have been working on the hsqldb side for a while and assumed
>> it was an error in my code which i would fix later. i have a newer
>>
>> version of mysql 4.1.12 which is our new base line so i will try it out on
>> this database and let you know.. But it sounds like a bug in the driver?
>>
>> Steve..
>>
>> -----Original Message-----
>> From: Meindert [mailto:meindert <at> pastelebusiness.com< meindert <at> pastelebusiness.com>
>> ]
>> Sent: Thu 6/23/2005 2:19 PM
>> To: user-java <at> ibatis.apache.org; 'Brandon Goodin'
>> Subject: RE: No operations allowed after connection closed.
>>
>> Database version:
>>
>> mysql-connector-java-3.0.16-ga-bin.jar
>>
>> mysql-4.1.9
>>
>> To reproduce I open the website on the index page and then close the
>> browser, the next day I open the browser again and I get the error.
>>
>> The error comes from the connection pool, I find this in my Catalina.out
>> log:
>>
>>  DEBUG [http-80-Processor25] - Returned connection 12839271 to pool. (This
>> was the day before)
>>
>> DEBUG [http-80-Processor24] - Checked out connection 12839271 from pool.
>> (The connection for the paginated list on my index.shtml page)
>>
>> DEBUG [http-80-Processor24] - {conn-100045} Connection
>>
>> DEBUG [http-80-Processor24] - A bad connection (12839271) attempted to
>> return to the pool, discarding connection.
>>
>>  The query fails and the index page comes up and prints the exception
>> trace.
>>
>> Pressing F5 reloads the page and fetches a new connection that succeeds.
>>
>>  The connection is used for:
>> setEmployeeList(dailyBulletinService.getOutStaff ());
>>
>>  Is this enough info?
>>
>>    MEINDERT HOVING
>>
>> Developer, Pastel Payroll
>>
>>  Direct:
>>
>> +27 (21) 680 9015
>>
>> Main:
>>
>> +27 (21) 680 9000
>>
>> Fax:
>>
>> +27 (21) 680 9090
>>
>> meindert <at> pastelebusiness.com
>>
>> www.pastel.co.za <http://www.pastel.co.za>
>>
>>  9 out of 10 accountants recommend PASTEL Accounting
>>
>>  -----Original Message-----
>> From: Brandon Goodin [mailto:brandon.goodin <at> gmail.com<brandon.goodin <at> gmail.com >]
>>
>> Sent: Thursday, June 23, 2005 1:18 PM
>> To: user-java <at> ibatis.apache.org
>> Subject: Re: No operations allowed after connection closed.
>>
>>  Meindert,
>>
>>  Please provide more information. I can't really tell what is happening
>>
>> in your situation. If you Servlet Session is timing out it should have
>>
>> not affect on the database connection. My notion is that it is
>>
>> something else. Please provide the database and driver with versions
>>
>> that you are using and a more specific description of what the
>>
>> application is doing when you experience this error.
>>
>>  Thanks
>>
>> Brandon
>>
>>  On 6/23/05, Meindert < meindert <at> pastelebusiness.com> wrote:
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> > How can I force a reconnect after a session has been timed out
>>
>> > ________________________________
>>
>> >
>>
>> >
>>
>> > I was hoping anybody could help me here, it is probably a stupid thing
>> but
>> I
>>
>> > can't seem to find the answer..
>>
>> >
>>
>> > My application is based on the jpetshop.
>>
>> >
>>
>> >
>>
>> >
>>
>> > Anyway, I have on my main page a paginated list (employeeList) that must
>> be
>>
>> > fetched every time the page is loaded.
>>
>> >
>>
>> > I set it to null in the reset method of the bean
>>
>> >
>>
>> >
>>
>> >
>>
>> > public void reset() {
>>
>> >
>>
>> > pageDirection = null;
>>
>> >
>>
>> > employeeList = null;
>>
>> >
>>
>> > }
>>
>> >
>>
>> >
>>
>> >
>>
>> > And I call the service layer to do the (simple) query, when I go to
>>
>> > index.shtml
>>
>> >
>>
>> >
>>
>> >
>>
>> > public String index() {
>>
>> >
>>
>> > setEmployeeList(dailyBulletinService.getOutStaff ());
>>
>> >
>>
>> > return "success";
>>
>> >
>>
>> > }
>>
>> >
>>
>> >
>>
>> >
>>
>> > My problem is that the page loads with an error "after a while" (I
>> assume
>>
>> > after the session times out)
>>
>> >
>>
>> > Pressing F5 in the browser will clear this error.
>>
>> >
>>
>> > What am I doing wrong or how do I get ride of it?
>>
>> >
>>
>> > I'm using mysql, tomcat on a linux machine.
>>
>> >
>>
>> >
>>
>> >
>>
>> > The error is: java.sql.SQLException: Communication link failure:
>>
>> > java.io.EOFException, underlying cause: null
>>
>> > Caused by: java.sql.SQLException: No operations allowed after connection
>>
>> > closed.
>>
>> >
>>
>> > Connection was closed due to the following exception:
>>
>> >
>>
>> > ** BEGIN NESTED EXCEPTION **
>>
>> >
>>
>> > java.sql.SQLException
>>
>> > MESSAGE: Communication link failure: java.io.EOFException, underlying
>> cause:
>>
>> > null
>>
>> >
>>
>> > ** BEGIN NESTED EXCEPTION **
>>
>> >
>>
>> > java.io.EOFException
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> > Please help
>>
>> >
>>
>> > Meindert
>>
>>



Gmane