cancel
Showing results for 
Search instead for 
Did you mean: 

getConnectionSpec() returns NULL

Former Member
0 Kudos

Hi,

I am using BI SDK to connect from Web Dynpro DC to BW system.

I have a external library created, BIWrapper.jar that performs the BW connection.

I have created a Web Dynpro DC project and uses the BIWrapper.jar as external library to perform the BW connection. Once I deploy and activate the Web Dynpro DC in NWDI, it gets deploy to the WAS server.

I am running into problems in the code of BIWrapper.jar whenever it is performing a BW connection.

private void connect()

{

try

{

Context initctx = new InitialContext();

IConnectionFactory cf=null;

try

{

cf = (IConnectionFactory)initctx.lookup("deployedAdapters/SDK_XMLA/shareable/SDK_XMLA");

}

catch(Exception e_jndi)

{

}

IConnectionSpec cs = cf.getConnectionSpec();

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

olap = connection.getOlap();

if(olap != null)

isConnected = true;

}

catch(Exception e)

{

e.printStackTrace();

if(e instanceof IBaseException)

* addError("Error in BITable connect method: " + ((IBaseException)e).getNestedLocalizedMessage());*

else

* addError("Error in BITable connect method: " + e.getMessage());*

}

}

The error is java.lang.nullpointerexception when it execute the code at

IConnectionSpec cs = cf.getConnectionSpec();

All the BI SDK settings have been correctly setup in Visual Admin.

Any help would be useful...

Thanks.

-mike

Edited by: Mike Lee on Apr 28, 2008 9:36 AM

Edited by: Mike Lee on Apr 28, 2008 9:39 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

It may be because of following two reasons.

1. Your datasource is not running currently. If so go to nwa and start it.

2. your string "deployedAdapters/SDK_XMLA/shareable/SDK_XMLA" for lookup does not match with that of the datasource or alias you are using.

Regards,

Srinivasan Subbiah

Former Member
0 Kudos

Hi,

I have checked that the datasource is running and the path

"deployedAdapters/SDK_XMLA/shareable/SDK_XMLA" is correct.

Just did two experiments :

If I build and deploy via NWDI to a WAS server (ABAP+JAVA), it did not work.

If I build and deploy via my NWDS to a WAS server (JAVA), it WORKS!

This is really strange.

any help would be appreciated.

thanks.

mike

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi Mike

May be the IConnectionFactory object is null,check out your look up string may be some thing is not matching in your look up string.

Regards

kalyan