Topic
  • 5 replies
  • Latest Post - ‏2013-01-20T07:52:25Z by raanan
SystemAdmin
SystemAdmin
2327 Posts

Pinned topic DB2 Cannot create a poolable connection on worklight server

‏2013-01-17T06:13:21Z |
I have an app with an SQL adapter that works through the local server environment using the browser emulators.

Whenever I deploy all app artifacts and fry to run through the Android emulator or on a device I get the error noted above.

In both the local and deployed versions I am using the same database connection parameters.
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: DB2 Cannot create a poolable connection on worklight server

    ‏2013-01-17T19:58:20Z  
    Hmm...from the client side, you are only invoking the adapter which is the one making the connection to the DB2 server, so it shouldn't matter where it is being invoked from...

    Can you provide some more information? Maybe the full error log, the adapter implementation, and the method you are using on the client side to invoke the adapter?
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: DB2 Cannot create a poolable connection on worklight server

    ‏2013-01-18T20:45:19Z  
    Hmm...from the client side, you are only invoking the adapter which is the one making the connection to the DB2 server, so it shouldn't matter where it is being invoked from...

    Can you provide some more information? Maybe the full error log, the adapter implementation, and the method you are using on the client side to invoke the adapter?
    The SQL adapter works when I test locally in the browser simulator so I assume that everything is set up correctly.

    The customer settings jar that contains the worklight.properties file and the db2 jars should be deployed to my app server /lib/ext directory I am assuming.

    Also, how is is possible to build the application files locally while using datasource jndi entries rather than full jdbc urls? I tried that approach, but the build fails because I don't have those datasources defined locally.

    Does that make any sense?
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: DB2 Cannot create a poolable connection on worklight server

    ‏2013-01-18T23:04:34Z  
    The SQL adapter works when I test locally in the browser simulator so I assume that everything is set up correctly.

    The customer settings jar that contains the worklight.properties file and the db2 jars should be deployed to my app server /lib/ext directory I am assuming.

    Also, how is is possible to build the application files locally while using datasource jndi entries rather than full jdbc urls? I tried that approach, but the build fails because I don't have those datasources defined locally.

    Does that make any sense?
    Hmm, the worklight.properties file is included in the WAR...so I'm not sure about including the settings jar.

    Can you try adding the db2 jars directly into the /lib/ext folder? I don't think they are included in the settings jar you are speaking of. They are included in the WAR file that is generated but instead of relying on the WAR file, it is best to add the jars directly so the lib/ext folder.

    I'm not sure about the jndi/jdbc issue.
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: DB2 Cannot create a poolable connection on worklight server

    ‏2013-01-19T00:10:19Z  
    Hmm, the worklight.properties file is included in the WAR...so I'm not sure about including the settings jar.

    Can you try adding the db2 jars directly into the /lib/ext folder? I don't think they are included in the settings jar you are speaking of. They are included in the WAR file that is generated but instead of relying on the WAR file, it is best to add the jars directly so the lib/ext folder.

    I'm not sure about the jndi/jdbc issue.
    I have resolved my issues. worklight.properties is indeed in the jar that is generated for each mobile app. I have to build the app with my local properties, alter the worklight.properties file outside of the jar, and then zip up the artifacts and rename it to .jar.

    The one issue is the db2 connection properties are different depending on which side of the network that you are on.

    Very painful process. My app is now working however which is a good thing.
  • raanan
    raanan
    50 Posts

    Re: DB2 Cannot create a poolable connection on worklight server

    ‏2013-01-20T07:52:25Z  
    I have resolved my issues. worklight.properties is indeed in the jar that is generated for each mobile app. I have to build the app with my local properties, alter the worklight.properties file outside of the jar, and then zip up the artifacts and rename it to .jar.

    The one issue is the db2 connection properties are different depending on which side of the network that you are on.

    Very painful process. My app is now working however which is a good thing.
    It is a pain, but there are other, less painful, ways to do this.
    You can create an empty project with worklight.properties files configured for the remote server and deploy the built .war on it
    or change the worklight.properties in your development env. to reflect your remote server and built it in your Eclipse and then revert to the old worklight.properties
    or you can use an ANT script to do the build.