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
Posts: 14
Registered: ‎01-27-2011
My Device: Curve 8320
My Carrier: T-Mobile

jaas.config (No such file or directory): Device Registration Exception during subscriber authentication using JASS

Hi,

 

I am using sample apps (both server and client side) shipped with PUSH SDK.

 

My server side app is running successfully. Also, my push server is accessible publically. I installed sample push enabled application onto the actual device. As a next step, I am trying to register my app from device with the push server using following URL:

 

(Complete URL is not mentioned here) 

https://10.136.129.135:8443/sample-push-initiator/subscribe?username=ed&password=edg&appid=XXXX-XXXX...   

 

NOTE: I am using BIS as PPG

 

Above URL returned 10026 error. I checked subscription log created under BPSS directory. It is as follows:

 

 

***********************************************************************************************************

Feb 03,2011 13:39:16 INFO  - [net.rim.pushsdk.subscription.web.SubscriptionServlet.authenticateSubscriber()] - User could not be authenticated: username=yy, password=tt, appId=1406-1sna66611crhaam079, subType=SUBSCRIBE
Feb 03,2011 13:42:17 WARN  - [net.rim.pushsdk.subscription.web.SubscriptionServlet.checkEncoding()] - No character encoding was specified.  Defaulting to: UTF-8
Feb 03,2011 13:42:40 ERROR - [net.rim.pushsdk.subscription.web.SubscriptionServlet.authenticateSubscriber()] - SubAuthenticationException caught:
net.rim.pushsdk.subscription.auth.AuthenticationFailureException: java.lang.SecurityException: /C:/Program%20Files/BPSS/apache-tomcat-6.0.20/webapps/sample-push-initiator/WEB-INF/classes/jaas.config (No such file or directory)
 at net.rim.pushsdk.sampleapp.subscription.SampleCPAuthenticationService.authenticateUsingJAAS(SampleCPAuthenticationService.java:138)
 at net.rim.pushsdk.sampleapp.subscription.SampleCPAuthenticationService.authenticateSubscriber(SampleCPAuthenticationService.java:94)
 at net.rim.pushsdk.subscription.web.SubscriptionServlet.authenticateSubscriber(SubscriptionServlet.java:315)
 at net.rim.pushsdk.subscription.web.SubscriptionServlet.authenticateSubscriber(SubscriptionServlet.java:256)
 at net.rim.pushsdk.subscription.web.SubscriptionServlet.doPost(SubscriptionServlet.java:154)
 at net.rim.pushsdk.subscription.web.SubscriptionServlet.doGet(SubscriptionServlet.java:191)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
 at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.SecurityException: /C:/Program%20Files/BPSS/apache-tomcat-6.0.20/webapps/sample-push-initiator/WEB-INF/classes/jaas.config (No such file or directory)
 at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at java.lang.Class.newInstance0(Class.java:355)
 at java.lang.Class.newInstance(Class.java:308)
 at javax.security.auth.login.Configuration$3.run(Configuration.java:247)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
 at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
 at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
 at net.rim.pushsdk.sampleapp.subscription.SampleCPAuthenticationService.authenticateUsingJAAS(SampleCPAuthenticationService.java:134)
 ... 21 more
Caused by: java.io.IOException: /C:/Program%20Files/BPSS/apache-tomcat-6.0.20/webapps/sample-push-initiator/WEB-INF/classes/jaas.config (No such file or directory)
 at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:195)
 at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
 ... 35 more

***********************************************************************************************************

 

Also, I checked that jass config file actually exists under:

 

"C:/Program%20Files/BPSS/apache-tomcat-6.0.20/webapps/sample-push-initiator/WEB-INF/classes/"

A thing I could notice here is ths path: /C:/Program%20Files/BPSS/apache-tomcat-6.0.20/webapps/sample-push-initiator/WEB-INF/classes/jaas.config (No such file or directory)

I am not sure why does it start with: "/"???

Any pointers on this problem?

 

If there is a problem with JASS authentication,  What is an alternative method to implement 

authenticateSubscriber() method instead of 

authenticateUsingJAAS()?

If anyone can provide with code sample for this?

 


 

 

Highlighted
Developer
Posts: 235
Registered: ‎11-08-2010
My Device: Not Specified

Re: jaas.config (No such file or directory): Device Registration Exception during subscriber authentication using JASS

I wonder if it's because you installed the SDK into a directory with spaces?

 

I installed it into C:\ and it works fine. You installed it into C:/Program Files

 

If it's really giving you problems and you want to remove JAAS example from the picture comment ou the following bean in sample-push-initiator-context.xml:

 

<bean id="contentProviderAuthenticationService" class="net.rim.pushsdk.sampleapp.subscription.SampleCPAuthenticationService" />