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 ]
|