geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janko Heilgeist <janko.heilge...@rzg.mpg.de>
Subject Re: cannot find serverinfo jndi lookup
Date Sat, 12 Apr 2008 13:33:25 GMT
Hi Marco,

hmm, it should work with these changes. I've tried it with the 
mini-servlet attached to this mail. It deploys in Geronimo 2.1 without 
errors and works as it should. If this is still not working for you, 
then I don't know what else it could be.

Janko

MarcoLaponder wrote:
> Hi Janko,
> 
> Thanks for your quick response. I changed the lookup as you suggested in
> option 1, but I still have the exception (except it now tells it cannot find
> system-info). Any more ideas or things to check ?
> 
> Kind regards,
> Marco
> 
> 
> Janko Heilgeist-3 wrote:
>> Hi Marco,
>>
>> the line "<ref-name>system-info</ref-name>" defines the local name of

>> the ServerInfo object in the context of your WAR. Therefore, you can
>> either
>>
>> 1) keep the ref-name and try to lookup "java:comp/env/system-info", or
>>
>> 2) keep the lookup and change the line in geronimo-web.xml to 
>> <ref-name>ServerInfo</ref-name>.
>>
>> I hope I could help you!
>>
>> Regards, Janko
>>
>>
>> MarcoLaponder wrote:
>>> I am trying to get some information for the ServerInfo object, i have
>>> added
>>> the gbean to my geronimo-web.xml:
>>>
>>> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
>>> 	<context-root>/navi</context-root>
>>>     <gbean-ref> 
>>>        <ref-name>system-info</ref-name> 
>>>       
>>> <ref-type>org.apache.geronimo.system.serverinfo.ServerInfo</ref-type>

>>>        <pattern> 
>>>          <name>ServerInfo</name> 
>>>        </pattern> 
>>>      </gbean-ref> 
>>>  </web-app>
>>>
>>> and a try to get a handle of the serverinfo in my servlet by:
>>>
>>> serverInfo = (ServerInfo)(new
>>> InitialContext().lookup("java:comp/env/ServerInfo"));
>>>
>>> but this throws a NameNotFoundException.
>>>
>>> What am I doing wrong in the situation above ? 
>>>
>>> Kind regards,
>>> Marco Laponder
>>
>>
> 


Mime
View raw message