jndi lookup problem in Portal test environment 5.1.0.3
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Portal Server > jndi lookup problem in Portal test environment 5.1.0.3




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    jndi lookup problem in Portal test environment 5.1.0.3  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-28-06 06:21 AM

Hi,

I'm testing an application using RAD6 and portal test environment 5.1 and ha
ving problem with the jndi loopup. Any suggestion is appreciated.

The application uses a jndi resource, defined in web.xml:

<resource-env-ref id="ResourceEnvRef_1151440771313">
<description></description>
<resource-env-ref-name>jcr/repository</resource-env-ref-name>
<resource-env-ref-type>javax.jcr.Repository</resource-env-ref-type>
</resource-env-ref>

Since the server config editor of RAD6 doesn't support adding jndi resources
, I launched "server1" manually and used WAS admin console to create a resou
rce environment provider within the scope of "WebSphere_Portal", as below:

<resources.env:ResourceEnvironmentProvider xmi:id="ResourceEnvironmentProvid
er_1151451163954" name="CLHIARepository">
<factories xmi:type="resources.env:ResourceEnvEntry" xmi:id="ResourceEnvEntr
y_1151451252782" name="jcr/MyRepository" jndiName="jcr/MyRepository" referen
ceable="Referenceable_1151451226922"/>
<propertySet xmi:id="J2EEResourcePropertySet_1151451297282">
<resourceProperties xmi:id="J2EEResourceProperty_1151451297282" name="config
FilePath" type="java.lang.String" value="C:\RAD_DEV_TMP\repository.xml" requ
ired="false"/>
<resourceProperties xmi:id="J2EEResourceProperty_1151451316735" name="repHom
eDir" type="java.lang.String" value="C:\RAD_DEV_TMP\repository" required="fa
lse"/>
</propertySet>
<referenceables xmi:id="Referenceable_1151451226922" factoryClassname="org.a
pache.jackrabbit.core.jndi.BindableRepositoryFactory" classname="javax.jcr.R
epository"/>
</resources.env:ResourceEnvironmentProvider>

Whenever my code runs, a NamingException is thrown, the root cause here:

Root exception is javax.naming.NameNotFoundException: Context: localhost/nod
es/localhost/servers/WebSphere_Portal, name: jcr/MyRepository: First compone
nt in name jcr/MyRepository not found. [Root exception is org.omg.CosNam
ing.NamingContextPackage.NotFou
nd: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
at com.ibm.ws.naming.util.Helpers. processSerializedObjectForLookupExt(Help
er
s.java:952)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(Ur
lContextHelper.java:152)
at com.ibm.ws.naming.urlbase.UrlContextImpl.processBoundObjectForLookup(UrlC
ontextImpl.java:1777)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1278)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1307)
at com.pointalliance.cm.ContentManager.initRepository(ContentManager.java:11
2)


To doublecheck, I ran dumpNameSpace after starting the test environment, and
 my jndi name "jcr/MyRepository" did not show up either.

Does 5.1 PTE support external objects as resource environment provider?

I've tried to add the jndi resource at Node or Cell level (by starting serve
r1), and the dumpNameSpace would be able to find the jndi name. But the prob
lem is that when my portlet runs, it looks into context "localhost/nodes/loc
alhost/servers/WebSphere_Po
rtal" instead of "localhost/nodes/localhost/servers/server1". So the code st
ill fails.

Could anyone help?

Thanks,






[ Post a follow-up to this message ]



    Re: jndi lookup problem in Portal test environment 5.1.0.3  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-28-06 06:29 PM

The JNDI name in your reference, jcr/repository, does not match the JNDI nam
e in the provider, jcr/MyRepository.  Judging by the error message, you shou
ld be able to fix the problem by changing the JNDI name in the reference to 
jcr/MyRepository.





[ Post a follow-up to this message ]



    Re: jndi lookup problem in Portal test environment 5.1.0.3  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-28-06 06:29 PM

Hi, thanks for reponding.

I forgot to post the binding information. The jndi reference "jcr/repository
" refers to a WebSphere specific binding in file web-inf\ibm-web-bnd.xmi:

<resourceEnvRefBindings xmi:id="ResourceEnvRefBinding_1151440771313" jndiNam
e="jcr/MyRepository">
<bindingResourceEnvRef href="WEB-INF/web.xml#ResourceEnvRef_1151440771313"/>
</resourceEnvRefBindings>

So the reference chain is indeed complete.

What I've found out today is that if I use "startserver server1" and "starts
erver WebSphere_Portal" commands to start the servers independent from RAD6,
 the jndi bindings are available.

But if I start the test environment from RAD6, the jndi resource I created t
hrough WAS admin console is not bound when the PTE starts up.

My speculation is that when RAD launches the PTE, it uses its own set of con
figuration, which doesn't contain my configuration.

Does you know if I can find out this RAD specific configuration file and whe
ther I can modify it?

Thanks





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:03 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register