cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grange, John" <>
Subject jndi datasource lookup from cocoon 2.0.4 on weblogic 7
Date Wed, 06 Aug 2003 08:00:34 GMT
I am trying to get the j2ee jndi datasource lookup working under weblogic 7,
without success.  My xsp page fails with a null pointer exception in and produces a malformed xml document (no closing tags)

Has anybody else had this problem - if so, how have they resolved it?  If
this is not the correct list to report this to, can you please let me know
where to report it.

It appears (looking in the excalibur code) that java:comp/env is prepended
to the jndi name when performing a lookup, this is not required under
weblogic, and as such fails if it is included.

The following code DOES NOT work under WebLogic
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("java:comp/env/jdbc/"+"myDataSourceName");

The following code DOES work under WebLogic
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("myDataSourceName");

My setup configuration is as follows:

		<j2ee name="reportDataSource">


		Cocoon App

John Grange 
Software Team Leader 
Tel: +44 (0) 1749 834922 

BlueFinger Limited 
Underwood Business Park, Wookey Hole Road, Wells, Somerset, BA5 1AF, UK 
Tel: +44 (0) 1749 834900
Fax: +44 (0) 1749 834902 
Mobile: +44 (0) 7876 038058 

Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay,
*** This E-mail contains confidential information for the addressee only. If
you are not the intended recipient, please notify us immediately. You should
not use, disclose, distribute or copy this communication if received in
error. No binding contract will result from this e-mail until such time as a
written document is signed on behalf of the company. BlueFinger Limited
cannot accept responsibility for the completeness or accuracy of this
message as it has been transmitted over public networks.***

View raw message