If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Contributor
congkinh
Posts: 13
Registered: ‎01-20-2012
My Device: 9780
My Carrier: SFR

a little bit strange for sample-push-initiator

Hi everybody,

 

I'm using the example sample-push-initiator attached in BPSS, version 1.1.0.16. In fact, it had worked well before. I mean that I could send a message of Push from the servlet (sample-push-initiator) to the a real device Blackberry, and of course I then received it on the mobile phone BB. But, I don't understand what happens. Now, the servlet doesn't work.

 

When using a BB device to register to server Blackberry, I received a failed message: java.lang.Exception: Registration with Push API failed, caused by java.lang.IllegalStateException: no application instance.

 

In addition, when clicking on the button "Start General Push" of the servlet (sample-push-initiator), I received a message: Failed for: [(Id: push_all, Code: 2000)]. Could someone have any idea to solve my case?

 

Thanks in advance

Please use plain text.
Developer
massimo_olive
Posts: 235
Registered: ‎11-08-2010
My Device: Not Specified

Re: a little bit strange for sample-push-initiator

I am not sure why you are getting the first error on the device:

java.lang.Exception: Registration with Push API failed, caused by java.lang.IllegalStateException: no application instance.

 

The second one is probably because there are no active subscriptions?

Failed for: [(Id: push_all, Code: 2000)].

Please use plain text.
Contributor
congkinh
Posts: 13
Registered: ‎01-20-2012
My Device: 9780
My Carrier: SFR

Re: a little bit strange for sample-push-initiator

Thank you for your response. I've found out that there is a problem with the mobile operator by which I use the Internet service 3G. When I tested with a well-working mobile operator, it was OK.

 

Definitely, the second one relates to that there are no active subscriptions.

Please use plain text.
Contributor
lawillas
Posts: 17
Registered: ‎06-18-2012
My Device: Bold 9900
My Carrier: Globacom

Re: a little bit strange for sample-push-initiator

Please what value did you use in the Push initiator application URL field of the sample push enabled application? They say the URL must be accessible via the internet but since we installed the SDK on our local computer, how can our local computer be accessible from the internet. Please i really need urgent help
Please use plain text.
Contributor
congkinh
Posts: 13
Registered: ‎01-20-2012
My Device: 9780
My Carrier: SFR

Re: a little bit strange for sample-push-initiator

The example works as the following:

- there are two parts: one is server (servlet), one is a mobile application (on BlackBerry).

- the mobile application needs to access to the servlet so that the application can register information about BlackBerry device such as PIN, ... That's why they said that the server needed to be accessible from the Internet.

 

KInh

Please use plain text.
Contributor
lawillas
Posts: 17
Registered: ‎06-18-2012
My Device: Bold 9900
My Carrier: Globacom

Re: a little bit strange for sample-push-initiator

Yes I understand that part now but my question is how do we make the serverlet on our computer accessible from the internet?

Please use plain text.
Contributor
congkinh
Posts: 13
Registered: ‎01-20-2012
My Device: 9780
My Carrier: SFR

Re: a little bit strange for sample-push-initiator

You need to deploy your servlet on a server which can be accessible from the Internet. I have no idea about that, since I don't know anything about the network in your company.

 

If your company doesn't have any server which can be accessible from the Internet, you have to buy a host which supports Java, tomcat, ... Otherwise, you only can test mobile application on a simulator.

 

Kinh

Please use plain text.
Contributor
lawillas
Posts: 17
Registered: ‎06-18-2012
My Device: Bold 9900
My Carrier: Globacom

Re: a little bit strange for sample-push-initiator

Interesting...so that means at production stage, we need to get a server that has apache tomcat and also supports Java. Now I get it. You won't imagine that no one has mentioned this part nor is it even in the official documentation. One more thing though..does this mean that if i want to create my own push initiator program, it has to be in Java also. Because i don't see anything like support for other languages. Do you know anything bout that?
Please use plain text.
Contributor
congkinh
Posts: 13
Registered: ‎01-20-2012
My Device: 9780
My Carrier: SFR

Re: a little bit strange for sample-push-initiator

I'm not quite sure whether they support other languages. For us, we directly use examples given by RIM, since we already have servers running Java, tomcat.

 

Kinh

Please use plain text.
BlackBerry Development Advisor (Retired)
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: a little bit strange for sample-push-initiator

@lawillas - You can develop your server-side application is any language. It doesn't have to be Java. If you want to use the server-side push libraries then you do have to use Java but this is not a requirement. 

 

It is strongly recommended that you have a server side application that is publically/external accessible via the internet. This is so the devices downloading/installing your application can subscribe with your server. If there is no subscription to your server how will you know who to push to?

Please use plain text.