Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

repository_id missing in stub. Please have a look at the message and help me out

2 views
Skip to first unread message

Vijay

unread,
Jan 20, 2002, 9:47:25 PM1/20/02
to
Dear all,

I need your immediate help. I have some strange problem in my
CORBA progam implemented with Visibroker for Java.

I am running a service called "GenerateService" to run a clustering
algorithm.

I also running an "Administrative Service" which helps in managing the
communication between my 4 agents.

All my agents and services had no problem when I start them

Following are the respective detailed outputs from
System.out.println() when I start the services.


--------------------------------------------------------

//COMMAND FOR RUNNING THE ADMINISTRATIVE SERVICE


PROMPT> vbj -DSVCnameroot=NameService coSift/admAgent/AdmAgent

admObj:Stub[repository_id=IDL:coSift/globalIDL/AdmService:1.0,key=ServiceId[serv
ice=/event_service_poa,id={4 bytes:
(0)(0)(0)(0)}]]::::::::::;:::::::::0


rootPOA:POA[name=/,fullname=/]::::::::::1

policies:[Lorg.omg.CORBA.Policy;@b6a35d::::::::::2

mypoa:POA[name=event_service_poa,fullname=/event_service_poa]::::::::::::::3

rootObj:Stub[repository_id=IDL:omg.org/CosNaming/NamingContextExt:1.0,key=Persis
tentId[repId=IDL:omg.org/CosNaming/NamingContextExt:1.0,objectName=2,poaName=/CO
NTEXT_POA_NameService]]:::::::::::::4

rootctx:Stub[repository_id=IDL:omg.org/CosNaming/NamingContextExt:1.0,key=Persis
tentId[repId=IDL:omg.org/CosNaming/NamingContextExt:1.0,objectName=2,poaName=/CO
NTEXT_POA_NameService]]:::::::::::5

ctx1:Stub[repository_id=IDL:omg.org/CosNaming/NamingContextExt:1.0,key=Persisten
tId[repId=IDL:omg.org/CosNaming/NamingContextExt:1.0,objectName=3,poaName=/CONTE
XT_POA_NameService]]::::::::::::::::7

component[0]:org.omg.CosNaming.NameComponent@13f8e4b::::::::::::::8

[bind] DirectedCom object is bound with name
adm_agent.sifter/DirectedCom
myPOA:POA[name=event_service_poa,fullname=/event_service_poa]:::::::::::::::::::
:x

name:::::::::::::::::adm_agent
[bind] AdmService object is bound with name
adm_agent.sifter/AdmService


create channel ecadm
channel name ecadm bind with ior
created adm event channel:
IOR:000000000000003249444c3a6f6d672e6f72672f436f73457
6656e744368616e6e656c41646d696e2f4576656e744368616e6e656c3a312e30000000000000010
00000000000007c000102000000000d3133342e36382e3134302e3200009da40000005c00504d430
00000000000003249444c3a6f6d672e6f72672f436f734576656e744368616e6e656c41646d696e2
f4576656e744368616e6e656c3a312e3000202000000006656361646d0020200000000c2f7065727
3697374656e740000000000
Obtained push consumer:
Stub[repository_id=IDL:omg.org/CosEventChannelAdmin/Prox
},sec=0,usec=0]]
Created model: coSift.agent.PushModel@34d5e1
Connecting...
create channel ecsift
channel name ecsift bind with ior
create channel ecusr
channel name ecusr bind with ior

//end of output for ADM SERVICE

-------------------------------------------------------------
//COMMAND FOR RUNNING THE GENERATE SERVICE

PROMPT> vbj -DSVCnameroot=NameService coSift/util/GetCentroids

gsObj:Stub[repository_id=*,key=ServiceId[service=/event_service_poa,id={4
bytes:
(0)(0)(0)(0)}]] WHY THE "REPOSITORY_ID" IS MISSING?
::::::::::::::::::;0

rootPOA:POA[name=/,fullname=/]::::::::::1

policies:[Lorg.omg.CORBA.Policy;@1a12c77::::::::::2

mypoa:POA[name=event_service_poa,fullname=/event_service_poa]::::::::::::::3

rootObj:Stub[repository_id=IDL:omg.org/CosNaming/NamingContextExt:1.0,key=Persistent
Id[repId=IDL:omg.org/CosNaming/NamingContextExt:1.0,objectName=2,poaName=/CONTEXT_POA_
NameService]]:::::::::::::4

rootctx:Stub[repository_id=IDL:omg.org/CosNaming/NamingContextExt:1.0,key=Persistent
Id[repId=IDL:omg.org/CosNaming/NamingContextExt:1.0,objectName=2,poaName=/CONTEXT_POA_
NameService]]:::::::::::5

hostname:sifter:::::::::::6

ctx1:Stub[repository_id=IDL:omg.org/CosNaming/NamingContextExt:1.0,key=PersistentId
[repId=IDL:omg.org/CosNaming/NamingContextExt:1.0,objectName=4,poaName=/CONTEXT_POA_NameService]]
::::::::::::::::7

component[0]:org.omg.CosNaming.NameComponent@183cb87::::::::::::::8

serviceID:Util.sifter/GenerateService:::::::::::::::::::::::::9

[bind] getcentroids object is bound with name
Util.sifter/GenerateService

//end of output

--------------------------------------

But when the user excecutes the system, one of my agent (user agent)
tries to get the service of
Generate Service (to do clustering)


HERE IS THE PART OF CODE THAT TRIES TO GET THE GENERATESERVICE

//
//

public void makeThesaurus(String n, double ratio, double threshold,
String wordtouse, int numbertotrain,String[] temp)
{
Centroid centroid = null;

System.out.println("String n::::::::::::::::::::"+n);
System.out.println("double::::::::::::::::::::::"+ratio);
System.out.println("double::::::::::::::::::::::"+threshold);
System.out.println("numbertotrain:::::::::::::::"+numbertotrain);
System.out.println("String[] temp.size::::::::::"+temp.length);
System.out.println("centroid::::::::::::::::::::"+centroid);

//All the above lines returned a valid inputs


try{

//ADMINISTRATIVE SERVICE
org.omg.CORBA.Object
admObj=rootCtx.resolve(NamingUtil.to_name("adm_agent.sifter/AdmService"));

if (admObj!=null)
{
System.out.println("admObj"+":"+admObj);
}

AdmService admService = AdmServiceHelper.narrow(admObj);

System.out.println("rootCtx:"+ rootCtx);
System.out.println("[resolve] the name of admService:
adm_agent.sifter/AdmService sucessfull");


//GENERATE SERVICE
org.omg.CORBA.Object
gsObj=rootCtx.resolve(NamingUtil.to_name("Util.sifter/GenerateService"));


if(gsObj!=null)
{
System.out.println("gsObj:"+gsObj);
}

GenerateService
generateService=GenerateServiceHelper.narrow(gsObj);
System.out.println("rootctx::::::::::::::::::::"+rootCtx);

centroid = generateService.generateCentroid(n,threshold, temp);


} catch (NotFound e){
e.printStackTrace();
} catch (CannotProceed e){
e.printStackTrace();
} catch (InvalidName e){
e.printStackTrace();
} catch (Exception e)
{e.printStackTrace();
}
}


// end

--------------------------------------------------------

The administrative service has no problem.
But when one of my agent tries to get the service of the Generate
Service
it is throwing the following exception.

Error Message

org.omg.CORBA.BAD_PARAM: minor code: 0 completed: No
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at org.omg.CORBA.SystemException.<init>(Compiled Code)
at org.omg.CORBA.BAD_PARAM.<init>(BAD_PARAM.java:74)
at org.omg.CORBA.BAD_PARAM.<init>(BAD_PARAM.java:50)
at org.omg.CORBA.BAD_PARAM.<init>(BAD_PARAM.java:39)
at coSift.globalIDL.GenerateServiceHelper.narrow(GenerateServiceHelper.j
ava:43)
at coSift.globalIDL.GenerateServiceHelper.narrow(GenerateServiceHelper.j
ava:20)
at coSift.usrAgent.UsrController.makeThesaurus(Compiled Code)
at coSift.usrAgent.UsrLink.makeThesaurus(UsrLink.java:61)
at coSift.globalIDL.UsrServicePOA._invoke(UsrServicePOA.java:139)
at coSift.globalIDL.UsrServicePOA._invoke(Compiled Code)
at com.inprise.vbroker.poa.POAImpl.invoke(Compiled Code)
at com.inprise.vbroker.poa.ActivationRecord.invoke(Compiled
Code)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(Compiled
Code)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(Compiled
Code)
at com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(Compiled
Co
de)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(Compiled
Code)

java.lang.NullPointerException
at coSift.usrAgent.UsrController.makeThesaurus(Compiled Code)
at coSift.usrAgent.UsrLink.makeThesaurus(UsrLink.java:61)
at coSift.globalIDL.UsrServicePOA._invoke(UsrServicePOA.java:139)
at coSift.globalIDL.UsrServicePOA._invoke(Compiled Code)
at com.inprise.vbroker.poa.POAImpl.invoke(Compiled Code)
at com.inprise.vbroker.poa.ActivationRecord.invoke(Compiled
Code)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(Compiled
Code)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(Compiled
Code)
at com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(Compiled
Co
de)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(Compiled
Code)


Please let me know how to solve this problem. If you know some
examples that uses this kind of programming let me know.

What will be the effect due to missing repository_id?

Thanks in advance,

Cheers,

--Vijay

0 new messages