If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Cognos SDK Exception- ArrayIndexOutofBound

Started by amishjashah, 26 Feb 2012 12:43:19 PM

Previous topic - Next topic

amishjashah

Hi,
  I am getting below error while executing Cognos Reports. It fails while getting the Cognos Connection itself.

Our App is integrated with Cognos Server using Cognos SDK. Cognos Reports work fine when executed normally, however during the performance testing using the performance tool, it gives below error. please Suggest.

2012-02-26 20:07:00 HKT [http-30001-Processor48] ERROR com.cognos.org.apache.axis.utils.BeanUtils - Internal Error occurred while build the property descriptors for com.cognos.developer.schemas.bibus._3._package
java.lang.ArrayIndexOutOfBoundsException
   at java.lang.System.arraycopy(Native Method)
   at com.cognos.org.apache.axis.description.TypeDesc.getFields(TypeDesc.java:196)
   at com.cognos.org.apache.axis.description.TypeDesc.getFields(TypeDesc.java:190)
   at com.cognos.org.apache.axis.utils.BeanUtils.processPropertyDescriptors(BeanUtils.java:260)
   at com.cognos.org.apache.axis.utils.BeanUtils.getPd(BeanUtils.java:104)
   at com.cognos.org.apache.axis.description.TypeDesc.getPropertyDescriptors(TypeDesc.java:445)
   at com.cognos.org.apache.axis.encoding.ser.BeanSerializerFactory.<init>(BeanSerializerFactory.java:89)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
   at com.cognos.org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(BaseSerializerFactory.java:258)
   at com.cognos.org.apache.axis.client.Call.registerTypeMapping(Call.java:2121)
   at com.cognos.developer.schemas.bibus._3.ContentManagerServiceStub.createCall(ContentManagerServiceStub.java:5728)
   at com.cognos.developer.schemas.bibus._3.ContentManagerServiceStub.logon(ContentManagerServiceStub.java:6233)
   at com.jpmchase.zpcclass.dhanush.web.controller.cognos.helper.CognosLogin.getCognosLogin(CognosLogin.java:47)

ykud

How do you call the report from SDK (maybe list a code sample)?
Are you sure you fill all the required prompts?

What performance testing tool are you using?

amishjashah

#2
Sample Connection Code :

//ctx=createXmlApplicationContext(XA_CONTEXT_XML);
//Logon  logon = (Logon)ctx.getBean("cognosLoginCredentials");
long t = System.currentTimeMillis();
log.info("Cognos login started " + t + "ms");
Logon logon = BusinessServiceLookup.getInstance().getLogon();
logon.setLogon(logon);

connection.connectToCognosServer(logon.getServerUrl());
if(logon.getServerUrl()  != null)
{
log.info("LogonURL " +logon.getServerUrl() );
}
else
{
log.info("Server URL is null" );
}

if(logon.getCognosCredentialString()  != null)
{
log.info("LogonCognosCredentials" + logon.getCognosCredentialString() );
}
else
{
log.info("LogonCognosCredentials is null" );
}
log.info("Before XmlEncodedXML" );
XmlEncodedXML xmlEncoded = new XmlEncodedXML(logon.getCognosCredentialString());
log.info("After XmlEncodedXML" );
log.info("Before Calling logon " );
connection.getCMService().logon(xmlEncoded, new SearchPathSingleObject[] {});
log.info("Cognos login total time " + (System.currentTimeMillis() - t) + "ms" );
log.info("Connection created ...");


Tool Used for Performance Testing - Load Runner

RA:
Added correct tags

ykud

Are you able to run the reports with this code at all or this error just starts appearing when a certain load limit is reached?

Did you check the sample LR scripts for cognos?
http://www.ibm.com/developerworks/data/library/cognos/page406.html

jackmaster

#4
Hello amishjashah,

   Did you find the root cause of this, I'm having the same problems with Cognos SDK. When I connect to Cognos Server with one connection, it works just fine but when I try to create multi-thread connections to Cognos Server, this error happened. But it seemed do not effect my application, it just thrown out the Exception. But anyway, i want to find out the root cause.
   Thanks in advance.

asin

The reason is described here: http://www-01.ibm.com/support/docview.wss?uid=swg21341163

in short,
Quoteaxis has a number of singletons that need to be initialized properly before it can be used in a multi-threaded environment. In order to initialize axis' singletons properly, create CognosReportNetPortType and make one simple query before creating any multi-thread handling subsequent requests.

I've used ContentManagerService_ServiceLocator query instead of CognosReportNetPortType, and now multi-threaded part works fine.