Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Cannot create PoolableConnectionFactory

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have problems with using a database that is available on our remote server.

My code works when I use local database with the settings in Tomcat

<Resource name="jdbc/database" auth="Container" type="javax.sql.DataSource" username="user" password="pass" driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver" url="jdbc:microsoft:sqlserver://localhost:1433;databaseName=database" maxActive="200" maxIdle="100"/>

I can even access all databases on LAN
url="jdbc:microsoft:sqlserver://LANIP:1433;databaseName=database"

but when I try accessing remote IP url="jdbc:microsoft:sqlserver://RemoteIP:1433;databaseName=database"

I get this error
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ([Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.)

Any Ideas.. Do I need to change tomcat settings, or I need to give some permissions on remote SQL server (there are no firewall issues, I checked)

Thanks
 
author
Posts: 4226
33
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat does not need permission to make an external connection so if the problem is indeed how you described, it sounds like a firewall issue. Sorry I couldn't be more helpful than that.
 
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic