WebSphere Portal Server - htm.query(.,.,.) is not returning data

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > December 2007 > htm.query(.,.,.) is not returning data





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author htm.query(.,.,.) is not returning data

2007-12-05, 7:35 am

The problem faced in development of the portlet UI is noted below. <br />
<br />
From portal web client we are trying to get the human tasks generated on a remote process server, using HumanTask APIs. The steps followed are:<br />
<p />
¨ Obtain the remote HumanTaskManager instance. (successful)<br />
<br />
¨ Execute the method htm.query(“..”, “..”,..) (shown below) to get the task ids of human task. <br />
<p />
<br />
o The query used is: QueryResultSet resultSet = htm.query("TASK.TKIID","(TASK.STATE = TASK.STATE.STATE_READY OR TASK.STATE = TASK.STATE.STATE_CLAIMED) AND TASK.KIND = TASK.KIND.KIND_PARTICIPATING AND WORK_ITEM.REASON = WORK_ITEM.REASON.REASON_POTENTIAL_OW
NER ","TASK.TKIID", (Integer)null, (TimeZone)null);<br />
<p />
<br />
¨ Variable <b>“resultSet” returned has size 0</b>, even though tasks are there in BPEDB.<br />
<p />
<br />
We have also added the required jars –(task137650.jar, taskapi.jar)- to the Web-App libraries.<br />
<p />
<br />
Enviornment: Websphere Portal Server 6.0, Websphere Process Server 6.0.0.2<br />
<p />
<br />
<b>Another point</b> to be noted is that the query is returning the required resultSet when it is executed in a web project running on the process server. Here both remote and local access is working.<br />
<p />
<br />
Please help us in finding a solution to the same.
harish.g.nair@accenture.com

2007-12-18, 7:36 am

As I am trying to access HumanTaskManagerHome from a websphere portal thats installed on top of BPC configured websphere process server, the code for getting the HumanTaskManagerHome was returning the local HumanTaskManagerHome instance instead of the rem
ote HumanTaskManagerHome instance.<br />
<br />
The code i used was similar to this one:<br />
<br />
try{<br />
System.out.println("getHumanTaskHome()- access HumanTaskManagerHome");<br />
//Obtain the default initial JNDI context<br />
Hashtable env = new Hashtable();<br />
env.put(Context.PROVIDER_URL, "corbaloc:iiop:" + serverIp + ":" + port);<br />
InitialContext initialContext = new InitialContext(env);<br />
System.out.println("getHumanTaskHome()- got initialContext"+InitialContext.PROVIDER_URL);<br />
<br />
//Lookup the home interface of the HumanTaskManager bean<br />
Object result = initialContext.lookup("ejb/HumanTaskManagerHome");<br />
System.out.println("got lookup: "+result);<br />
<br />
//Convert the lookup result to the proper type<br />
HumanTaskManagerHome taskHome = (HumanTaskManagerHome)javax.rmi.PortableRemoteObject.narrow(result,HumanTaskManagerHome.class);<br />
System.out.println("getHumanTaskHome()-got htmHome"+taskHome);<br />
<br />
//Access the interface of the session bean<br />
htm = taskHome.create();<br />
System.out.println("HTM home created");<br />
<br />
}catch(Exception e){<br />
System.out.println("Exception message: "+e.getMessage());<br />
System.out.println("exception getfHumanTaskManager():"+e);<br />
}<br />
<p />
Its really surprising that code was looking at initial context. After updating to portal server 6.0.1.1 the issue fo context got solved. But now I am getting this exception which i will post as new thread.<br />
<br />
Exception is:<br />
exception: javax.naming.NameNotFoundException: Context: serverip-cell/nodes/Node01/servers/server1, name: ejbs/DefaultSession: First component in name ejbs/DefaultSession not found. <strike><b>Root exception is org.omg.CosNaming.NamingContextPackage.NotFo
und: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0</b></strike>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com