Broken pipe and how to recycle dead connections

View: New views
6 Messages — Rating Filter:   Alert me  

Broken pipe and how to recycle dead connections

by Ron H :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi!

i get the following exception:
java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:

java.net.SocketException: Broken pipe
       at java.net.SocketOutputStream.socketWrite0(Native Method)
       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)

my conncetion is like that:
<transactionManager type="JDBC" commitRequired="false">
                <dataSource type="SIMPLE">
                        <property value="${driver}" name="JDBC.Driver" />
                        <property value="${url}" name="JDBC.ConnectionURL" />
                        <property value="${username}" name="JDBC.Username" />
                        <property value="${password}" name="JDBC.Password" />
                        <property name="Pool.PingQuery" value="select 1 from Employees" />
                        <property name="Pool.PingEnabled" value="true" />
                        <property name="Pool.PingConnectionsOlderThan" value="0" />
                        <property name="Pool.PingConnectionsNotUsedFor" value="0" />
                       
                </dataSource>
        </transactionManager>

my code is like that:
public YTUser getUserProfile(String userId) throws SQLException{
                return (YTUser) sqlMapper.queryForObject("selectUser",userId);
        }
i read that a solution could be to recycle dead connection. is it true? how can i do it?

Re: Broken pipe and how to recycle dead connections

by 陈抒 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

use the red line:


<environments default="development">
        <environment id="development">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="com.mysql.jdbc.Driver"/>
                <property name="url" value="jdbc:mysql://192.168.0.110:3306/EffectiveEnglish"/>
                <property name="username" value="freebird"/>
                <property name="password" value="770328"/>
            </dataSource>
        </environment>
    </environments>
陈抒
Best regards
http://blog.csdn.net/sheismylife


On Fri, Nov 6, 2009 at 1:43 PM, Ron H <be.special@...> wrote:

hi!

i get the following exception:
java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:

java.net.SocketException: Broken pipe
      at java.net.SocketOutputStream.socketWrite0(Native Method)
      at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)

my conncetion is like that:
<transactionManager type="JDBC" commitRequired="false">
               <dataSource type="SIMPLE">
                       <property value="${driver}" name="JDBC.Driver" />
                       <property value="${url}" name="JDBC.ConnectionURL" />
                       <property value="${username}" name="JDBC.Username" />
                       <property value="${password}" name="JDBC.Password" />
                       <property name="Pool.PingQuery" value="select 1 from Employees" />
                       <property name="Pool.PingEnabled" value="true" />
                       <property name="Pool.PingConnectionsOlderThan" value="0" />
                       <property name="Pool.PingConnectionsNotUsedFor" value="0" />

               </dataSource>
       </transactionManager>

my code is like that:
public YTUser getUserProfile(String userId) throws SQLException{
               return (YTUser) sqlMapper.queryForObject("selectUser",userId);
       }
i read that a solution could be to recycle dead connection. is it true? how
can i do it?
--
View this message in context: http://old.nabble.com/Broken-pipe-and-how-to-recycle-dead-connections-tp26226564p26226564.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...



Re: Broken pipe and how to recycle dead connections

by Ron H :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi

i am using ibatis2

and get classnotfound error

how can i deal with it?
陈抒 wrote:
use the red line:


<environments default="development">
        <environment id="development">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="com.mysql.jdbc.Driver"/>
                <property name="url" value="jdbc:mysql://
192.168.0.110:3306/EffectiveEnglish"/>
                <property name="username" value="freebird"/>
                <property name="password" value="770328"/>
            </dataSource>
        </environment>
    </environments>
陈抒
Best regards
http://blog.csdn.net/sheismylife


On Fri, Nov 6, 2009 at 1:43 PM, Ron H <be.special@gmail.com> wrote:

>
> hi!
>
> i get the following exception:
> java.net.SocketException
> MESSAGE: Broken pipe
>
> STACKTRACE:
>
> java.net.SocketException: Broken pipe
>       at java.net.SocketOutputStream.socketWrite0(Native Method)
>       at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>
> my conncetion is like that:
> <transactionManager type="JDBC" commitRequired="false">
>                <dataSource type="SIMPLE">
>                        <property value="${driver}" name="JDBC.Driver" />
>                        <property value="${url}" name="JDBC.ConnectionURL"
> />
>                        <property value="${username}" name="JDBC.Username"
> />
>                        <property value="${password}" name="JDBC.Password"
> />
>                        <property name="Pool.PingQuery" value="select 1 from
> Employees" />
>                        <property name="Pool.PingEnabled" value="true" />
>                        <property name="Pool.PingConnectionsOlderThan"
> value="0" />
>                        <property name="Pool.PingConnectionsNotUsedFor"
> value="0" />
>
>                </dataSource>
>        </transactionManager>
>
> my code is like that:
> public YTUser getUserProfile(String userId) throws SQLException{
>                return (YTUser)
> sqlMapper.queryForObject("selectUser",userId);
>        }
> i read that a solution could be to recycle dead connection. is it true? how
> can i do it?
> --
> View this message in context:
> http://old.nabble.com/Broken-pipe-and-how-to-recycle-dead-connections-tp26226564p26226564.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Re: Broken pipe and how to recycle dead connections

by Guy Rouillier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ron H wrote:
> hi
>
> i am using ibatis2
>
> and get classnotfound error
>
> how can i deal with it?

Put the required JAR file containing the missing class into your runtime
classpath.

--
Guy Rouillier

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...


Re: Broken pipe and how to recycle dead connections

by deligeli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi

i get it for:

SEVERE: Servlet.service() for servlet default threw exception
java.lang.ClassNotFoundException: POOLED
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.ibatis.common.resources.Resources.classForName(Resources.java:267)
        at com.ibatis.common.resources.Resources.instantiate(Resources.java:283)
        at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$9.process(SqlMapConfigParser.java:218)
        at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)

in what JAR does the POOLED class appear?


Guy Rouillier-2 wrote:
Ron H wrote:
> hi
>
> i am using ibatis2
>
> and get classnotfound error
>
> how can i deal with it?

Put the required JAR file containing the missing class into your runtime
classpath.

--
Guy Rouillier

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

Re: Broken pipe and how to recycle dead connections

by Guy Rouillier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

deligeli wrote:

> hi
>
> i get it for:
>
> SEVERE: Servlet.service() for servlet default threw exception
> java.lang.ClassNotFoundException: POOLED
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at com.ibatis.common.resources.Resources.classForName(Resources.java:267)
> at com.ibatis.common.resources.Resources.instantiate(Resources.java:283)
> at
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$9.process(SqlMapConfigParser.java:218)
> at
> com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
>
> in what JAR does the POOLED class appear?

I started with iBatis 3.  But looking in the JAR file for 2.3.4 (and for
  3, BTW) there is no class named "POOLED".  Comparing the iBatis 3 PDF
to the iBatis 2 sample, configuration of the dataSource appears to be
similar.  If so, "POOLED" is a dataSource type, not a class.  Show your
XML configuration for your dataSource and someone may be able to help.

>
>
>
> Guy Rouillier-2 wrote:
>> Ron H wrote:
>>> hi
>>>
>>> i am using ibatis2
>>>
>>> and get classnotfound error
>>>
>>> how can i deal with it?
>> Put the required JAR file containing the missing class into your runtime
>> classpath.
>>
>> --
>> Guy Rouillier
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscribe@...
>> For additional commands, e-mail: user-java-help@...
>>
>>
>>
>


--
Guy Rouillier

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...