cancel
Showing results for 
Search instead for 
Did you mean: 

IConnectionFactory Cannot be resolved.

Former Member
0 Kudos

Hi,

I am trying to connect to BI system. I am getting error like this.

IConnectionFactory cannot be resolved or is not a type ResultView.java

IBIConnection cannot be resolved or is not a type ResultView.java

IBIDataSet cannot be resolved or is not a type ResultView.java

IBIOlap cannot be resolved or is not a type ResultView.java

Even if i click the organise import i am not able import any package of that.

Do i need to add any jar file to the application if yes where it should be placed.

And where do i get those Jar file.

Can any one help me in this.

Regards,

H.V.Swathi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Swathi,

you have to include GenericConnector.jar for this.

right click on your project-> choose properties-->Java Build Path->Libraries and click on Add Jars and select GenericConnector.jar.

Regards,

Sandeep.

Former Member
0 Kudos

Hi Sandeep,

Thanks for ur reply. I did as u said. But still i am getting same errors can u tell what r all the procedures i have to follow next.

Regards,

H.V.Swathi

Former Member
0 Kudos

Hi Swathi,

IF you are still getting this problem I think you might have forgot to import the class though it is in your class path..

import com.sapportals.connector.connection.IConnectionFactory;

try this and let me know if you have still problems.

Regards,

Sandeep.

Former Member
0 Kudos

Thanks for ur help.

I wa able to solve that error, but while rebuild the project i am getting error like this.

Missing required library: 'LocalDevelopmenttestbisap.com/lib/connector.jar'.

Missing required library: 'LocalDevelopmenttestbisap.com/lib/GenericConnector.jar'.

The project was not built due to classpath errors (incomplete or involved in cycle).

what might be the problem.

Regards,

H.V.Swathi

Edited by: H.V Swathi on Dec 29, 2008 12:30 PM

Former Member
0 Kudos

Hi Swathi,

I think you are trying from web dynpro application,.. so the jar file is deleting from the classpath when you rebuild the project.

Please follow the steps below.

1) Right click on usedDCs (Expand your project-->DC MetaData->DC Defenition-) select Add Used DC in the dialog expand the track and expand sap.com_SAP_JTECHS1 and select tc/conn/connectorframework choose the option build time deploytime and runtime and click on finish.

the above one solves the IConnectionFactory problem.

as you are connecting with BI systems you need to include following in used dc as above.

From BI_UDI:

􀂾 bi/mmr/cwm_1.0_source

􀂾 bi/sdk/core

􀂾 bi/sdkresultset

From SAP-JEE:

􀂾 j2eeca

Regards,

Sandeep.

Former Member
0 Kudos

Hi,

Thanks for ur help.I am able to run the application but when i enter the query in text edit, and give submit it is showing this error.

The initial exception that caused the request to fail, was:

java.lang.NullPointerException

at bitest.ResultView.getResult(ResultView.java:195)

at bitest.wdp.InternalResultView.getResult(InternalResultView.java:128)

at bitest.ResultView.onPlugFromSelectionIn(ResultView.java:273)

at bitest.wdp.InternalResultView.wdInvokeEventHandler(InternalResultView.java:138)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)

..

what might be the problem. Querry which i wrote is this

SELECT

[Measures].MEMBERS ON AXIS(0) ,

NON EMPTY [0VENDOR].MEMBERS ON AXIS(1)

FROM [0PUR_C01/0PUR_C01_DB_Q04]

I am getting error in this line

connection =
	(IBIConnection) connectionFactory.getConnectionEx(null);

Regards,

H.V.Swathi

Edited by: H.V Swathi on Dec 30, 2008 11:24 AM

Former Member
0 Kudos

Swathi,

The Problem here is you are passing null value as a parameter to the method getConnectionEx(). you should pass parameter of type IConnectionSpec.

Regards,

Sandeep.

Former Member
0 Kudos

Swathi,

Go through the below document.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60f35908-ecd4-2910-6c89-e75e1054...

make sure that you ar giving corerect JNDI look up name as per the system that you are connecting.

for EX:

connectionFactory =

(IConnectionFactory) initctx.lookup(

"deployedAdapters/SDK_XMLA/shareable/SDK_XMLA");

check connectionFactory which should not be null.

Regards,

Sandeep.

Former Member
0 Kudos

Hi,

I tried to print the value of connectionFactory like this

wdComponentAPI.getMessageManager().reportSuccess(connectionFactory.toString());

i am getting this value in the screan.

com.sap.ip.bi.sdk.dac.connector.xmla.XmlaConnectionFactory@14d6e9a

Is it correct what might be the problem i am reffering the same document which u have specified.

Can u help me to solve this.

Regards,

H.V.Swathi

Former Member
0 Kudos

Swathi,

print connectionFactory.getConnectionEx(null); This might be giving null.

Regards,

Sandeep.

Former Member
0 Kudos

Thanks for ur help.yes that is giving null can u help me in this. what changes has to be done for this.

Regards,

H.V.Swathi

Former Member
0 Kudos

Hi

Swathi,

Try out with System alias Name.

IConnectorService connectorService;

IConnectorGatewayService connectorGatewayService;

IConnection connection;

try {

connectorService =

(IConnectorService) PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);

connectorGatewayService =connectorService.getIConnectorGatewayService();

ConnectionProperties connectionProperties =

new ConnectionProperties(

request.getLocale(),

request.getUser());

connection =connectorGatewayService.getConnection("System Alias Name",connectionProperties);

IBIOlap olap = ((IBIConnection) connection).getOlap();

Good luck,

Regards,

Sandeep.