01-07-2013 07:40 AM
That's very odd. What does the stack trace include? And to confirm, you are testing both scenarios on the same server and Apache instance?
01-07-2013 10:08 PM - edited 01-07-2013 10:09 PM
Hi gbeukeboom,
For previous error
ERROR: Was unable to add a push application for the Sample Push Initiator due to the following reason:
DataAccessException caught finding application by id: 3xxx-8l1xxxxxxxxxxxxxx
The logs should be consulted for a full stack trace.
I fix this error by editing file mysql.properties (in sample-push-initiator/WEB-INF/classes). I'm replace all table name from upercase to lowercase. Table name is case sensitive between Windows and Unix platform. I'm download bpss for linux platform and install on Centos. For development I download bpss for windows version. Maybe you can fix this issue.
After this issue solved, I can open my sample-push-initiator or debug-portal web and my client app (Push API Sample from push SDK sample) successfully register (HTTP response: rc=200 and message "Command 'register' executed successfully" in View Log menu).
But, when i try to send push I get error:
Push message was invalid. The request was rejected by the PPG because it was invalid in some way or the message was not understood. (i.e. malformed push request, invalid format or missing mandatory fields in message, malformed XML or using unsupported elements/attributes in the XML , no active subscribers to push to, daily quota exceeded, invalid port number specified, specifying a notify URL when it wasn't expected by the PPG, etc... Please check application log files for more information.
And bellow is PushSDK Log. Please advice
Jan 08,2013 09:30:05 ERROR - [net.rim.pushsdk.pap.PapServiceImpl.push()] - BadMessageException caught:
BadMessageException ( net.rim.pushsdk.pap.unmarshal.BadMessageException: <?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.1
at net.rim.pushsdk.pap.unmarshal.PapMessageUnmarshall
at net.rim.pushsdk.pap.unmarshal.PapMessageUnmarshall
at net.rim.pushsdk.pap.PapServiceImpl.push(PapService
at net.rim.pushsdk.push.PushServiceImpl.push(PushServ
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.aop.support.AopUtils.invokeJoi
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.transaction.interceptor.Transa
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.aop.interceptor.ExposeInvocati
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.aop.framework.JdkDynamicAopPro
at $Proxy21.push(Unknown Source)
at net.rim.pushsdk.debugportal.push.PushDataPushContr
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.web.bind.annotation.support.Ha
at org.springframework.web.bind.annotation.support.Ha
at org.springframework.web.servlet.mvc.annotation.Ann
at org.springframework.web.servlet.mvc.annotation.Ann
at org.springframework.web.servlet.DispatcherServlet.
at org.springframework.web.servlet.DispatcherServlet.
at org.springframework.web.servlet.FrameworkServlet.p
at org.springframework.web.servlet.FrameworkServlet.d
at javax.servlet.http.HttpServlet.service(HttpServlet
at javax.servlet.http.HttpServlet.service(HttpServlet
at org.apache.catalina.core.ApplicationFilterChain.in
at org.apache.catalina.core.ApplicationFilterChain.do
at org.springframework.web.filter.CharacterEncodingFi
at org.springframework.web.filter.OncePerRequestFilte
at org.apache.catalina.core.ApplicationFilterChain.in
at org.apache.catalina.core.ApplicationFilterChain.do
at org.apache.catalina.core.StandardWrapperValve.invo
at org.apache.catalina.core.StandardContextValve.invo
at org.apache.catalina.authenticator.AuthenticatorBas
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke
at org.apache.catalina.valves.AccessLogValve.invoke(A
at org.apache.catalina.core.StandardEngineValve.invok
at org.apache.catalina.connector.CoyoteAdapter.servic
at org.apache.coyote.http11.Http11Processor.process(H
at org.apache.coyote.http11.Http11Protocol$Http11Conn
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
at java.lang.Thread.run(Thread.java:636)
Jan 08,2013 09:30:05 ERROR - [net.rim.pushsdk.push.PushServiceImpl.push()] - BadMessageException caught:
BadMessageException ( net.rim.pushsdk.pap.unmarshal.BadMessageException: <?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.1
at net.rim.pushsdk.pap.unmarshal.PapMessageUnmarshall
at net.rim.pushsdk.pap.unmarshal.PapMessageUnmarshall
at net.rim.pushsdk.pap.PapServiceImpl.push(PapService
at net.rim.pushsdk.push.PushServiceImpl.push(PushServ
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.aop.support.AopUtils.invokeJoi
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.transaction.interceptor.Transa
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.aop.interceptor.ExposeInvocati
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.aop.framework.JdkDynamicAopPro
at $Proxy21.push(Unknown Source)
at net.rim.pushsdk.debugportal.push.PushDataPushContr
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.web.bind.annotation.support.Ha
at org.springframework.web.bind.annotation.support.Ha
at org.springframework.web.servlet.mvc.annotation.Ann
at org.springframework.web.servlet.mvc.annotation.Ann
at org.springframework.web.servlet.DispatcherServlet.
at org.springframework.web.servlet.DispatcherServlet.
at org.springframework.web.servlet.FrameworkServlet.p
at org.springframework.web.servlet.FrameworkServlet.d
at javax.servlet.http.HttpServlet.service(HttpServlet
at javax.servlet.http.HttpServlet.service(HttpServlet
at org.apache.catalina.core.ApplicationFilterChain.in
at org.apache.catalina.core.ApplicationFilterChain.do
at org.springframework.web.filter.CharacterEncodingFi
at org.springframework.web.filter.OncePerRequestFilte
at org.apache.catalina.core.ApplicationFilterChain.in
at org.apache.catalina.core.ApplicationFilterChain.do
at org.apache.catalina.core.StandardWrapperValve.invo
at org.apache.catalina.core.StandardContextValve.invo
at org.apache.catalina.authenticator.AuthenticatorBas
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke
at org.apache.catalina.valves.AccessLogValve.invoke(A
at org.apache.catalina.core.StandardEngineValve.invok
at org.apache.catalina.connector.CoyoteAdapter.servic
at org.apache.coyote.http11.Http11Processor.process(H
at org.apache.coyote.http11.Http11Protocol$Http11Conn
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
at java.lang.Thread.run(Thread.java:636)
Jan 08,2013 09:30:05 ERROR - [net.rim.pushsdk.debugportal.push.PushDataPushCont
net.rim.pushsdk.commons.PushSDKException: BadMessageException ( net.rim.pushsdk.pap.unmarshal.BadMessageException: <?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.1
at net.rim.pushsdk.push.PushServiceImpl.push(PushServ
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.aop.support.AopUtils.invokeJoi
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.transaction.interceptor.Transa
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.aop.interceptor.ExposeInvocati
at org.springframework.aop.framework.ReflectiveMethod
at org.springframework.aop.framework.JdkDynamicAopPro
at $Proxy21.push(Unknown Source)
at net.rim.pushsdk.debugportal.push.PushDataPushContr
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.web.bind.annotation.support.Ha
at org.springframework.web.bind.annotation.support.Ha
at org.springframework.web.servlet.mvc.annotation.Ann
at org.springframework.web.servlet.mvc.annotation.Ann
at org.springframework.web.servlet.DispatcherServlet.
at org.springframework.web.servlet.DispatcherServlet.
at org.springframework.web.servlet.FrameworkServlet.p
at org.springframework.web.servlet.FrameworkServlet.d
at javax.servlet.http.HttpServlet.service(HttpServlet
at javax.servlet.http.HttpServlet.service(HttpServlet
at org.apache.catalina.core.ApplicationFilterChain.in
at org.apache.catalina.core.ApplicationFilterChain.do
at org.springframework.web.filter.CharacterEncodingFi
at org.springframework.web.filter.OncePerRequestFilte
at org.apache.catalina.core.ApplicationFilterChain.in
at org.apache.catalina.core.ApplicationFilterChain.do
at org.apache.catalina.core.StandardWrapperValve.invo
at org.apache.catalina.core.StandardContextValve.invo
at org.apache.catalina.authenticator.AuthenticatorBas
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke
at org.apache.catalina.valves.AccessLogValve.invoke(A
at org.apache.catalina.core.StandardEngineValve.invok
at org.apache.catalina.connector.CoyoteAdapter.servic
at org.apache.coyote.http11.Http11Processor.process(H
at org.apache.coyote.http11.Http11Protocol$Http11Conn
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
at java.lang.Thread.run(Thread.java:636)
Caused by: BadMessageException ( net.rim.pushsdk.pap.unmarshal.BadMessageException: <?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.1
at net.rim.pushsdk.pap.unmarshal.PapMessageUnmarshall
at net.rim.pushsdk.pap.unmarshal.PapMessageUnmarshall
at net.rim.pushsdk.pap.PapServiceImpl.push(PapService
at net.rim.pushsdk.push.PushServiceImpl.push(PushServ
... 46 more
01-08-2013 07:28 AM
From the error message:
desc="deliver-before-timestamp has already expired"
You need to set the timestamp to a time in the future.
01-08-2013 10:01 AM
@budiman_lai
budiman_lai wrote:
I fix this error by editing file mysql.properties (in sample-push-initiator/WEB-INF/classes). I'm replace all table name from upercase to lowercase. Table name is case sensitive between Windows and Unix platform. I'm download bpss for linux platform and install on Centos. For development I download bpss for windows version. Maybe you can fix this issue.
Can you provide more details about what exactly the problem was from the quote above? We've tested the Push Service SDK on Linux and it worked ok. We use uppercase table names across the board which should work fine.
01-08-2013 11:42 PM - edited 01-08-2013 11:45 PM
@mdicesare
example query from mysql.properties
push.app.find.by.id=SELECT * FROM BPSS_PUSH_APPLICATION WHERE id = ? --> ERROR 1146 (42S02): Table 'db_name.BPSS_PUSH_APPLICATION' doesn't exist
push.app.find.by.id=SELECT * FROM bpss_push_application WHERE id = ? --> after I change BPSS_PUSH_APPLICATION to bpss_push_application, I can run sample-push-initiator.
Maybe this is different mysql settings between your server and my server. But, i think all tablename using lowercase better.
use MYSQL; and use mysql; is different in most linux platform. I use MySQL 5.1.25, CentOS 6.1, PHP 5.3.3 and Apache 2.0.
Note: I create bpss database manualy from query. All table name in lowercase.
01-09-2013 02:30 AM
@gbeukeboom,
Thanks, now I can send push from panel. But I still can't find any subscriber id in menu Subscriber Management > Query by Status. Number of subscriber still 0.
In PUSH Sample app menu Settings in field Push Initiator application URL I fill "http://my_server_ip:8443/sample-push-initiator" or "http://my_server_ip:8443/debug-portal".
My next question is how to send push programaticaly using PHP or java?
01-09-2013 07:37 AM
May be an obvious question, but have you had any devices subscribe directly to your server successfully yet? For the server to know of the device the client application needs to send a registration message to your server with the device's PIN.
01-09-2013 08:48 AM
budiman_lai wrote:
Note: I create bpss database manualy from query. All table name in lowercase.
By default the Push Service SDK uses all upper case in the DDL and DML files shipped. This shouldn't cause any problems.
To clarify your scenario, are you saying you modified the DDL file that comes with the SDK pushsdk_schema_mysql.sql to create the tables using lower case? And as such you then had to modify the DML file mysql.properties to change all the table names in the DML statements to use lower case as well?
01-09-2013 08:59 AM
budiman_lai wrote:@gbeukeboom,
Thanks, now I can send push from panel. But I still can't find any subscriber id in menu Subscriber Management > Query by Status. Number of subscriber still 0.
In PUSH Sample app menu Settings in field Push Initiator application URL I fill "http://my_server_ip:8443/sample-push-initiator" or "http://my_server_ip:8443/debug-portal".
My next question is how to send push programaticaly using PHP or java?
Depends which sample push initaitor you want to use to send the push to your application. If you are using the Debug Portal helper app to initiate the pushes then subscribe with that web app, if you are using the sample-push-initiator helper app to initiate the pushes then subscribe with that app instead.
In terms of sending a push programatically using Java that is exactly what the Push Service SDK is for. The helper apps are just apps built on the SDK APIs/libraries. The Debug Portal and sample-push-initaitor apps both come with source code included so you can see how those apps use the SDK APIs to initiate push messages and more. The APIs are pretty simple to use so if you are using the SDK low level APIs look at the PapServiceImpl class in the PAP package; or if you are using the high level APIs look at the PushServiceImpl class in the push package.
<PushServiceSDK-install-dir>\pushsdk-high-level\he
-or -
<PushServiceSDK-install-dir>\pushsdk-high-level\he