Drew B
Drew B

Reputation: 465

Business Objects 'bcm.jar' error when exporting Java app

I have been working on creating a simple Java desktop app using the RESTful API for Business Objects and have run into an issue. Whenever I run my app in Eclipse in works fine; whenever I export it as a 'Runnable Jar' and select the Library handling option 'Package required libraries into generated JAR' it works fine. However, whenever I try to export it using the Library handling option 'Extract required libraries into generated JAR' I get the following error after running the app:

 java.lang.NoClassDefFoundError: Could not initialize class com.businessobjects.bcm.BCM

I have the 'bcm.jar' file added under a 'res' Source Folder and have it added to the Build Path. At one point I added all the JARs under the 'SAP BusinessObjects' java folder, and external folder, but it still throws the error. The problem stems from this line of code:

 enterpriseSession = CrystalEnterprise.getSessionMgr().logon(userID, password, CMS, auth); 

Would anyone know why I am getting said error? I really want to use the Extract option as it will improve performance as my app becomes larger. Any help resolving this issue would be greatly appreciated :)

EDIT: I would be happy to provide clarification or further detail upon request!

Upvotes: 2

Views: 2002

Answers (2)

Brian Brian
Brian Brian

Reputation: 163

Seems this was introduced in SP04 and SAP has no intent of fixing it as the RESTful API wasn't designed to be used with Desktop apps.

Upvotes: 1

fhossfel
fhossfel

Reputation: 2181

Have you included the cryptojFIPS.jar? Leaving it out can cause the error.

Upvotes: 0

Related Questions