I think all you need to change is the classname for the
datasource to "
com.mchange.v2.c3p0.ComboPooledDataSource".
On 3/28/07 4:52 PM, "Horan, Kenneth M."
<KHoran intelink.gov> wrote:
> A question about log4j. Whenever I start up tomcat I
see this message
> in catalina.out:
>
> log4j:WARN No appenders could be found for logger
> (org.blojsom.filter.PageFilter).
> log4j:WARN Please initialize the log4j system
properly.
>
> Then, after a little while all I get is page after page
of:
>
> log4j:ERROR Attempted to append to closed appender
named [null].
>
> It has pointed out lots of plugin errors for plugins
being called that
> aren't in version 3 (which I've now corrected), but
there's one more
> error that's popping up consistently.
>
> ERROR [http-8080-3] servlet.BlojsomServlet -
> org.blojsom.fetcher.FetcherException:
> org.hibernate.NonUniqueResultException: query did not
return a unique
> result: 3
>
> Before that I was also seeing some of these:
>
> Mar 28 20:09:47 ERROR [http-8080-1]
transaction.JDBCTransaction - JDBC
> commit failed
>
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionExcepti
on:
> Communications link failure during commit().
Transaction resolution
> unknown.
>
> It would be nice to get rid of that null appender
problem. It seems
> once that starts happening it's the only entry I get in
the log. The
> thread count is still climbing though. Is there
something else I'll
> need to set to use c3p0, or should that new line simply
replace the
> current line?
>
> Kenny
>
>
> -----Original Message-----
> From: blojsom-users-bounces lists.sourceforge.net
> [mailto:blojsom-users-bounces lists.sourceforge.net] On
Behalf Of Horan,
> Kenneth M.
> Sent: Wednesday, March 28, 2007 3:12 PM
> To: blojsom-users lists.sourceforge.net
> Subject: Re: [Blojsom-users] Blojsom 3 questions
>
> Thanks, I'll give the timeouts a try. I noticed the
java thread count
> is popping up to about 175 before pages stop
responding. If the
> timeouts don't help I'll try c3p0 too. But wait, don't
I also need
> r2d2? (Sorry, couldn't resist)
>
> Now my catalina.out is finally manageable too. Yay!
>
> Kenny
>
>
> -----Original Message-----
> From: blojsom-users-bounces lists.sourceforge.net
> [mailto:blojsom-users-bounces lists.sourceforge.net] On
Behalf Of David
> Czarnecki
> Sent: Wednesday, March 28, 2007 1:51 PM
> To: blojsom-users
> Subject: Re: [Blojsom-users] Blojsom 3 questions
>
> Try setting the connectTimeout in the URL for the mysql
JDBC connection
> string
>
> <http://dev.mysql.com/doc/refman/5.0/en/co
nnector-j-reference-configurat
> ion-
> properties.html>
>
> <property name="url"
>
value="jdbc:mysql://localhost:3306/blojsom?autoReconnec
t=true&useUni
> code
>
=true&characterEncoding=utf-8&connectTimeout
=<someVal>"/>
>
> connectTimeout Timeout for socket connect (in
milliseconds), with 0
> being no timeout. Only works on JDK-1.4 or newer.
Defaults to '0'. 0
> 3.0.1
>
> socketTimeout Timeout on network socket operations
(0, the default
> means
> no timeout). 0 3.0.1
>
> You might also try the C3PO pooled data source.
>
> <bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
> destroy-method="close">
> <property
>
name="driverClass"><value>com.mysql.jdbc.
Driver</value></property>
> <property
>
name="jdbcUrl"><value>jdbc:mysql://localh
ost:3306/blojsom?autoReconnect=
> true
>
&useUnicode=true&characterEncoding=utf-8<
/value></property>
> <property
name="user"><value>blojsom</value>&
lt;/property>
> <property
name="password"><value>blojsom</value&
gt;</property>
> </bean>
>
> For log4j, change the following in blojsom's
> WEB-INF/classes/log4j.properties:
>
> # Set root logger level to DEBUG and its only appender
to stdout
> log4j.rootLogger=ERROR, stdout
>
>
> On 3/28/07 1:36 PM, "Horan, Kenneth M."
<KHoran intelink.gov> wrote:
>
>> I have blojsom 3 up and running, now I need to
figure out why it hangs
>> after a couple hours. All pages just sit there and
eventually return
> a
>> blank page, and Catalina.out stops logging
anything. I looked in
>> localhost.*.log and I see the same error repeated
over and over
>> (attached). They all have the same timestamp and
seem to be triggered
>> when I restart the server. Any idea what could be
causing this?
>>
>> Mar 28, 2007 5:08:02 PM
org.apache.catalina.core.StandardWrapperValve
>> invoke
>> SEVERE: Servlet.service() for servlet blojsom threw
exception
>> java.lang.IllegalStateException: Pool not open
>>
>> It also occasionally complains about a query
involving a "-1" that it
>> doesn't like (also attached). So far I've been
unable to reproduce
> the
>> error on my test system.
>>
>> Mar 28, 2007 5:13:41 PM
org.apache.catalina.core.StandardWrapperValve
>> invoke
>> SEVERE: Servlet.service() for servlet blojsom threw
exception
>> org.hibernate.exception.SQLGrammarException: could
not execute query
>> Caused by:
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You
> have
>> an error in your SQL syntax; check the manual that
corresponds to your
>> MySQL server version for the right syntax to use
near '-1' at line 1
>>
>> Also, how can I stop the Catalina.out file from
ballooning? It's
>> chewing up a ton of space. I tried setting the
"debug" value in
>> build.xml to "off" and recompiled but it
made no difference. Is there
>> another setting somewhere?
>>
>
------------------------------------------------------------
------------
> -
>> Take Surveys. Earn Cash. Influence the Future of
IT
>> Join SourceForge.net's Techsay panel and you'll get
the chance to
> share your
>> opinions on IT & business topics through brief
surveys-and earn cash
>>
> http://www.techsay.com/default.p
hp?page=join.php&p=sourceforge&CID=DEVDE
> V
>> _______________________________________________
>> Blojsom-users mailing list
>> Blojsom-users lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
--
David Czarnecki
http://www.blojsom.com/b
log/ | http://blojsom.sf.net
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Blojsom-users mailing list
Blojsom-users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
|