Carlos,
You normally get this error when you try to get a resource context when
there actually is not resource context (more specific a MessageContext i
think) present.
If the executing thread is the thread that processes the WS request, then
you should be fine. If you however this code is executed by another thread,
then there won't be a MessageContext attached to the thread and you'll get
this exception.
Hope that helps.
Martin
Carlos wrote:
Hello:
I'm trying the use the IndexService of Globus Toolki 4.0 following the
guidelines written in Borja Sotomayor and Lisa Childers's book. I will
comment my steps to clarify you why I'm not getting it. I don't really
understand the role of the deploy-jndi.config.xml related to the
IndexService, but I think there should be a resource called
"configuration" that containes the URI of the DefaultIndexService to
make the queries. Later, we could have a java file called
*Configuration.java where this resource is retrieved with the following
method.
* ResourceContext ctx = ResourceContext.getResourceContext();*
But I get an Illegal Argument Exception because I don't get anything.
*java.lang.IllegalArgumentException: Argument ctx is null*
I've checked the deploy-jndi-config.xml file but I don't find anything
wrong. I rewrite this file in the email.
Am I missing something? If you want further details, please contact me.
Thanks in advance
Carlos Alario
/
<?xml version="1.0" encoding="UTF-8"?>
<jndiConfig xmlns="http://wsrf.globus.org/jndi/config">
<!-- Instance service -->
<service name="examples/BrokerService">
<resource name="home"
type="es.uva.tel.gsic.services.broker.impl.BrokerResourceHome">
<resourceParams>
<parameter>
<name>resourceClass</name>
<value>es.uva.tel.gsic.services.broker.impl.BrokerResource</value>
</parameter>
<parameter>
<name>factory</name>
<value>org.globus.wsrf.jndi.BeanFactory</value>
</parameter>
<parameter>
<name>resourceKeyType</name>
<value>java.lang.String</value>
</parameter>
<parameter>
<name>resourceKeyName</name>
<value>{http://gsic.tel.uva.es/namespaces/examples/Broker_instance}BrokerResourceKey</value>
</parameter>
<parameter>
<name>instanceServicePath</name>
<value>examples/BrokerService</value>
</parameter>
</resourceParams>
</resource>
*<resource name="configuration"
type="es.uva.tel.gsic.services.broker.impl.BrokerConfiguration">**
<resourceParams>
<parameter>
<name>factory</name>
<value>org.globus.wsrf.jndi.BeanFactory</value>
</parameter>
<parameter>
<!-- Insert the URI of the VO index service here -->
<name>indexURI</name>
<value>http://157.88.130.195:8080/wsrf/services/DefaultIndexService</value>
</parameter>
</resourceParams>
</resource> *
</service>
<!-- Factory service -->
<service name="examples/BrokerFactoryService">
<resourceLink name="instanceHome"
target="java:comp/env/services/examples/BrokerService/home"/>
</service>
</jndiConfig>
/
------------------------------------------------------------------------
No te aburras más, engánchate a los Juegos de Messenger
<http://www.vivelive.com/juegos/>