The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

IServicecall find methos problem

SOLVED
Go to solution
Highlighted
Siekierko Przem
Super Collector

IServicecall find methos problem

Hi !!

When I’m trying to use findAllServicecall() method or any other find method from IServicecall class then sd throwing this exception:

Failed reading response from the server.
Nested exception is:
com.hp.ifc.io.AppStreamException: Unable to deserialize an array of objects.
at com.hp.ifc.net.itp.AppItpClient.failConnection(Unknown Source)
at com.hp.ifc.net.itp.AppItpClient.readResponse(Unknown Source)
at com.hp.ifc.net.itp.AppItpClient.execute(Unknown Source)
at com.hp.ifc.net.itp.AppItpClient.remoteInvoke(Unknown Source)
at com.hp.ifc.net.itp.AppItpProxy.__objectInvoke(Unknown Source)
at com.hp.ifc.apiserver.ps.PApiServerEntity.find(Unknown Source)
at com.hp.ifc.api.ApiHome.trueFindAllValues(Unknown Source)
at com.hp.ifc.api.ApiHome.findValues(Unknown Source)
at com.hp.itsm.api.impl.ApiServicecallHome.findAllServicecall(Unknown Source)

And it happened only when I'm trying to use find methods form IServicecall class, for example when I'm using IConfigurationItem everything is ok.

This is code with I'm trying to run:

import com.hp.itsm.api.ApiSDSession;
import com.hp.itsm.api.interfaces.*;

public class SDTest {

private ApiSDSession session45;
/** Creates a new instance of SDTest */
public SDTest() {
try
{
session45 = ApiSDSession.openSession("server", "user", "password");

IServicecallHome sc_hm = session45.getServicecallHome();
IServicecall sc[] = sc_hm.findAllServicecall();
System.out.println(sc.length);

session45.closeConnection();
}catch(Exception e)
{
e.printStackTrace();e.getMessage();
}
}

public static void main(String args[]) {
new SDTest();
}
}

I checked versions of sd and client libraries and those this same versions:

Client web-api.jar liblary version:

C:\HP\ServiceDesk\WebHPSD\lib>java -cp web-api.jar com.hp.ifc.sys.AppVersionInfo
Acronym: SD
Version: 4.5.0588.1706 (SP17)
Company: hp OpenView
Copyright: Copyright (c) 2004 Hewlett-Packard Development Company, L.P. All
Rights Reserved.
Description: service desk is a family member of the hp OpenView suite.
ProductID: B4321
ProductName: hp OpenView service desk

SD Server version after running sd_version.bat from bin folder:

Acronym: SD
Version: 4.5.0588.1706 (SP17)
Company: hp OpenView
Copyright: Copyright (c) 2004 Hewlett-Packard Development Company, L.P. All
Rights Reserved.
Description: service desk is a family member of the hp OpenView suite.
ProductID: B4321
ProductName: hp OpenView service desk

Anyone any ideas?
3 REPLIES
Mike Bush
Honored Contributor
Solution

Re: IServicecall find methos problem

How many calls have you got? This code is trying to retrieve them ALL? Its possible an underlying "out of memory" has led to this re-interpreted error?

Can you try building a "Where" clause to just retrieve a small number of calls and if that works build up from there?
Siekierko Przem
Super Collector

Re: IServicecall find methos problem

I have about 62000 servicecalls.
And befere I install sd with that parameters I get "out of memory exception":
sd_serverservice.exe -install "hp OpenView service desk 4.5 server" DEFAULT -XX:MaxNewSize=64M -XX:NewSize=64M -Xms200M -Xmx1000M -Djava.class.path="%SD_SERVERHOME%lib\classloader.jar" "-Duser.dir=%SD_SERVERHOME%\" -start com.hp.startup.Bootstrap -params com.hp.ifc.bus.AppServer -stop com.hp.startup.Bootstrap -method shutdown -params com.hp.ifc.bus.AppServer -current "%SD_SERVERHOME%\"

When I use "Where" clause and retrive small number of servicecalls it works.

When I chcek my project code i saw that I forgot to add "Organization" criterium, and it try to retrive about 50000 servicecalls, so that was the problem. And after adding this criterium evrything work perfect, so thank you very much for help.

I was trying to get this same numer of servicecalls(about 50000) using "hp OpenView service desk 4.5 client" and this aplication can to that. Are they using other library then webapi ???
Siekierko Przem
Super Collector

Re: IServicecall find methos problem

I was trying to retrive to many Servicecalls at once. When i retrive small parts of records everything is ok.
//Add this to "OnDomLoad" event