IBM Support

SDK - Compile Error on package com.cognos.developer.schemas.bibus._2 does not exist

Question & Answer


Question

Why is there a compilation error from the Cognos SDK API ?

Cause

Attempting to compile a Java Sample or source code provided with the IBM Cognos Product, or with any Technote document may generate a " package does not exist " error.

The error message will indicate which package cannot be located depending on the version of IBM Cognos product referenced within the Sources.

For Cognos Reportnet (CRN) the compile / execution command : Javac <myclass>.java
will produce the following error:

<myclass>.java:<line #>: package com.cognos.developer.schemas.bibus._2 does not exist

For IBM Cognos version 8.x.x / 10.x.x or 11.x.x.x the command : Javac <myclass>.java
will produce the following error:

<myclass>.java:<line #>: package com.cognos.developer.schemas.bibus._3 does not exist

More errors can follow this error , as the compiler goes through the source code.

Answer

The library Jar files distributed with the IBM Cognos products are not in the classpath , is the usual problem.

Ensure that the jar files in <IBMCognos Install>/sdk/java/lib are included in the classpath before executing the javac compiler command.
Please do be careful not add all jar files , that will be incorrect to do. See the first referenece below regarding SET1 (obsolete) , SET2 and SET3 information.

An example of a valid classpath setup can be found in any of the java sample build files included with the SDK product in the Java folder.
Review the build-samples.bat or build-samples.sh / build.bat or build.sh in the directories

For instance <IBMCognos Install>/sdk/java/build-samples.bat or <IBMCognos Install>/sdk/java/build-samples.sh files contain the right libraries and Classpath locations.

It is important to note that the versions of IBM Cognos do have a different bibus version entry.
Using incorrect libraries between the compilation of application code , and the run-time environment targets will also cause this error to appear.
Referencing old libraries in the sources, will compile this compile for use against a higher version server

See the referenced Technotes below for further information on how Environment and Application Source code needs to be modified to work in IBM Cognos Versions.

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Software Development Kit","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.2.2;10.2.1;10.2;10.1.1;10.1;8.4.1","Edition":"Edition Independent","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SUNSET","label":"PRODUCT REMOVED"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"ReportNet","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}},{"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Software Development Kit (SDK) v11x","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"Edition Independent","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

1019559

Document Information

Modified date:
24 February 2020

UID

swg21339634