Skip to Content
author's profile photo Former Member
Former Member

BI Java SDK ClassCastException

I am trying to run the BI Java SDK in a standalone environment and I am getting a ClassCastException when I try calling the getCubes() method.

Error:

Connection [com.sap.ip.bi.sdk.dac.connector.xmla.XmlaConnection] Supports Olap:

true

IBIOlap [com.sap.ip.bi.sdk.dac.connector.xmla.XmlaOlap] Supports BW: true

Feb 22, 2005 5:13:54 PM ...ector.xmla.impl.Connection.connectMdr [Thread[main,5

,main]] Path: Entering method

Feb 22, 2005 5:13:55 PM ....CommonConnection.OlapMDRConnection() [Thread[main,5

,main]] Path: Entering method

Feb 22, 2005 5:13:55 PM ...nector.impl.BIMDRConnection.connect() [Thread[main,5

,main]] Path: Entering method

Feb 22, 2005 5:13:55 PM ...ction.getMofPackageNamesResponsible() [Thread[main,5

,main]] Path: Entering method

Feb 22, 2005 5:13:55 PM ...dk.dac.connector.impl.BIMDRConnection [Thread[main,5

,main]] Path: Exiting method

Feb 22, 2005 5:13:55 PM ...etRepositoryServer(IRepositoryServer) [Thread[main,5

,main]] Path: Entering method

Feb 22, 2005 5:13:55 PM ...dk.dac.connector.impl.BIMDRConnection [Thread[main,5

,main]] Path: Exiting method

Feb 22, 2005 5:13:55 PM ...dk.dac.connector.impl.BIMDRConnection [Thread[main,5

,main]] Path: Exiting method

Feb 22, 2005 5:13:56 PM ...dk.dac.connector.xmla.impl.Connection [Thread[main,5

,main]] Path: Exiting method

java.lang.ClassCastException

at com.sap.ip.bi.sdk.dac.connector.olap.OlapMDRConnection.<init>(OlapMDR

Connection.java:259)

at com.sap.ip.bi.sdk.dac.connector.olap.CommonMDRConnection.<init>(Commo

nMDRConnection.java:87)

at com.sap.ip.bi.sdk.dac.connector.xmla.impl.XmlaMDRConnection.<init>(Xm

laMDRConnection.java:65)

at com.sap.ip.bi.sdk.dac.connector.xmla.impl.Connection.connectMdr(Conne

ction.java:251)

at com.sap.ip.bi.sdk.dac.connector.olap.CommonConnection.assertConnected

ToMDR(CommonConnection.java:120)

at com.sap.ip.bi.sdk.dac.connector.olap.CommonConnection.getTopLevelPack

age(CommonConnection.java:113)

at com.sap.ip.bi.sdk.dac.connector.xmla.XmlaOlap.getTopLevelPackage(Xmla

Olap.java:128)

at com.sap.ip.bi.sdk.dac.connector.impl.BIOlap.getQueryFactory(BIOlap.ja

va:43)

at com.sap.ip.bi.sdk.dac.connector.xmla.impl.Connection.getObjectFinder(

Connection.java:1233)

at com.sap.ip.bi.sdk.dac.connector.xmla.XmlaOlap.getObjectFinder(XmlaOla

p.java:167)

at Test.run(Test.java:123)

at Test.main(Test.java:247)

Code:

// Setting up the connectionDescriptor.

mcf = new XmlaManagedConnectionFactory();

cf = (IConnectionFactory) mcf.createConnectionFactory();

cs = cf.getConnectionSpec();

....

// DataSource

cs.setPropertyValue(XmlaConnectionConstants.DATA_SOURCE.toString(),"analysis");

// Statefulness

cs.setPropertyValue(XmlaConnectionConstants.STATEFULNESS.toString(),"false");

// Language

cs.setPropertyValue(XmlaConnectionConstants.LANGUAGE.toString(),"EN");

// Establishing the connection.

// The IBIOlap interface provides an entry point to access

// metadata and execute queries.

IBIConnection connection = (IBIConnection) cf.getConnectionEx(cs);

IBIOlap olap = connection.getOlap();

System.out.println("Connection ["connection.getClass().getName()"] Supports Olap: "+connection.supports(IBIConnection.Supports.OLAP));

System.out.println("IBIOlap ["olap.getClass().getName()"] Supports BW: "+olap.supports(IBIOlap.Supports.BW_CAPABILITIES));

List l = olap.getCube();

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 04:25 PM

    dear steve,

    just mail to this id srinis_sap@yahoo.com. i could send u the bi java program for getCubes(), i tried and got successed for the task in listing all cubes from our bw server 3.5 with NW'04 component and WAS 6.40. hope the program might help you. have fun!

    rgds,

    srinu...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.