Introduction
CSSAPI is very interesting tool for me, because I'm a java developer and possibility of using Java library allows to create more flexible integration solution. I have to create an extension for Hyperion Planning in last project which uses an integrated security with Shared Service. I used CSSAPI in my previous projects, but it only used authentication module, therefore I could easy debug and test it using mock libraries and then deploy it on the HSS server. But now I have to maintain user and groups, therefore I need a direct access to Hyperion Shared Services from my desktop where my IDE installed ).
Solution
I have read many posts about connecting to HSS through CSSAPI but some of it were deprecated (used older version of CSS API), other didn't contains full dependency list for CSSAPI..
What do you need at desktop?
1. Required jars
All documents and posts advice to add
epm_j2se.jar and
css.jar to CLASSPATH and everything will fine. I get all library dependencies from
epm_j2se.jar and get approximately
200 jar files , oh its not good, therefore a remove all unused jar and get minimum library list for CSSAPI.
These jars from the Hyperio EPM (required minimum to exclude java.lang.ClassNotFoundException ) :
Some libraries may have other versions...
2. Environment
CSSAPI need
EPM_ORACLE_HOME,EPM_ORACLE_INSTANCE for example:
EPM_ORACLE_HOME=c:\Oracle\Middleware\EPMSystem11R
EPM_ORACLE_INSTANCE=c:\Oracle\Middleware\user_projects\epmsystem1
variables, or you will get exception
3. Configuration file
(for EPM 11.1.2.3.x) Copy configuration file from EPM server to desktop in the specified location
%EPM_ORACLE_INSTANCE%\..\config\foundation\11.1.2.0\reg.properties
This file contains configuration
for JDBC connection to EPM Registry
It is possible to get configuration file from URL /interop/framework/getCSSConfigFile but
only in previous CSS.jar version.
This method is deprecated in CSS.jar 11.1.2.3.500
Therefore configuration file is required.
Try №1
lets try to execute simple code, which gets instance for CSSSystem
1
2
3
4
5
6
7
8
9
10
11
12
13
| private CSSSystem cssSystem=null;
private HashMap localContext=new HashMap(2);
public void main(String[] args)
{
try
{
cssSystem=CSSSystem.getInstance(localContext,System.getenv("EPM_ORACLE_HOME")+"../logs");
}catch(CSSException e)
{
e.printStackTrace();
}
}
|
After run I got an error:
EPMCSS-00001: Failed to initialize EPM Shared Services security instance. Component SYSTEM9/FOUNDATION_SERVICES_PRODUCT/SHARED_SERVICES_PRODUCT is null in EPM System Registry. Verify EPM System Registry configuration.
It means that CSSAPI can't get data from Shared Services DB, usually in cause of wrong database connection configuration in
reg.properties file (user credentials or server name ). But after debuging I excluded these reason and could not determine error origin.
At last I've got it...
Try №2
The reason was in sql jdbc driver, which Hyperion EPM uses from version 11.1.2.3.
It is an
weblogic.jdbc (in my case weblogic.jdbc.sqlserver.SQLServerDriver)
These drivers have
limitation, and can't be used on remote desktop...
Therefore I reconfigure
reg.properties files for using standard JDBC driver:
jdbc.url = jdbc\:sqlserver\://SERVER:PORT and etc
jdbc.driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
And executed my sample code
1
2
3
4
5
6
7
8
9
10
| private CSSSystem cssSystem=null;
private HashMap localContext=new HashMap(2);
public void main(String[] args){
try{
cssSystem=CSSSystem.getInstance(
localContext,System.getenv("EPM_ORACLE_HOME")+"../logs");
}catch(CSSException e){
e.printStackTrace();
}
}
|
Everything worked fine, no error, than I continued developing my project
P.S.
I'm going to devote some next posts to CSSAPI (authentication and maintain users and groups)