Topic
2 replies Latest Post - ‏2013-02-11T12:06:49Z by SystemAdmin
SystemAdmin
SystemAdmin
300 Posts
ACCEPTED ANSWER

Pinned topic facing problem in sql adapter

‏2013-02-11T10:54:52Z |
hello , i am new to worklight. I want to use sql adapter to access data from my live server.
<connectivity>
<connectionPolicy xsi:type="sql:SQLConnectionPolicy">
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://mysql3.000webhost.com/a5939994_demo</url>
<user>a5939994_dhara</user>
<password>worklight</password>
</dataSourceDefinition>
</connectionPolicy>

I wrote above lines in my xml file.But when i am trying to invoke the procedure then it gives error in alert box like,

http://localhost:8080/dev/invoke?adapter=sql_adapter&procedure=hello&parameters=%5B%5D

Page load failed with error: The request timed out.

so can anyone please help me to figure it out?

Thanks in advance
  • IdanAdar
    IdanAdar
    49 Posts
    ACCEPTED ANSWER

    Re: facing problem in sql adapter

    ‏2013-02-11T11:05:23Z  in response to SystemAdmin
    Is that the only error line?

    Try with a local database and see if the problem persists.
    It sounds like a network issue with the database host at *.000webhosts.com

    ===
    Note: IBM forums are in the process of migrating to a new format. During migration the forums will be frozen and in read-only mode. If you wish to continue this thread discussion please post it on stackoverflow, where the Worklight team and others can respond.

    See the Forum Migration announce post for more details. Thank you.
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14937476

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      300 Posts
      ACCEPTED ANSWER

      Re: facing problem in sql adapter

      ‏2013-02-11T12:06:49Z  in response to IdanAdar
      E: ERROR: Could not connect to database. Cannot create PoolableConnectionFactory (Communications link failure

      The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.).

      this error also comes after alert box in console..

      Let me try with localhost...