Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Reply
New Developer
Posts: 6
Registered: ‎02-21-2011
My Device: Not Specified
Accepted Solution

Cannot install sample apps manually

[ Edited ]

Hi,

 

I'm having a hard time installing Push SDK sample apps in a remote machine. I'm trying a manual installation of Tomcat. The machine runs Linux Red Hat.

 

The error I get is:

 

 

[org.springframework.web.context.ContextLoader.initWebApplicationContext()] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registerListeners' defined in class path resource [sample-push-initiator-context.xml]: Invocation of init method failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: 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.)

 It looks like a problem with the JDBC connector, but I don't know how to solve it. Among the things I've already done are:

 

  • Generate the database manually.
  • Fill out PushSDK.properties with the database and JDBC info. Copy this file in each of the sample apps WEB-INF/classes directory
  • Copy mysql connector jar file into each application's WEB-INF/lib directory
  • Edit app.properties file with my BB credentials (app id, PGG base url etc). Copied it into the apps WEB-INF/classes directory. I did the same with acknoledgement-context.xml and app-context.xml
  • Edit Tomcat's conf/server.xml to set the ports for http and https and UTF-8 encoding for the query component of the request URL. Actually, I only have port 8080 available in the machine and I've configured HTTPS to work there. 
  • Issue a self-signed certificate and indicated its location in conf/server.xml file. Indicated it's location in conf/server.xml
  • Edit bin/catalina.sh to set UTF-8 encoding in JAVA_OPTS

 

 

Tomcat's initial page seem to be working fine in https://machine_ip:8080/

But there are errors with the BB apps:

 

 

  • https://machine_ip:8080/sample-push-initiator returns 404
  • https://machine_ip:8080/pushsdk returns 404
  • https://machine_ip:8080/debug-portal does open the Debug Portal, but shows the following message:
Internal Server Error: 

Sorry, we are unable to properly process your request at this time. Please contact a system administrator to investigate the problem by examining the logs.

 

Does anyone have any idea of what is going on? I would greatly appretiate some help

 

Best regards,

 

María

 

New Developer
Posts: 6
Registered: ‎02-21-2011
My Device: Not Specified

Re: Cannot install sample apps manually

Hi all!

 

I could finally solve this problem. MySQL was not allowing the connection from JDBC. I've

had to remove the line:

 

 

skip-networking

 

in MySQL configuration file ( /etc/my.cnf ) and now the sample apps seem to be working ok.

I still cannot subscribe the client though, but that's a different story...

 

Regards,

María