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.

Reply
New Contributor
dpw-ama
Posts: 7
Registered: ‎09-04-2012
My Device: Bold
My Carrier: AT&T
Accepted Solution

Cannot find symbol BAACore, BAAUtil, etc

Hi,

 

I'm trying to compile HelloWorld from http://docs.blackberry.com/tr-tr/developers/deliverables/16601/BlackBerry_Administration_API-Getting... and can't find the jar files containing com.rim.bes.bas.baa, com.rim.bes.bas.baa.BAACore, com.rim.bes.bas.baa.BAAServiceCore, etc. 

 

I'm not using Eclipse and just need to add the classpath to the files when manually compiling.  Does anyone know where I can find/download the jar files?

 

Thanks!

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: Cannot find symbol BAACore, BAAUtil, etc

Welcome to the forums.

 

I think you are in the wrong forum, I think you need to be here:

http://supportforums.blackberry.com/t5/BlackBerry-Enterprise-Server/bd-p/bes_dev

 

I will ask to see if this question can be moved.

Please use plain text.
New Contributor
dpw-ama
Posts: 7
Registered: ‎09-04-2012
My Device: Bold
My Carrier: AT&T

Re: Cannot find symbol BAACore, BAAUtil, etc

Ah ok. Thank you.
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Cannot find symbol BAACore, BAAUtil, etc

You need to first create the proxy files which will include these definitions. However, I would strongly recommend not using BAA and instead using BWS:

http://supportforums.blackberry.com/t5/BlackBerry-Enterprise-Server/Getting-Started-with-BlackBerry-...

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
dpw-ama
Posts: 7
Registered: ‎09-04-2012
My Device: Bold
My Carrier: AT&T

Re: Cannot find symbol BAACore, BAAUtil, etc

That did indeed solve the compiling issue.

 

Now I'm trying to run TestMain (@author gbeukeboom, so double thanks!) and get the error

Starting to intiialize credentials...
Exception in thread "main" javax.xml.ws.WebServiceException: Failed to access the WSDL at:
 https://mybas.dpw-ama.com/enterprise/admin/ws?wsdl. It failed with:
        sun.security.validator.ValidatorException: PKIX path building failed: sun.security
.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to
 requested target.

 

We have a self-signed certificate which I already added to the keystore per the Getting Started instructions.

 

Is there something else I should be doing?

 

Thanks for any suggestions you may have.

 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Cannot find symbol BAACore, BAAUtil, etc

What IDE are you using? Did you set up Apacke CXF to use the keystore? Did you set the keystore and password in the Runtime settings for your app?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
dpw-ama
Posts: 7
Registered: ‎09-04-2012
My Device: Bold
My Carrier: AT&T

Re: Cannot find symbol BAACore, BAAUtil, etc

My IDE is Textpad :Eek:  (We're obviously not a java shop)

 

I stored the key with

keytool -keystore BESks -import -file BEScert.cer

 

Though I don't see any "bes" entries listed when running >keytool -list -keystore cacerts

 

But when I try to re-store the key, it gives

keytool error: java.lang.Exception: Certificate not imported, alias <mykey> already exists

 

If I try to run the file with

java -Djavax.net.ssl.trustStore="C:\Program Files\Java\jre6\lib\security\BESks" TestMain

 

the error message becomes

Starting to intiialize credentials...
Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: HTTP t
ransport error: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateExcepti
on: No name matching WPBAS1.DPW-AMA.COM found

 

Thank you for your patience and ideas.

 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Cannot find symbol BAACore, BAAUtil, etc

I'd suggest trying to follow the guide with Eclipse to ensure the keystore is set appropriately. Apart from that it also seems that the URL being used is resolving to a different address than what is in the certificate. You may want to disable the CN check; here is an example I pulled from a Google search (this has not been validated):

http://efreedom.com/Question/1-7881122/CXF-RESTful-Client-Trust-Certs

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
dpw-ama
Posts: 7
Registered: ‎09-04-2012
My Device: Bold
My Carrier: AT&T

Re: Cannot find symbol BAACore, BAAUtil, etc

Thanks so much!  I tried modifying the suggestion in http://www.mkyong.com/webservices/jax-ws/java-security-cert-certificateexception-no-name-matching-lo..., which also worked.

 

Very much appreciate the quick replies too!

Please use plain text.