Skip navigation
alexlake
Currently Being Moderated

ColdFusion 10 + jTDS to SQLAnywhere timeout

Apr 16, 2013 6:14 AM

Tags: #sqlanywhere #jtds

Got a new installation of CF10 running on 64 bit Ubuntu 12.04LTS.

Trying to connect to Sybase ASA (AKA SQLAnywhere) v8 using jTDS.

 

I put jtds-1.3.0.jar and jcifs_1.3.17 into a directory that's in the CF Java Classpath - and that seems good, CF seems to be able to find that right enough.

 

But when I configure a Datasource:

 

JDBC URL: jdbc:jtds:sybase://1.2.3.4:2638/mydatabase

Driverclass: net.sourceforge.jtds.jdbc.Driver

Username: xxx

Password: yyy

 

It doesn't work - I get a very rapid timeout error message:

 

Connection verification failed for data source: dmcc-jtds

java.sql.SQLException: Timed out trying to establish connection

The root cause was that: java.sql.SQLException: Timed out trying to establish connection

 

 

I can connect to the same database using the SQLAnywhere native commandline tools (so not a firewall issue).

 

I saw that someone else reported this problem on StackOverflow but if any solution was found, they didn't put it up!

 

Help!

 

BTW, this is in the CF internal logfile:

 

"Error","ajp-bio-8012-exec-6","04/16/13","15:09:23",,"Timed out trying to establish connection"

java.sql.SQLException: Timed out trying to establish connection

        at coldfusion.server.j2ee.sql.pool.JDBCPool.requestConnection(JDBCPool.j ava:843)

        at coldfusion.server.j2ee.sql.pool.JDBCManager.requestConnection(JDBCMan ager.java:125)

        at coldfusion.server.j2ee.sql.JRunDataSource.getConnection(JRunDataSourc e.java:135)

        at coldfusion.sql.CFDataSource.getConnection(CFDataSource.java:42)

        at coldfusion.sql.Executive.verifyDatasource(Executive.java:492)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at coldfusion.runtime.StructBean.invoke(StructBean.java:508)

        at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2465)

        at cfudflibrary2ecfm1867463752$funcVERIFYDSN.runFunction(E:\cf10_final\c fusion\wwwroot\CFIDE\administrator\datasources\udflibrary.cfm:14)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)

        at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMetho d.java:368)

        at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.ja va:55)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518)

        at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2624)

        at cfindex2ecfm782328217._factor12(E:\cf10_final\cfusion\wwwroot\CFIDE\a dministrator\datasources\index.cfm:450)

        at cfindex2ecfm782328217._factor17(E:\cf10_final\cfusion\wwwroot\CFIDE\a dministrator\datasources\index.cfm:396)

        at cfindex2ecfm782328217._factor18(E:\cf10_final\cfusion\wwwroot\CFIDE\a dministrator\datasources\index.cfm:168)

        at cfindex2ecfm782328217.runPage(E:\cf10_final\cfusion\wwwroot\CFIDE\adm inistrator\datasources\index.cfm:1)

        at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)

        at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)

        at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

        at coldfusion.filter.IpFilter.invoke(IpFilter.java:64)

        at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:443 )

        at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.ja va:48)

        at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

        at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)

        at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)

        at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePers istenceFilter.java:28)

        at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

        at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)

        at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

        at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

        at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)

        at coldfusion.CfmServlet.service(CfmServlet.java:204)

        at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:8 9)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:305)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:210)

        at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringS ervletFilter.java:42)

        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46 )

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:210)

        at coldfusion.filter.ClickjackingProtectionFilter.doFilter(ClickjackingP rotectionFilter.java:75)

        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46 )

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:210)

 
Replies
  • Currently Being Moderated
    Jul 18, 2013 4:12 PM   in reply to alexlake

    Thanks alexlake to point out the right directory.  In addition to that, I have to add "?charset=iso_1" to the JDBC URL in order to make the connection.

    It looks like- JDBC URL  "jdbc:sybase:Tds:<host>:<port>/<dbname>?charset=iso_1" 

     

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points