tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Propes, Barry L " <barry.l.pro...@citi.com>
Subject RE: SQLNestedException: Cannot create PoolableConnectionFactory
Date Tue, 01 Jun 2010 14:35:33 GMT
I got a similar error when I inadvertently had the dbcp jar file placed in multiple directories.

You might try checking to ensure that it's not placed in more than one folder. 

-----Original Message-----
From: Pid * [mailto:pid@pidster.com] 
Sent: Monday, May 31, 2010 9:16 AM
To: Tomcat Users List
Subject: Re: SQLNestedException: Cannot create PoolableConnectionFactory

Is this the right forum for your question?

It looks like the db isn't running or isn't accessible.

If there's a Tomcat problem, please include exact OS, JVM and Tomcat version numbers.


p

On 31 May 2010, at 12:30, ennidhi <psatishbabu@hotmail.com> wrote:

>
> I am getting this exception. Everything seems to be fine.
>
> hibernate config xml:
>
>
> # <?xml version="1.0" encoding="UTF-8"?> # <!DOCTYPE 
> hibernate-configuration PUBLIC
> #         "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
> #
> "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
> # <hibernate-configuration>
> #   <session-factory>
> #     <!-- Database data source -->
> #     <property
> name="hibernate.connection.datasource">java:/comp/env/jdbc/iclose-
> messenger-broker-ds</property>
> #
> #     <!-- MySQL -->
> #     <!-- <property
> name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</
> property>-->
> #     <!-- MS SQL Server -->
> #     <property
> name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</
> property>
> #
> #     <!-- Enable Hibernate's automatic session context management -->
> #     <property
> name="hibernate.current_session_context_class">thread</property>
> #
> #     <!-- Disable the second-level cache -->
> #     <property
> name="hibernate.cache.use_second_level_cache">false</property>
> #     <property
> name=
> "hibernate.cache.provider_class"
> >org.hibernate.cache.NoCacheProvider</property>
> #
> #     <!-- Debugging -->
> #     <property name="hibernate.show_sql">false</property>
> #     <property name="hibernate.format_sql">false</property>
> #
> #   </session-factory>
> # </hibernate-configuration>
>
>
>
>
>
>
>
> context setting xml:
>
> <Context path="/iclose-messenger-broker" debug="0">
>  <!-- MySQL -->
>  <!--
>    <Resource name="jdbc/iclose-messenger-broker-ds"
>            auth="Container"
>            type="javax.sql.DataSource"
>            maxActive="100"
>            maxIdle="30"
>            maxWait="10000"
>            username="MyUserName"
>            password="MyPassword"
>            driverClassName="com.mysql.jdbc.Driver"
>
> url="jdbc:mysql://localhost:3306/iclose-messenger-broker?
> autoReconnect=true"/>
>  />  -->
>
>  <!-- Microsoft SQL Server -->
>
>  <Resource name="jdbc/iclose-messenger-broker-ds"
>            auth="Container"
>            type="javax.sql.DataSource"
>            maxActive="100"
>            maxIdle="30"
>            maxWait="10000"
>            username="sa"
>            password="sa"
>            driverClassName="net.sourceforge.jtds.jdbcx.JtdsDataSource"
>
> url="jdbc:jtds:sqlserver://192.168.90.245:1433/iclose-messenger-
> broker;appName=iclose-messenger"/>
>  />
>
> </Context>
>
>
>
>
> SQL Server DB Name: iclose-messenger-broker
>
>
> Please suggest me here.
>
>
> Exception details:org.apache.tomcat.dbcp.dbcp.SQLNestedException:
> Cannot
> create PoolableConnectionFactory (Network error IOException:
> Connection
> timed out: connect)
>    at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource
> (BasicDataSource.java:855)
>    at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection
> (BasicDataSource.java:540)
>    at
> org.hibernate.connection.DatasourceConnectionProvider.getConnection
> (DatasourceConnectionProvider.java:69)
>    at org.hibernate.cfg.SettingsFactory.buildSettings
> (SettingsFactory.java:84)
>    at org.hibernate.cfg.Configuration.buildSettings
> (Configuration.java:2009)
>    at
> org.hibernate.cfg.Configuration.buildSessionFactory
> (Configuration.java:1292)
>    at
> org.parlinkie.msgsvr.core.dao.DaoSession.buildHibernateSession
> (DaoSession.java:205)
>    at org.parlinkie.msgsvr.core.dao.DaoSession.<clinit>
> (DaoSession.java:143)
>    at
> org.parlinkie.msgsvr.connector.acord.AcordSoapServlet.initProcessing
> (AcordSoapServlet.java:182)
>    at
> org.parlinkie.msgsvr.connector.acord.AcordSoapServlet.init
> (AcordSoapServlet.java:165)
>    at
> org.apache.catalina.core.StandardWrapper.loadServlet
> (StandardWrapper.java:1139)
>    at org.apache.catalina.core.StandardWrapper.load
> (StandardWrapper.java:966)
>    at
> org.apache.catalina.core.StandardContext.loadOnStartup
> (StandardContext.java:3956)
>    at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:
> 4230)
>    at
> org.apache.catalina.core.ContainerBase.addChildInternal
> (ContainerBase.java:760)
>    at org.apache.catalina.core.ContainerBase.addChild
> (ContainerBase.java:740)
>    at org.apache.catalina.core.StandardHost.addChild
> (StandardHost.java:544)
>    at
> org.apache.catalina.startup.HostConfig.deployDescriptor
> (HostConfig.java:626)
>    at
> org.apache.catalina.startup.HostConfig.deployDescriptors
> (HostConfig.java:553)
>    at org.apache.catalina.startup.HostConfig.deployApps
> (HostConfig.java:488)
>    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:
> 1138)
>    at
> org.apache.catalina.startup.HostConfig.lifecycleEvent
> (HostConfig.java:311)
>    at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
> (LifecycleSupport.java:120)
>    at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1022)
>    at org.apache.catalina.core.StandardHost.start(StandardHost.java:
> 736)
>    at org.apache.catalina.core.ContainerBase.start
> (ContainerBase.java:1014)
>    at org.apache.catalina.core.StandardEngine.start
> (StandardEngine.java:443)
>    at org.apache.catalina.core.StandardService.start
> (StandardService.java:448)
>    at org.apache.catalina.core.StandardServer.start
> (StandardServer.java:700)
>    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
> sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
>    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> Caused by: java.sql.SQLException: Network error IOException:
> Connection
> timed out: connect
>    at
> net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>
> (ConnectionJDBC2.java:385)
>    at
> net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>
> (ConnectionJDBC3.java:50)
>    at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
>    at
> org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection
> (DriverConnectionFactory.java:37)
>    at
> org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject
> (PoolableConnectionFactory.java:290)
>    at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory
> (BasicDataSource.java:877)
>    at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource
> (BasicDataSource.java:851)
>    ... 35 more
> Caused by: java.net.ConnectException: Connection timed out: connect
>    at java.net.PlainSocketImpl.socketConnect(Native Method)
>
> --
> View this message in context: 
> http://old.nabble.com/SQLNestedException%3A-Cannot-create-PoolableConn
> ectionFactory-tp28730009p28730009.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message